diff --git a/cube/Makefile b/cube/Makefile index 5b0fc21..64a0839 100644 --- a/cube/Makefile +++ b/cube/Makefile @@ -15,10 +15,12 @@ # ------------------------------------------------ -# LAN = 1 -# WiFi = 2 -# GSM = 3 -# NETWORK = 1 +# Network implementations, to be set on commandline +# LAN +# WiFi +# GSM + +# NETWORK = LAN ###################################### @@ -84,7 +86,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \ Core/Src/system_stm32f1xx.c -ifeq ($(NETWORK), 1) +ifeq ($(NETWORK), "LAN") C_SOURCES += \ User/Src/ports.c \ User/Src/wizHelper.c \ @@ -157,7 +159,7 @@ C_INCLUDES = \ -IDrivers/CMSIS/Include -ifeq ($(NETWORK), 1) +ifeq ($(NETWORK), "LAN") C_INCLUDES += \ -IioLibrary_Driver/Internet/SNTP \ -IioLibrary_Driver/Internet/DNS \ @@ -202,7 +204,7 @@ all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) vpath %.c $(sort $(dir $(C_SOURCES))) -ifeq ($(NETWORK), 1) +ifeq ($(NETWORK), "LAN") OBJECTS += $(addprefix $(BUILD_DIR)/,w5500.a) endif @@ -210,7 +212,7 @@ endif OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) vpath %.s $(sort $(dir $(ASM_SOURCES))) -ifeq ($(NETWORK), 1) +ifeq ($(NETWORK), "LAN") $(BUILD_DIR)/w5500.a: (cd ioLibrary_Driver && $(MAKE) && cp w5500.a ../$(BUILD_DIR) && cd ..) endif