diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-13 15:33:41 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-13 15:33:41 +0100 |
commit | 36316c2e4a9dbeab28b97fa18fefc37eed4a6782 (patch) | |
tree | 791d220b4701e29bd28cf5d17d9a4e086cc50320 /src/arch/esp8266 | |
parent | 6f416f1957a18e6b00963db6f8d416e1c41bb044 (diff) |
Support C targets
Diffstat (limited to 'src/arch/esp8266')
-rw-r--r-- | src/arch/esp8266/Makefile.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index fdd5636..ed9f05a 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -23,7 +23,7 @@ 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 -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} ifeq (${esp8266_led2}, 1) COMMON_FLAGS += -DLED_ON_GPIO16 @@ -34,8 +34,12 @@ ifneq ($(findstring stdin,${arch_drivers}), ) endif .cc.o: - ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} - ${OBJCOPY} --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@ + ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} + ${QUIET}${OBJCOPY} --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@ + +.c.o: + ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} + ${QUIET}${OBJCOPY} --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@ build/system.ar: ${OBJECTS} ${AR} cru $@ ${OBJECTS} |