Gordons Projects

--> Projects Top-Level GIT

Aded lcd-adafruit to test/drive the Adafruit RGB LCD plate
[wiringPi] / examples / Makefile
1 #
2 # Makefile:
3 #       wiringPi - Wiring Compatable library for the Raspberry Pi
4 #       https://projects.drogon.net/wiring-pi
5 #
6 #       Copyright (c) 2012 Gordon Henderson
7 #################################################################################
8 # This file is part of wiringPi:
9 #       Wiring Compatable library for the Raspberry Pi
10 #
11 #    wiringPi is free software: you can redistribute it and/or modify
12 #    it under the terms of the GNU Lesser General Public License as published by
13 #    the Free Software Foundation, either version 3 of the License, or
14 #    (at your option) any later version.
15 #
16 #    wiringPi is distributed in the hope that it will be useful,
17 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
18 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 #    GNU Lesser General Public License for more details.
20 #
21 #    You should have received a copy of the GNU Lesser General Public License
22 #    along with wiringPi.  If not, see <http://www.gnu.org/licenses/>.
23 #################################################################################
24
25
26 #DEBUG  = -g -O0
27 DEBUG   = -O3
28 CC      = gcc
29 INCLUDE = -I/usr/local/include
30 CFLAGS  = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
31
32 LDFLAGS = -L/usr/local/lib
33 LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
34
35 # Should not alter anything below this line
36 ###############################################################################
37
38 SRC     =       blink.c blink8.c blink12.c                                      \
39                 pwm.c                                                           \
40                 speed.c wfi.c isr.c isr-osc.c                                   \
41                 lcd.c lcd-adafruit.c clock.c                                    \
42                 nes.c                                                           \
43                 softPwm.c softTone.c                                            \
44                 delayTest.c serialRead.c serialTest.c okLed.c ds1302.c          \
45                 rht03.c
46
47 OBJ     =       $(SRC:.c=.o)
48
49 BINS    =       $(SRC:.c=)
50
51 all:    
52         @cat README.TXT
53         @echo "    $(BINS)" | fmt
54         @echo ""
55
56 really-all:     $(BINS)
57
58 blink:  blink.o
59         @echo [link]
60         @$(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
61
62 blink8: blink8.o
63         @echo [link]
64         @$(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)
65
66 blink12:        blink12.o
67         @echo [link]
68         @$(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)
69
70 speed:  speed.o
71         @echo [link]
72         @$(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
73
74 lcd:    lcd.o
75         @echo [link]
76         @$(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
77
78 lcd-adafruit:   lcd-adafruit.o
79         @echo [link]
80         @$(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)
81
82 clock:  clock.o
83         @echo [link]
84         @$(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)
85
86 wfi:    wfi.o
87         @echo [link]
88         @$(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
89
90 isr:    isr.o
91         @echo [link]
92         @$(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)
93
94 isr-osc:        isr-osc.o
95         @echo [link]
96         @$(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)
97
98 nes:    nes.o
99         @echo [link]
100         @$(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS) 
101
102 rht03:  rht03.o
103         @echo [link]
104         @$(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS) 
105
106 pwm:    pwm.o
107         @echo [link]
108         @$(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)
109
110 softPwm:        softPwm.o
111         @echo [link]
112         @$(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)
113
114 softTone:       softTone.o
115         @echo [link]
116         @$(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)
117
118 delayTest:      delayTest.o
119         @echo [link]
120         @$(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
121
122 serialRead:     serialRead.o
123         @echo [link]
124         @$(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
125
126 serialTest:     serialTest.o
127         @echo [link]
128         @$(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)
129
130 okLed:  okLed.o
131         @echo [link]
132         @$(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
133
134 tone:   tone.o
135         @echo [link]
136         @$(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
137
138 ds1302: ds1302.o
139         @echo [link]
140         @$(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)
141
142
143 .c.o:
144         @echo [CC] $<
145         @$(CC) -c $(CFLAGS) $< -o $@
146
147 clean:
148         @echo "[Clean]"
149         @rm -f $(OBJ) *~ core tags $(BINS)
150
151 tags:   $(SRC)
152         @echo [ctags]
153         @ctags $(SRC)
154
155 depend:
156         makedepend -Y $(SRC)
157
158 # DO NOT DELETE