Gordons Projects

--> Projects Top-Level GIT

Minor changes to the files and removed a bit of debug.
[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                 blink12drcs.c                                                   \
40                 pwm.c                                                           \
41                 speed.c wfi.c isr.c isr-osc.c                                   \
42                 lcd.c lcd-adafruit.c clock.c                                    \
43                 nes.c                                                           \
44                 softPwm.c softTone.c                                            \
45                 delayTest.c serialRead.c serialTest.c okLed.c ds1302.c          \
46                 rht03.c piglow.c
47
48 OBJ     =       $(SRC:.c=.o)
49
50 BINS    =       $(SRC:.c=)
51
52 all:    
53         @cat README.TXT
54         @echo "    $(BINS)" | fmt
55         @echo ""
56
57 really-all:     $(BINS)
58
59 blink:  blink.o
60         @echo [link]
61         @$(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
62
63 blink8: blink8.o
64         @echo [link]
65         @$(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)
66
67 blink12drcs:    blink12drcs.o
68         @echo [link]
69         @$(CC) -o $@ blink12drcs.o $(LDFLAGS) $(LDLIBS)
70
71 blink12:        blink12.o
72         @echo [link]
73         @$(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)
74
75 speed:  speed.o
76         @echo [link]
77         @$(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
78
79 lcd:    lcd.o
80         @echo [link]
81         @$(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
82
83 lcd-adafruit:   lcd-adafruit.o
84         @echo [link]
85         @$(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)
86
87 clock:  clock.o
88         @echo [link]
89         @$(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)
90
91 wfi:    wfi.o
92         @echo [link]
93         @$(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
94
95 isr:    isr.o
96         @echo [link]
97         @$(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)
98
99 isr-osc:        isr-osc.o
100         @echo [link]
101         @$(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)
102
103 nes:    nes.o
104         @echo [link]
105         @$(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS) 
106
107 rht03:  rht03.o
108         @echo [link]
109         @$(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS) 
110
111 pwm:    pwm.o
112         @echo [link]
113         @$(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)
114
115 softPwm:        softPwm.o
116         @echo [link]
117         @$(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)
118
119 softTone:       softTone.o
120         @echo [link]
121         @$(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)
122
123 delayTest:      delayTest.o
124         @echo [link]
125         @$(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
126
127 serialRead:     serialRead.o
128         @echo [link]
129         @$(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
130
131 serialTest:     serialTest.o
132         @echo [link]
133         @$(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)
134
135 okLed:  okLed.o
136         @echo [link]
137         @$(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
138
139 tone:   tone.o
140         @echo [link]
141         @$(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
142
143 ds1302: ds1302.o
144         @echo [link]
145         @$(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)
146
147 piglow: piglow.o
148         @echo [link]
149         @$(CC) -o $@ piglow.o $(LDFLAGS) $(LDLIBS)
150
151
152 .c.o:
153         @echo [CC] $<
154         @$(CC) -c $(CFLAGS) $< -o $@
155
156 clean:
157         @echo "[Clean]"
158         @rm -f $(OBJ) *~ core tags $(BINS)
159
160 tags:   $(SRC)
161         @echo [ctags]
162         @ctags $(SRC)
163
164 depend:
165         makedepend -Y $(SRC)
166
167 # DO NOT DELETE