remove unused hal debug funcs
[pulsecounter.git] / msp430 / Makefile
1 GCCARCH = msp430
2 MCU = msp430g2553
3 COMMAND_PREFIX = $(GCCARCH)-
4 CC = $(COMMAND_PREFIX)gcc
5 LD = $(COMMAND_PREFIX)ld
6 UPLOAD = mspdebug rf2500
7 EMBUILDER = em-builder
8
9 APPNAME = Pulsecounter
10 MAIN = $(APPNAME)-Prog
11 OUTFILE = $(MAIN).out
12 OBJECTS = $(MAIN).o $(APPNAME).o Hal.o
13
14 COPTS = -mmcu=$(MCU)
15 LDOPTS = -mmcu=$(MCU) -Wl,-Map=$(MAIN).map,--gc-sections
16 CFLAGS = -std=gnu99 -O2 -w -ffunction-sections -fdata-sections \
17         -fpack-struct=1 -fno-strict-aliasing -fomit-frame-pointer \
18         -c -g -IHal -IEm $(COPTS)
19
20 all: $(OUTFILE)
21
22 load: $(OUTFILE)
23         $(UPLOAD) "prog $(OUTFILE)"
24
25 clean:
26         rm -f $(OUTFILE) $(OBJECTS)
27
28 em-clean: clean
29         rm -rf Em
30
31 $(OUTFILE): $(OBJECTS)
32         $(CC) -o $(OUTFILE) $^ $(LDOPTS)
33
34 #.c.o:
35 #       $(CC) $< -o $@ $(CFLAGS)
36
37 $(MAIN).o: $(MAIN).c Em/$(APPNAME).c
38         $(CC) $< -o $@ $(CFLAGS)
39
40 $(APPNAME).o: Em/$(APPNAME).c
41         $(CC) $< -o $@ $(CFLAGS)
42
43 Hal.o: Hal/Hal.c
44         $(CC) $< -o $@ $(CFLAGS)
45
46 Em/$(APPNAME).c: $(APPNAME).ems
47         $(EMBUILDER) -v $<
48