diff options
Diffstat (limited to 'src/arch/esp8266/Makefile.inc')
-rw-r--r-- | src/arch/esp8266/Makefile.inc | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index c1bb621..44a3cd7 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -22,7 +22,7 @@ CXXFLAGS = -std=c++11 -fno-rtti -fno-threadsafe-statics LDFLAGS += -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static CXX_TARGETS += src/arch/esp8266/arch.cc src/arch/esp8266/driver/gpio.cc -CXX_TARGETS += src/arch/esp8266/driver/stdout.cc src/arch/esp8266/driver/uptime.cc +CXX_TARGETS += src/arch/esp8266/driver/stdout.cc OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} @@ -30,14 +30,35 @@ ifeq (${esp8266_led2}, 1) COMMON_FLAGS += -DLED_ON_GPIO16 endif +# Commandline + +ifneq ($(findstring counter,${arch_drivers}), ) + CONFIG_arch_esp8266_driver_counter = y +endif + ifneq ($(findstring stdin,${arch_drivers}), ) - CXX_TARGETS += src/arch/esp8266/driver/stdin.cc + CONFIG_arch_esp8266_driver_stdin = y endif -ifneq ($(findstring counter,${arch_drivers}), ) +ifeq (${timer_s}, 1) + CONFIG_arch_esp8266_driver_uptime = y +endif + +# Kconfig + +ifdef CONFIG_arch_esp8266_driver_counter CXX_TARGETS += src/arch/esp8266/driver/counter.cc endif +ifdef CONFIG_arch_esp8266_driver_stdin + CXX_TARGETS += src/arch/esp8266/driver/stdin.cc +endif + +ifdef CONFIG_arch_esp8266_driver_uptime + COMMON_FLAGS += -DTIMER_S + CXX_TARGETS += src/arch/esp8266/driver/uptime.cc +endif + .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} ${QUIET}${OBJCOPY} --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@ |