added source file check before launching cooja
This commit is contained in:
parent
2f50533d30
commit
6e3dc4d24b
1 changed files with 20 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile.cooja,v 1.13 2007/04/02 09:07:30 fros4943 Exp $
|
# $Id: Makefile.cooja,v 1.14 2007/04/02 10:28:52 fros4943 Exp $
|
||||||
|
|
||||||
## The COOJA Simulator Contiki platform Makefile
|
## The COOJA Simulator Contiki platform Makefile
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,30 @@ ifndef CONTIKI
|
||||||
$(error CONTIKI not defined!)
|
$(error CONTIKI not defined!)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Assuming quickstart if no type ID set
|
||||||
ifndef TYPEID
|
ifndef TYPEID
|
||||||
|
QUICKSTART=1
|
||||||
|
endif
|
||||||
|
|
||||||
### Quickstart simulator
|
### Quickstart simulator
|
||||||
|
ifdef QUICKSTART
|
||||||
|
|
||||||
|
# Check that target file exists
|
||||||
|
have_file := $(wildcard $(MAKECMDGOALS).c)
|
||||||
|
ifeq ($(strip $(have_file)),)
|
||||||
|
$(error Quick-start error. Can't find file "$(MAKECMDGOALS).c")
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Create COOJA JAR rule
|
||||||
|
$(CONTIKI)/tools/cooja/dist/cooja.jar:
|
||||||
|
@echo "Creating COOJA Java archive..."
|
||||||
|
(cd $(CONTIKI)/tools/cooja && ant jar)
|
||||||
|
|
||||||
|
# Quickstart rule
|
||||||
$(MAKECMDGOALS): $(CONTIKI)/tools/cooja/dist/cooja.jar
|
$(MAKECMDGOALS): $(CONTIKI)/tools/cooja/dist/cooja.jar
|
||||||
java -jar $(CONTIKI)/tools/cooja/dist/cooja.jar -quickstart=$(MAKECMDGOALS).c -contiki=$(CONTIKI)
|
java -jar $(CONTIKI)/tools/cooja/dist/cooja.jar -quickstart=$(MAKECMDGOALS).c -contiki=$(CONTIKI)
|
||||||
|
|
||||||
$(CONTIKI)/tools/cooja/dist/cooja.jar:
|
endif ## QUICKSTART
|
||||||
echo Creating COOJA Java archive...
|
|
||||||
(cd $(CONTIKI)/tools/cooja && ant jar)
|
|
||||||
endif
|
|
||||||
|
|
||||||
OUTPUT_DIR = obj_cooja
|
OUTPUT_DIR = obj_cooja
|
||||||
LIBFILE = $(OUTPUT_DIR)/$(TYPEID).library
|
LIBFILE = $(OUTPUT_DIR)/$(TYPEID).library
|
||||||
|
|
Loading…
Reference in a new issue