diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arduino-nano-168/Makefile.inc | 5 | ||||
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 5 | ||||
-rw-r--r-- | src/arch/blinkenrocket/Makefile.inc | 7 | ||||
-rw-r--r-- | src/arch/esp8266/Makefile.inc | 10 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/Makefile.inc | 5 | ||||
-rw-r--r-- | src/arch/posix/Makefile.inc | 7 |
6 files changed, 29 insertions, 10 deletions
diff --git a/src/arch/arduino-nano-168/Makefile.inc b/src/arch/arduino-nano-168/Makefile.inc index e1e1028..2f501f6 100644 --- a/src/arch/arduino-nano-168/Makefile.inc +++ b/src/arch/arduino-nano-168/Makefile.inc @@ -64,11 +64,14 @@ endif COMMON_FLAGS += -DBAUD=${uart_baud}UL -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} +.c.o: + ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} + build/system.elf: ${OBJECTS} ${QUIET}${CXX} ${COMMON_FLAGS} ${CXXFLAGS} -Wl,--gc-sections -o $@ ${OBJECTS} ${QUIET}avr-size --format=avr --mcu=${MCU} $@ diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index dd8eb30..9a3c1e3 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -45,11 +45,14 @@ else COMMON_FLAGS += -DF_CPU=16000000UL endif -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} +.c.o: + ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} + build/system.elf: ${OBJECTS} ${QUIET}${CXX} ${COMMON_FLAGS} ${CXXFLAGS} -Wl,--gc-sections -o $@ ${OBJECTS} ${QUIET}avr-size --format=avr --mcu=${MCU} $@ diff --git a/src/arch/blinkenrocket/Makefile.inc b/src/arch/blinkenrocket/Makefile.inc index c3ae7ea..277ab33 100644 --- a/src/arch/blinkenrocket/Makefile.inc +++ b/src/arch/blinkenrocket/Makefile.inc @@ -27,10 +27,13 @@ else ifneq ($(findstring i2c,${arch_drivers}), ) CXX_TARGETS += src/arch/blinkenrocket/driver/i2c.cc endif -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} .cc.o: - ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} + ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} + +.cc.o: + ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} build/system.elf: ${OBJECTS} ${CXX} ${COMMON_FLAGS} ${CXXFLAGS} -Wl,--gc-sections -o $@ ${OBJECTS} 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} diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index 4d7fe35..49e0725 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -56,11 +56,14 @@ else endif -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} .cc.o: ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} +.c.o: + ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} + build/system.elf: ${OBJECTS} ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} \ -Wl,--library-path=/opt/msp430/ti/gcc/include/ \ diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc index 5162abd..bbca35d 100644 --- a/src/arch/posix/Makefile.inc +++ b/src/arch/posix/Makefile.inc @@ -12,7 +12,7 @@ endif CXX_TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc CXX_TARGETS += src/arch/posix/driver/stdout.cc src/arch/posix/driver/uptime.cc -OBJECTS = ${CXX_TARGETS:.cc=.o} +OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} ifneq (${gpio_trace}, ) COMMON_FLAGS += -DGPIO_TRACE @@ -21,6 +21,9 @@ endif .cc.o: ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} +.c.o: + ${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} + build/system.elf: ${OBJECTS} ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} \ -o $@ ${OBJECTS} @@ -30,7 +33,7 @@ run: build/system.elf monitor: run -program: run +program: arch_clean: rm -f ${OBJECTS} |