summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaveHodder67 <dave.hodder@focusrite.com>2015-07-06 14:53:27 +0100
committerDaveHodder67 <dave.hodder@focusrite.com>2015-07-06 14:53:27 +0100
commit15c14bf2042cc1c5515e53f0a99f9a7382e3a53d (patch)
tree18944d22eecfd484915d3568e89721921dd545da
parenta7eb81707d7300c25ec03c39c2797df10e0a7c82 (diff)
downloadlaunchpad-polymaker-15c14bf2042cc1c5515e53f0a99f9a7382e3a53d.tar.gz
launchpad-polymaker-15c14bf2042cc1c5515e53f0a99f9a7382e3a53d.zip
improved make for simulator
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 698cba9..8d2139f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,18 +4,20 @@ TOOLS = tools
4 4
5SOURCES += src/app.c 5SOURCES += src/app.c
6 6
7OBJECTS = $(addprefix $(BUILDDIR)/, $(addsuffix .o, $(basename $(SOURCES)))) 7INCLUDES += -Iinclude -I
8 8
9INCLUDES += -Iinclude \ 9LIB = lib/launchpad_pro.a
10-I\
11 10
11OBJECTS = $(addprefix $(BUILDDIR)/, $(addsuffix .o, $(basename $(SOURCES))))
12
13# output files
12SYX = $(BUILDDIR)/launchpad_pro.syx 14SYX = $(BUILDDIR)/launchpad_pro.syx
13LIB = lib/launchpad_pro.a
14ELF = $(BUILDDIR)/launchpad_pro.elf 15ELF = $(BUILDDIR)/launchpad_pro.elf
15HEX = $(BUILDDIR)/launchpad_pro.hex 16HEX = $(BUILDDIR)/launchpad_pro.hex
16HEXTOSYX = $(BUILDDIR)/hextosyx 17HEXTOSYX = $(BUILDDIR)/hextosyx
17SIMULATOR = $(BUILDDIR)/simulator 18SIMULATOR = $(BUILDDIR)/simulator
18 19
20# tools
19HOST_GPP = g++ 21HOST_GPP = g++
20HOST_GCC = gcc 22HOST_GCC = gcc
21CC = arm-none-eabi-gcc 23CC = 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 $< $@