removed old unused makefile-quickstart code

+
tidied up makefile
This commit is contained in:
fros4943 2006-09-06 12:20:12 +00:00
parent 4c52b930c8
commit 1a3761e1a9

View file

@ -1,57 +1,13 @@
## The COOJA Simulator - cooja platform makefile # $Id: Makefile.cooja,v 1.3 2006/09/06 12:20:12 fros4943 Exp $
## The COOJA Simulator Contiki platform Makefile
## ##
## This makefile's main purpose is to compile source files ## This makefile should normally never be called directly, but
## generated by the COOJA Simulator and should ## rather from inside the COOJA simulator.
## only be called from inside the simulator... ## The purpose of this file is to compile a shared library that
## ## can be loaded into the Java part of COOJA.
## However, it can also be used as a shortcut to startup the
## simulator from a customized user platform.
## See the user platform examples.
########################################################### ### Check input COOJA parameters
ifndef COMPILE_MAIN # << shortcut, startup simulator >>
# The COOJA Simulator jar-file location (default)
ifndef COOJA_JAR
COOJA_JAR=$(CONTIKI)/tools/cooja/dist/cooja.jar
endif
# Java binary (default)
ifndef JAVA
JAVA=java
endif
ifndef WINDIR
ifdef OS
ifneq (,$(findstring Windows,$(OS)))
WINDIR := Windows
endif
endif
endif
ifndef WINDIR
# This settings are for UNIX
SEPARATOR=:
else
# These setting are for MS-DOS/Windows 95/Windows NT
SEPARATOR=;
endif
# Command to start simulator with a source file argument
COMMAND = $(JAVA) -DPATH_CONTIKI=$(CONTIKI) -DQUICKSTART_APP=$@ \
-cp "$(COOJA_JAR)$(SEPARATOR)$(COOJA_JAVA)" se.sics.cooja.GUI $(CLASS_CONFIGS)
# Delete pre-defined project sourcefiles (messes up make execution)
PROJECT_SOURCEFILES = # OBS! Ugly fix
%:
@echo "Starting simulator (using shortcut)"
$(COMMAND)
###########################################################
else # << compile generated source file >>
### Check/create COOJA parameters (output files)
ifndef CONTIKI ifndef CONTIKI
$(error CONTIKI not defined!) $(error CONTIKI not defined!)
@ -67,19 +23,25 @@ DEPFILE = $(OUTPUT_DIR)/$(TYPEID).a
MAPFILE = $(OUTPUT_DIR)/$(TYPEID).map MAPFILE = $(OUTPUT_DIR)/$(TYPEID).map
MAINFILE = $(OUTPUT_DIR)/$(TYPEID).co MAINFILE = $(OUTPUT_DIR)/$(TYPEID).co
### Define COOJA core interfaces
COOJA = $(CONTIKI)/platform/$(TARGET) COOJA = $(CONTIKI)/platform/$(TARGET)
CONTIKI_TARGET_DIRS = . dev lib sys CONTIKI_TARGET_DIRS = . dev lib sys
COOJA_DEV = $(patsubst $(COOJA)/dev/%.c,%.c,$(wildcard $(COOJA)/dev/*.c)) COOJALIB = simEnvChange.c irq.c
COOJA_LIB = $(patsubst $(COOJA)/lib/%.c,%.c,$(wildcard $(COOJA)/lib/*.c)) COOJAINTFS = beep.c button-sensor.c ip.c leds-arch.c moteid.c \
pir-sensor.c radio-arch.c rs232.c vib-sensor.c simEnvChange.c \
COOJA_SYS = $(patsubst $(COOJA)/sys/%.c,%.c,$(wildcard $(COOJA)/sys/*.c)) clock.c log.c
CORE_FILES = random.c sensors.c leds.c serial.c CORE_FILES = random.c sensors.c leds.c serial.c
#COOJA_SYS = $(patsubst $(COOJA)/sys/%.c,%.c,$(wildcard $(COOJA)/sys/*.c))
#COOJA_DEV = $(patsubst $(COOJA)/dev/%.c,%.c,$(wildcard $(COOJA)/dev/*.c))
#COOJA_LIB = $(patsubst $(COOJA)/lib/%.c,%.c,$(wildcard $(COOJA)/lib/*.c))
#COOJA_LIB = simEnvChange.c
CONTIKI_TARGET_SOURCEFILES = \ CONTIKI_TARGET_SOURCEFILES = \
$(COOJA_DEV) $(COOJA_LIB) $(COOJA_SYS) $(CORE_FILES) $(COOJALIB) $(COOJAINTFS) $(CORE_FILES) $(PROJECT_SOURCEFILES)
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
@ -88,12 +50,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
### Define the CPU directory ### Define the CPU directory
CONTIKI_CPU=$(CONTIKI)/cpu/x86 CONTIKI_CPU=$(CONTIKI)/cpu/x86
### Compiler definitions (search contiki core last) ### Compiler arguments
CC = gcc
LD = ld
AS = as
OBJCOPY = objcopy
STRIP = strip
CFLAGSNO = -I. -I$(CONTIKI_CPU) \ CFLAGSNO = -I. -I$(CONTIKI_CPU) \
$(EXTRA_CC_ARGS) \ $(EXTRA_CC_ARGS) \
-I$(COOJA) \ -I$(COOJA) \
@ -103,7 +60,6 @@ CFLAGSNO = -I. -I$(CONTIKI_CPU) \
CFLAGS = $(CFLAGSNO) CFLAGS = $(CFLAGSNO)
### Setup directory search path for source files ### Setup directory search path for source files
CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(COOJA)/, \ CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(COOJA)/, \
$(CONTIKI_TARGET_DIRS)} $(CONTIKI_TARGET_DIRS)}
@ -111,10 +67,9 @@ vpath %.c $(PROJECTDIRS) \
$(CONTIKIDIRS) $(APPDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \ $(CONTIKIDIRS) $(APPDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
$(CONTIKI_CPU) $(CONTIKI_CPU)
### Define custom targets
$(LIBFILE): $(MAINFILE) $(PROJECT_OBJECTFILES) $(DEPFILE) $(LIBFILE): $(MAINFILE) $(PROJECT_OBJECTFILES) $(DEPFILE)
$(LD) -Map=$(MAPFILE) -shared $(LD_ARGS_1) -o $@ $^ $(LD_ARGS_2) $(LD) -Map=$(MAPFILE) -shared $(LD_ARGS_1) -o $@ $^ $(LD_ARGS_2)
$(DEPFILE): ${addprefix $(OBJECTDIR)/, $(CONTIKI_SOURCEFILES:.c=.o)} $(DEPFILE): ${addprefix $(OBJECTDIR)/, $(CONTIKI_SOURCEFILES:.c=.o)}
$(AR) rcf $@ $^ $(AR) rcf $@ $^
endif ## END OF 'COMPILE GENERATED CONTIKI MAIN SOURCE FILE'