summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2015-06-07 01:45:31 +0100
committerroot <root@lamia.panaceas.james.local>2015-06-07 01:45:31 +0100
commit6bdae4e8e3e7d59cdea0e507c8d277f119ed8097 (patch)
treefb22d5c16b867ddd4bd3a5d42f835d1247717564
parent3accd8fcee87299b51de0abde3c8d9c83368d871 (diff)
downloadtims_keyboard-6bdae4e8e3e7d59cdea0e507c8d277f119ed8097.tar.gz
tims_keyboard-6bdae4e8e3e7d59cdea0e507c8d277f119ed8097.tar.bz2
tims_keyboard-6bdae4e8e3e7d59cdea0e507c8d277f119ed8097.zip
fix ab-initio compilation issues
-rw-r--r--Makefile10
-rw-r--r--Makefile.rules15
2 files changed, 22 insertions, 3 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8ae2d18
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+
+default:
+ make -C libopencm3
+ make -C boot
+ make -C app
+
+clean:
+ make -C libopencm3 clean
+ make -C boot clean
+ make -C app clean
diff --git a/Makefile.rules b/Makefile.rules
index 73bdf20..3b92c42 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -129,6 +129,7 @@ LDLIBS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
all: elf
+
elf: $(BINARY).elf
bin: $(BINARY).bin
hex: $(BINARY).hex
@@ -169,15 +170,15 @@ fish:
@#printf " LD $(*).elf\n"
$(Q)$(LD) $(LDFLAGS) $(ARCH_FLAGS) $(OBJS) $(LDLIBS) -o $(*).elf
-%.o: %.c
+%.o: %.c $(OPENCM3_DIR)/build.stamp
@#printf " CC $(*).c\n"
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(ARCH_FLAGS) -o $(*).o -c $(*).c
-%.o: %.cxx
+%.o: %.cxx $(OPENCM3_DIR)/build.stamp
@#printf " CXX $(*).cxx\n"
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(ARCH_FLAGS) -o $(*).o -c $(*).cxx
-%.o: %.cpp
+%.o: %.cpp $(OPENCM3_DIR)/build.stamp
@#printf " CXX $(*).cpp\n"
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(ARCH_FLAGS) -o $(*).o -c $(*).cpp
@@ -249,3 +250,11 @@ endif
.PHONY: images clean stylecheck styleclean elf bin hex srec list
-include $(OBJS:.o=.d)
+
+
+$(LIB_DIR)/lib$(LIBNAME).a: $(OPENCM3_DIR)/build.stamp
+
+
+$(OPENCM3_DIR)/build.stamp:
+ ${MAKE} -C ${OPENCM3_DIR}
+