APP_NAME = Getting_Started OBJ = obj EXE = exe BUILD = debug OS = $(shell uname -o) DEVICE = msp430f5529 CC = msp430-elf-gcc GDB = msp430-elf-gdb ifeq ($(OS),Cygwin) COMPILER_INCLUDE_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include) COMPILER_LIBRARY_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include) else COMPILER_INCLUDE_DIR = $(dir $(shell which $(CC)))../include COMPILER_LIBRARY_DIR = $(dir $(shell which $(CC)))../include endif MAIN_C_DIR = ../../../../examples/getting_started_with_wlan_station SIMPLE_LINK_STUDIO_DIR = ../../ SIMPLE_LINK_DIR = ../../../../simplelink SIMPLE_STUDIO_LIB_DIR = $(SIMPLE_LINK_STUDIO_DIR) LINKER_SCRIPT = $(APP_NAME).ld LINKER_SCRIPT_PATH = ./ APP_FLAG += -D_USE_CLI_ OBJECTS += $(OBJ)/main.o OBJECTS += $(OBJ)/device.o OBJECTS += $(OBJ)/driver.o OBJECTS += $(OBJ)/flowcont.o OBJECTS += $(OBJ)/netapp.o OBJECTS += $(OBJ)/netcfg.o OBJECTS += $(OBJ)/nonos.o OBJECTS += $(OBJ)/fs.o OBJECTS += $(OBJ)/socket.o OBJECTS += $(OBJ)/spawn.o OBJECTS += $(OBJ)/wlan.o OBJECTS += $(OBJ)/board.o OBJECTS += $(OBJ)/spi.o OBJECTS += $(OBJ)/cli_uart.o INCLUDE_PATH += -I $(COMPILER_INCLUDE_DIR) INCLUDE_PATH += -I $(SIMPLE_LINK_STUDIO_DIR) INCLUDE_PATH += -I $(SIMPLE_LINK_DIR) INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Include INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Source INCLUDE_PATH += -I $(MAIN_C_DIR)/../common CFLAGS += $(INCLUDE_PATH) CFLAGS += -mmcu=$(DEVICE) CFLAGS += -O2 ifeq ($(BUILD), debug) CFLAGS += -g endif CFLAGS += $(APP_FLAG) LFLAGS = -L $(LINKER_SCRIPT_PATH) -T $(LINKER_SCRIPT) all: $(OBJECTS) $(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(EXE)/$(APP_NAME).out $(OBJ)/main.o: $(MAIN_C_DIR)/main.c $(CC) $(INCLUDES) $(CFLAGS) -c $(MAIN_C_DIR)/main.c -o $(OBJ)/main.o $(OBJ)/device.o: $(SIMPLE_LINK_DIR)/Source/device.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/device.c -o $(OBJ)/device.o $(OBJ)/driver.o: $(SIMPLE_LINK_DIR)/Source/driver.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/driver.c -o $(OBJ)/driver.o $(OBJ)/flowcont.o: $(SIMPLE_LINK_DIR)/Source/flowcont.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/flowcont.c -o $(OBJ)/flowcont.o $(OBJ)/netapp.o: $(SIMPLE_LINK_DIR)/Source/netapp.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netapp.c -o $(OBJ)/netapp.o $(OBJ)/netcfg.o: $(SIMPLE_LINK_DIR)/Source/netcfg.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netcfg.c -o $(OBJ)/netcfg.o $(OBJ)/nonos.o: $(SIMPLE_LINK_DIR)/Source/nonos.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/nonos.c -o $(OBJ)/nonos.o $(OBJ)/fs.o: $(SIMPLE_LINK_DIR)/Source/fs.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/fs.c -o $(OBJ)/fs.o $(OBJ)/socket.o: $(SIMPLE_LINK_DIR)/Source/socket.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/socket.c -o $(OBJ)/socket.o $(OBJ)/spawn.o: $(SIMPLE_LINK_DIR)/Source/spawn.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/spawn.c -o $(OBJ)/spawn.o $(OBJ)/wlan.o: $(SIMPLE_LINK_DIR)/Source/wlan.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/wlan.c -o $(OBJ)/wlan.o $(OBJ)/spi.o: $(SIMPLE_LINK_STUDIO_DIR)/spi.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/spi.c -o $(OBJ)/spi.o $(OBJ)/board.o: $(SIMPLE_LINK_STUDIO_DIR)/board.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/board.c -o $(OBJ)/board.o $(OBJ)/cli_uart.o: $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c $(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c -o $(OBJ)/cli_uart.o debug: all $(GDB) $(EXE)/$(APP_NAME).out clean: rm -rf $(OBJ)/* $(EXE)/$(APP_NAME).out