Statistics
| Branch: | Revision:

ddr4s / fw / wiringPi / examples / Makefile @ 32:cadb9025f1e0

History | View | Annotate | Download (3.86 KB)

1
#
2
# Makefile:
3
#	wiringPi - A "wiring" library for the Raspberry Pi
4
#	https://projects.drogon.net/wiring-pi
5
#
6
#	Copyright (c) 2012-2015 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
ifneq ($V,1)
26
Q ?= @
27
endif
28

    
29
#DEBUG	= -g -O0
30
DEBUG	= -O3
31
INCLUDE	= -I/usr/local/include
32
CFLAGS	= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
33

    
34
LDFLAGS	= -L/usr/local/lib
35
LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt
36

    
37
# Should not alter anything below this line
38
###############################################################################
39

    
40
SRC	=	blink.c blink8.c blink12.c					\
41
		blink12drcs.c							\
42
		pwm.c								\
43
		speed.c wfi.c isr.c isr-osc.c					\
44
		lcd.c lcd-adafruit.c clock.c					\
45
		nes.c								\
46
		softPwm.c softTone.c 						\
47
		delayTest.c serialRead.c serialTest.c okLed.c ds1302.c		\
48
		lowPower.c							\
49
		max31855.c							\
50
		rht03.c
51

    
52
OBJ	=	$(SRC:.c=.o)
53

    
54
BINS	=	$(SRC:.c=)
55

    
56
all:	
57
	$Q cat README.TXT
58
	$Q echo "    $(BINS)" | fmt
59
	$Q echo ""
60

    
61
really-all:	$(BINS)
62

    
63
blink:	blink.o
64
	$Q echo [link]
65
	$Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
66

    
67
blink8:	blink8.o
68
	$Q echo [link]
69
	$Q $(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)
70

    
71
blink12drcs:	blink12drcs.o
72
	$Q echo [link]
73
	$Q $(CC) -o $@ blink12drcs.o $(LDFLAGS) $(LDLIBS)
74

    
75
blink12:	blink12.o
76
	$Q echo [link]
77
	$Q $(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)
78

    
79
speed:	speed.o
80
	$Q echo [link]
81
	$Q $(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
82

    
83
lcd:	lcd.o
84
	$Q echo [link]
85
	$Q $(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
86

    
87
lcd-adafruit:	lcd-adafruit.o
88
	$Q echo [link]
89
	$Q $(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)
90

    
91
clock:	clock.o
92
	$Q echo [link]
93
	$Q $(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)
94

    
95
wfi:	wfi.o
96
	$Q echo [link]
97
	$Q $(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
98

    
99
isr:	isr.o
100
	$Q echo [link]
101
	$Q $(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)
102

    
103
isr-osc:	isr-osc.o
104
	$Q echo [link]
105
	$Q $(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)
106

    
107
nes:	nes.o
108
	$Q echo [link]
109
	$Q $(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS) 
110

    
111
rht03:	rht03.o
112
	$Q echo [link]
113
	$Q $(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS) 
114

    
115
pwm:	pwm.o
116
	$Q echo [link]
117
	$Q $(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)
118

    
119
softPwm:	softPwm.o
120
	$Q echo [link]
121
	$Q $(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)
122

    
123
softTone:	softTone.o
124
	$Q echo [link]
125
	$Q $(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)
126

    
127
delayTest:	delayTest.o
128
	$Q echo [link]
129
	$Q $(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
130

    
131
serialRead:	serialRead.o
132
	$Q echo [link]
133
	$Q $(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
134

    
135
serialTest:	serialTest.o
136
	$Q echo [link]
137
	$Q $(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)
138

    
139
okLed:	okLed.o
140
	$Q echo [link]
141
	$Q $(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
142

    
143
tone:	tone.o
144
	$Q echo [link]
145
	$Q $(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
146

    
147
ds1302:	ds1302.o
148
	$Q echo [link]
149
	$Q $(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)
150

    
151
max31855:	max31855.o
152
	$Q echo [link]
153
	$Q $(CC) -o $@ max31855.o $(LDFLAGS) $(LDLIBS)
154

    
155
.c.o:
156
	$Q echo [CC] $<
157
	$Q $(CC) -c $(CFLAGS) $< -o $@
158

    
159
clean:
160
	$Q echo "[Clean]"
161
	$Q rm -f $(OBJ) *~ core tags $(BINS)
162

    
163
tags:	$(SRC)
164
	$Q echo [ctags]
165
	$Q ctags $(SRC)
166

    
167
depend:
168
	makedepend -Y $(SRC)
169

    
170
# DO NOT DELETE