summaryrefslogtreecommitdiff
path: root/src/arch/posix/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/posix/Makefile.inc')
-rw-r--r--src/arch/posix/Makefile.inc7
1 files changed, 5 insertions, 2 deletions
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}