summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaveHodder67 <dave.hodder@focusrite.com>2015-07-06 15:01:26 +0100
committerDaveHodder67 <dave.hodder@focusrite.com>2015-07-06 15:01:26 +0100
commitb7239115c335a0de0e27b9a856f1b8fd83e20a84 (patch)
treee4531e41a68024ca594c34270450d0648c7bc8c9 /Makefile
parent15c14bf2042cc1c5515e53f0a99f9a7382e3a53d (diff)
downloadlaunchpad-polymaker-b7239115c335a0de0e27b9a856f1b8fd83e20a84.tar.gz
launchpad-polymaker-b7239115c335a0de0e27b9a856f1b8fd83e20a84.zip
makefile include auto dependencies
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8d2139f..1aaaf46 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ LDFLAGS += -T$(LDSCRIPT) -u _start -u _Minimum_Stack_Size -mcpu=cortex-m3 -mthu
36 36
37all: $(SYX) 37all: $(SYX)
38 38
39# build the final sysex file from the ELF 39# build the final sysex file from the ELF - run the simulator first
40$(SYX): $(HEX) $(HEXTOSYX) $(SIMULATOR) 40$(SYX): $(HEX) $(HEXTOSYX) $(SIMULATOR)
41 ./$(SIMULATOR) 41 ./$(SIMULATOR)
42 ./$(HEXTOSYX) $(HEX) $(SYX) 42 ./$(HEXTOSYX) $(HEX) $(SYX)
@@ -55,9 +55,13 @@ $(HEX): $(ELF)
55$(ELF): $(OBJECTS) 55$(ELF): $(OBJECTS)
56 $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIB) 56 $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIB)
57 57
58DEPENDS := $(OBJECTS:.o=.d)
59
60-include $(DEPENDS)
61
58$(BUILDDIR)/%.o: %.c 62$(BUILDDIR)/%.o: %.c
59 mkdir -p $(dir $@) 63 mkdir -p $(dir $@)
60 $(CC) -c $(CFLAGS) $< -o $@ 64 $(CC) -c $(CFLAGS) -MMD -o $@ $<
61 65
62clean: 66clean:
63 rm -rf $(BUILDDIR) 67 rm -rf $(BUILDDIR)