Gordons Projects

--> Projects Top-Level GIT

Added new SPI driver helpers.
[wiringPi] / wiringPi / Makefile
1 #
2 # Makefile:
3 #       wiringPi - Wiring Compatable library for the Raspberry Pi
4 #
5 #       Copyright (c) 2012 Gordon Henderson
6 #################################################################################
7 # This file is part of wiringPi:
8 #       https://projects.drogon.net/raspberry-pi/wiringpi/
9 #
10 #    wiringPi is free software: you can redistribute it and/or modify
11 #    it under the terms of the GNU Lesser General Public License as published by
12 #    the Free Software Foundation, either version 3 of the License, or
13 #    (at your option) any later version.
14 #
15 #    wiringPi is distributed in the hope that it will be useful,
16 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
17 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 #    GNU Lesser General Public License for more details.
19 #
20 #    You should have received a copy of the GNU Lesser General Public License
21 #    along with wiringPi.  If not, see <http://www.gnu.org/licenses/>.
22 #################################################################################
23
24
25 TARGET=libwiringPi.a
26
27 #DEBUG  = -g -O0
28 DEBUG   = -O3
29 CC      = gcc
30 INCLUDE = -I.
31 CFLAGS  = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
32
33 LIBS    =
34
35 # Should not alter anything below this line
36 ###############################################################################
37
38 SRC     =       wiringPi.c wiringPiFace.c wiringSerial.c wiringShift.c  \
39                 gertboard.c                                             \
40                 piNes.c                                                 \
41                 lcd.c piHiPri.c piThread.c softPwm.c wiringPiSPI.c
42
43 OBJ     =       wiringPi.o wiringPiFace.o wiringSerial.o wiringShift.o  \
44                 gertboard.o                                             \
45                 piNes.o                                                 \
46                 lcd.o piHiPri.o piThread.o softPwm.o wiringPiSPI.o
47
48 all:            $(TARGET)
49
50 $(TARGET):      $(OBJ)
51         @echo [AR] $(OBJ)
52         @ar rcs $(TARGET) $(OBJ)
53         @ranlib $(TARGET)
54         @size   $(TARGET)
55
56 .c.o:
57         @echo [CC] $<
58         @$(CC) -c $(CFLAGS) $< -o $@
59
60 clean:
61         rm -f $(OBJ) $(TARGET) *~ core tags Makefile.bak
62
63 tags:   $(SRC)
64         @echo [ctags]
65         @ctags $(SRC)
66
67 depend:
68         makedepend -Y $(SRC)
69
70 install:        $(TARGET)
71         @echo [install]
72         install -m 0755 -d /usr/local/lib
73         install -m 0755 -d /usr/local/include
74         install -m 0644 wiringPi.h      /usr/local/include
75         install -m 0644 wiringSerial.h  /usr/local/include
76         install -m 0644 wiringShift.h   /usr/local/include
77         install -m 0644 gertboard.h     /usr/local/include
78         install -m 0644 piNes.h         /usr/local/include
79         install -m 0644 softPwm.h       /usr/local/include
80         install -m 0644 lcd.h           /usr/local/include
81         install -m 0644 wiringPiSPI.h   /usr/local/include
82         install -m 0644 libwiringPi.a   /usr/local/lib
83
84 uninstall:
85         @echo [uninstall]
86         rm -f /usr/local/include/lcd.h
87         rm -f /usr/local/include/lpiNes.h
88         rm -f /usr/local/include/gertboard.h
89         rm -f /usr/local/include/wiringShift.h
90         rm -f /usr/local/include/wiringSerial.h
91         rm -f /usr/local/include/wiringPi.h
92         rm -f /usr/local/lib/libwiringPi.a
93
94
95 # DO NOT DELETE
96
97 wiringPi.o: wiringPi.h
98 wiringPiFace.o: wiringPi.h
99 wiringSerial.o: wiringSerial.h
100 wiringShift.o: wiringPi.h wiringShift.h
101 gertboard.o: gertboard.h
102 piNes.o: wiringPi.h piNes.h
103 lcd.o: wiringPi.h lcd.h
104 piHiPri.o: wiringPi.h
105 piThread.o: wiringPi.h