mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
using OBJECTDIR instead of "obj_cooja" + bugfix: allow for externally defined CC
This commit is contained in:
parent
53e150f240
commit
8f1988e7fc
@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.cooja,v 1.40 2010/03/23 12:07:29 adamdunkels Exp $
|
# $Id: Makefile.cooja,v 1.41 2010/06/11 15:17:26 fros4943 Exp $
|
||||||
|
|
||||||
## The COOJA Simulator Contiki platform Makefile
|
## The COOJA Simulator Contiki platform Makefile
|
||||||
##
|
##
|
||||||
@ -40,10 +40,10 @@ $(MAKECMDGOALS): $(CONTIKI)/tools/cooja/dist/cooja.jar
|
|||||||
|
|
||||||
endif ## QUICKSTART
|
endif ## QUICKSTART
|
||||||
|
|
||||||
#MAIN_SRC = obj_cooja/$(LIBNAME).c
|
#MAIN_SRC = $(OBJECTDIR)/$(LIBNAME).c
|
||||||
MAIN_OBJ = obj_cooja/$(LIBNAME).o
|
MAIN_OBJ = $(OBJECTDIR)/$(LIBNAME).o
|
||||||
ARCHIVE = obj_cooja/$(LIBNAME).a
|
ARCHIVE = $(OBJECTDIR)/$(LIBNAME).a
|
||||||
JNILIB = obj_cooja/$(LIBNAME).cooja
|
JNILIB = $(OBJECTDIR)/$(LIBNAME).cooja
|
||||||
CONTIKI_APP_OBJ = $(CONTIKI_APP).co
|
CONTIKI_APP_OBJ = $(CONTIKI_APP).co
|
||||||
|
|
||||||
### COOJA platform sources
|
### COOJA platform sources
|
||||||
@ -72,7 +72,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|||||||
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
||||||
|
|
||||||
### Compiler arguments
|
### Compiler arguments
|
||||||
CC = gcc
|
#CC = gcc
|
||||||
CFLAGSNO = $(EXTRA_CC_ARGS) -Wall -g -I/usr/local/include -DCLASSNAME=$(CLASSNAME)
|
CFLAGSNO = $(EXTRA_CC_ARGS) -Wall -g -I/usr/local/include -DCLASSNAME=$(CLASSNAME)
|
||||||
CFLAGS = $(CFLAGSNO)
|
CFLAGS = $(CFLAGSNO)
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ endif
|
|||||||
REDEF_PRINTF=1 # Redefine functions to enable printf()s inside Cooja
|
REDEF_PRINTF=1 # Redefine functions to enable printf()s inside Cooja
|
||||||
|
|
||||||
### Define custom targets
|
### Define custom targets
|
||||||
$(ARCHIVE): ${addprefix obj_cooja/, $(CONTIKI_SOURCEFILES:.c=.o)}
|
$(ARCHIVE): ${addprefix $(OBJECTDIR)/, $(CONTIKI_SOURCEFILES:.c=.o)}
|
||||||
$(AR_COMMAND_1) $^ $(AR_COMMAND_2)
|
$(AR_COMMAND_1) $^ $(AR_COMMAND_2)
|
||||||
|
|
||||||
$(JNILIB): $(CONTIKI_APP_OBJ) $(MAIN_OBJ) $(PROJECT_OBJECTFILES) $(ARCHIVE)
|
$(JNILIB): $(CONTIKI_APP_OBJ) $(MAIN_OBJ) $(PROJECT_OBJECTFILES) $(ARCHIVE)
|
||||||
@ -94,10 +94,10 @@ ifdef SYMBOLS
|
|||||||
@echo Generating symbols
|
@echo Generating symbols
|
||||||
# Recreate symbols file and relink with final memory layout (twice)
|
# Recreate symbols file and relink with final memory layout (twice)
|
||||||
${CONTIKI}/tools/make-symbols-nm $(JNILIB)
|
${CONTIKI}/tools/make-symbols-nm $(JNILIB)
|
||||||
$(CC) $(CFLAGS) -c symbols.c -o obj_cooja/symbols.o
|
$(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o
|
||||||
$(LINK_COMMAND_1) $^ $(LINK_COMMAND_2)
|
$(LINK_COMMAND_1) $^ $(LINK_COMMAND_2)
|
||||||
${CONTIKI}/tools/make-symbols-nm $(JNILIB)
|
${CONTIKI}/tools/make-symbols-nm $(JNILIB)
|
||||||
$(CC) $(CFLAGS) -c symbols.c -o obj_cooja/symbols.o
|
$(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o
|
||||||
endif ## SYMBOLS
|
endif ## SYMBOLS
|
||||||
ifdef REDEF_PRINTF
|
ifdef REDEF_PRINTF
|
||||||
@echo Redefining printf
|
@echo Redefining printf
|
||||||
|
Loading…
Reference in New Issue
Block a user