Gordons Projects

--> Projects Top-Level GIT

wiringPi Version 2 - First commit (of v2)
[wiringPi] / examples / Gertboard / Makefile
1 #
2 # Makefile:
3 #       Gertboard - Examples using wiringPi
4 #
5 #       Copyright (c) 2013 Gordon Henderson
6 #################################################################################
7
8 #DEBUG  = -g -O0
9 DEBUG   = -O3
10 CC      = gcc
11 INCLUDE = -I/usr/local/include
12 CFLAGS  = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
13
14 LDFLAGS = -L/usr/local/lib
15 LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
16
17 # Should not alter anything below this line
18 ###############################################################################
19
20 SRC     =       gertboard.c                             \
21                 buttons.c 7segments.c                   \
22                 voltmeter.c temperature.c vumeter.c     \
23                 record.c
24
25 OBJ     =       $(SRC:.c=.o)
26
27 BINS    =       $(SRC:.c=)
28
29 all:    $(BINS)
30
31 gertboard:      gertboard.o
32         @echo [link]
33         @$(CC) -o $@ gertboard.o $(LDFLAGS) $(LDLIBS)
34
35 buttons:        buttons.o
36         @echo [link]
37         @$(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)
38
39 7segments:      7segments.o
40         @echo [link]
41         @$(CC) -o $@ 7segments.o $(LDFLAGS) $(LDLIBS)
42
43 voltmeter:      voltmeter.o
44         @echo [link]
45         @$(CC) -o $@ voltmeter.o $(LDFLAGS) $(LDLIBS)
46
47 temperature:    temperature.o
48         @echo [link]
49         @$(CC) -o $@ temperature.o $(LDFLAGS) $(LDLIBS)
50
51 vumeter:        vumeter.o
52         @echo [link]
53         @$(CC) -o $@ vumeter.o $(LDFLAGS) $(LDLIBS)
54
55 record: record.o
56         @echo [link]
57         @$(CC) -o $@ record.o $(LDFLAGS) $(LDLIBS)
58
59 .c.o:
60         @echo [CC] $<
61         @$(CC) -c $(CFLAGS) $< -o $@
62
63 clean:
64         @echo [Clean]
65         @rm -f $(OBJ) *~ core tags $(BINS)
66
67 tags:   $(SRC)
68         @echo [ctags]
69         @ctags $(SRC)
70
71 depend:
72         makedepend -Y $(SRC)
73
74 # DO NOT DELETE