From 6bdae4e8e3e7d59cdea0e507c8d277f119ed8097 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Jun 2015 01:45:31 +0100 Subject: fix ab-initio compilation issues --- Makefile | 10 ++++++++++ Makefile.rules | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 Makefile 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} + -- cgit v1.2.3