Blame view

RIOT/boards/msba2-common/tools/Makefile 1.53 KB
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  CFLAGS += -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
  CC = gcc
  prefix=/usr/local
  
  all: lpc2k_pgm pseudoterm
  
  SRC  = lpc2k_pgm.c download.c uuencode.c ihex.c serial.c chipinfo.c boot_2xxx.c boot_23xx.c control_2xxx.c
  OBJS = ${addprefix obj/,${patsubst %.c,%.o,$(SRC)}}
  
  PSEUDOTERM_SRC = pseudoterm.c serial.c control_2xxx.c
  PSEUDOTERM_OBJS = ${addprefix obj/,${patsubst %.c,%.o,$(PSEUDOTERM_SRC)}}
  
  TARGETDIR = bin
  
  lpc2k_pgm: $(OBJS)
  	mkdir -p $(TARGETDIR)
  	$(CC) -o $(TARGETDIR)/lpc2k_pgm $(OBJS)
  
  pseudoterm: $(PSEUDOTERM_OBJS)
  	mkdir -p $(TARGETDIR)
  	$(CC) -o $(TARGETDIR)/pseudoterm $(PSEUDOTERM_OBJS) -lpthread
  
  chipinfo.o: boot_2xxx.h boot_23xx.h
  
  static: $(OBJS) mkstaticlist
  	$(CC) -o $(TARGETDIR)/lpc2k_pgm $(OBJS) `./mkstaticlist`
  
  obj/%.o : src/%.c
  	$(CC) $(CFLAGS) -c $< -o $@
  
  cksum_test: cksum_test.c uuencode.o cksum_test.o
  	$(CC) $(CFLAGS) -o $(TARGETDIR)/cksum_test obj/cksum_test.o obj/uuencode.o
  
  boot_2xxx.c boot_2xxx.h: boot_2xxx.armasm mkbootc
  	arm-none-eabi-as -o boot_2xxx.armobj boot_2xxx.armasm
  	arm-none-eabi-objdump -d boot_2xxx.armobj | ./mkbootc boot_2xxx
  
  boot_23xx.c boot_23xx.h: src/boot_23xx.armasm mkbootc
  	arm-none-eabi-as -o obj/boot_23xx.armobj src/boot_23xx.armasm
  	arm-none-eabi-objdump -d obj/boot_23xx.armobj | ./mkbootc boot_23xx
  
  clean:
  	rm -f bin/lpc2k_pgm cksum_test obj/*.o obj/*.d core core.* obj/*.armobj bin/pseudoterm
  
  install:
  	install -m 0755 bin/lpc2k_pgm $(prefix)/bin
  
  .PHONY: install
  
  obj/gui.o: src/gui.c
  	$(CC) $(CFLAGS) `gtk-config --cflags` -c src/gui.c -o obj/gui.o