Statistics
| Branch: | Revision:

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

History | View | Annotate | Download (1.47 KB)

1
#
2
# Makefile:
3
#	Gertboard - Examples using wiringPi
4
#
5
#	Copyright (c) 2013 Gordon Henderson
6
#################################################################################
7

    
8
ifneq ($V,1)
9
Q ?= @
10
endif
11

    
12
#DEBUG	= -g -O0
13
DEBUG	= -O3
14
CC	= gcc
15
INCLUDE	= -I/usr/local/include
16
CFLAGS	= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
17

    
18
LDFLAGS	= -L/usr/local/lib
19
LDLIBS    = -lwiringPi -lwiringPiDev -lpthread -lm
20

    
21
# Should not alter anything below this line
22
###############################################################################
23

    
24
SRC	=	gertboard.c				\
25
		buttons.c 7segments.c			\
26
		voltmeter.c temperature.c vumeter.c	\
27
		record.c
28

    
29
OBJ	=	$(SRC:.c=.o)
30

    
31
BINS	=	$(SRC:.c=)
32

    
33
all:	$(BINS)
34

    
35
gertboard:	gertboard.o
36
	$Q echo [link]
37
	$Q $(CC) -o $@ gertboard.o $(LDFLAGS) $(LDLIBS)
38

    
39
buttons:	buttons.o
40
	$Q echo [link]
41
	$Q $(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)
42

    
43
7segments:	7segments.o
44
	$Q echo [link]
45
	$Q $(CC) -o $@ 7segments.o $(LDFLAGS) $(LDLIBS)
46

    
47
voltmeter:	voltmeter.o
48
	$Q echo [link]
49
	$Q $(CC) -o $@ voltmeter.o $(LDFLAGS) $(LDLIBS)
50

    
51
temperature:	temperature.o
52
	$Q echo [link]
53
	$Q $(CC) -o $@ temperature.o $(LDFLAGS) $(LDLIBS)
54

    
55
vumeter:	vumeter.o
56
	$Q echo [link]
57
	$Q $(CC) -o $@ vumeter.o $(LDFLAGS) $(LDLIBS)
58

    
59
record:	record.o
60
	$Q echo [link]
61
	$Q $(CC) -o $@ record.o $(LDFLAGS) $(LDLIBS)
62

    
63
.c.o:
64
	$Q echo [CC] $<
65
	$Q $(CC) -c $(CFLAGS) $< -o $@
66

    
67
clean:
68
	$Q echo [Clean]
69
	$Q rm -f $(OBJ) *~ core tags $(BINS)
70

    
71
tags:	$(SRC)
72
	$Q echo [ctags]
73
	$Q ctags $(SRC)
74

    
75
depend:
76
	makedepend -Y $(SRC)
77

    
78
# DO NOT DELETE