diff options
author | DaveHodder67 <dave.hodder@focusrite.com> | 2015-07-06 14:53:27 +0100 |
---|---|---|
committer | DaveHodder67 <dave.hodder@focusrite.com> | 2015-07-06 14:53:27 +0100 |
commit | 15c14bf2042cc1c5515e53f0a99f9a7382e3a53d (patch) | |
tree | 18944d22eecfd484915d3568e89721921dd545da | |
parent | a7eb81707d7300c25ec03c39c2797df10e0a7c82 (diff) | |
download | launchpad-polymaker-15c14bf2042cc1c5515e53f0a99f9a7382e3a53d.tar.gz launchpad-polymaker-15c14bf2042cc1c5515e53f0a99f9a7382e3a53d.zip |
improved make for simulator
-rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -4,18 +4,20 @@ TOOLS = tools | |||
4 | 4 | ||
5 | SOURCES += src/app.c | 5 | SOURCES += src/app.c |
6 | 6 | ||
7 | OBJECTS = $(addprefix $(BUILDDIR)/, $(addsuffix .o, $(basename $(SOURCES)))) | 7 | INCLUDES += -Iinclude -I |
8 | 8 | ||
9 | INCLUDES += -Iinclude \ | 9 | LIB = lib/launchpad_pro.a |
10 | -I\ | ||
11 | 10 | ||
11 | OBJECTS = $(addprefix $(BUILDDIR)/, $(addsuffix .o, $(basename $(SOURCES)))) | ||
12 | |||
13 | # output files | ||
12 | SYX = $(BUILDDIR)/launchpad_pro.syx | 14 | SYX = $(BUILDDIR)/launchpad_pro.syx |
13 | LIB = lib/launchpad_pro.a | ||
14 | ELF = $(BUILDDIR)/launchpad_pro.elf | 15 | ELF = $(BUILDDIR)/launchpad_pro.elf |
15 | HEX = $(BUILDDIR)/launchpad_pro.hex | 16 | HEX = $(BUILDDIR)/launchpad_pro.hex |
16 | HEXTOSYX = $(BUILDDIR)/hextosyx | 17 | HEXTOSYX = $(BUILDDIR)/hextosyx |
17 | SIMULATOR = $(BUILDDIR)/simulator | 18 | SIMULATOR = $(BUILDDIR)/simulator |
18 | 19 | ||
20 | # tools | ||
19 | HOST_GPP = g++ | 21 | HOST_GPP = g++ |
20 | HOST_GCC = gcc | 22 | HOST_GCC = gcc |
21 | CC = arm-none-eabi-gcc | 23 | CC = arm-none-eabi-gcc |
@@ -39,13 +41,13 @@ $(SYX): $(HEX) $(HEXTOSYX) $(SIMULATOR) | |||
39 | ./$(SIMULATOR) | 41 | ./$(SIMULATOR) |
40 | ./$(HEXTOSYX) $(HEX) $(SYX) | 42 | ./$(HEXTOSYX) $(HEX) $(SYX) |
41 | 43 | ||
42 | # build the tool for conversion of ELF files to sysex ready for upload to the unit | 44 | # build the tool for conversion of ELF files to sysex, ready for upload to the unit |
43 | $(HEXTOSYX): | 45 | $(HEXTOSYX): |
44 | $(HOST_GPP) -Ofast -std=c++0x -I./$(TOOLS)/libintelhex/include ./$(TOOLS)/libintelhex/src/intelhex.cc $(TOOLS)/hextosyx.cpp -o $(HEXTOSYX) | 46 | $(HOST_GPP) -Ofast -std=c++0x -I./$(TOOLS)/libintelhex/include ./$(TOOLS)/libintelhex/src/intelhex.cc $(TOOLS)/hextosyx.cpp -o $(HEXTOSYX) |
45 | 47 | ||
46 | # build the simulator (it's a very basic test of the code before it runs on the device!) | 48 | # build the simulator (it's a very basic test of the code before it runs on the device!) |
47 | $(SIMULATOR): | 49 | $(SIMULATOR): |
48 | $(HOST_GCC) -O0 -std=c99 -Iinclude $(TOOLS)/simulator.c src/app.c -o $(SIMULATOR) | 50 | $(HOST_GCC) -O0 -std=c99 -Iinclude $(TOOLS)/simulator.c $(SOURCES) -o $(SIMULATOR) |
49 | 51 | ||
50 | $(HEX): $(ELF) | 52 | $(HEX): $(ELF) |
51 | $(OBJCOPY) -O ihex $< $@ | 53 | $(OBJCOPY) -O ihex $< $@ |