Sun, 25 May 2014 16:39:54 +0200
Log allways
20
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | # Makefile for the mbsePi-apps/thermometers. |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | include ../Makefile.global |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | SRCS = recv.c send.c sniffer.c |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | HDRS = recv.h send.h sniffer.h |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | OBJS = recv.o send.o sniffer.o |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | SLIBS = ../lib/libmbse.a |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | TARGET = recv send sniffer |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | OTHER = Makefile |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | ############################################################################# |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | .c.o: |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | all: ${TARGET} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | recv: recv.o ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | ${CC} -o recv recv.o ${LDFLAGS} ${LIBS} ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | send: send.o ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | ${CC} -o send send.o ${LDFLAGS} ${LIBS} ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | sniffer: sniffer.o ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | ${CC} -o sniffer sniffer.o ${LDFLAGS} ${LIBS} ${SLIBS} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | clean: |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | install: all |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | ${INSTALL} -c -s -g root -o root -m 0755 ${TARGET} ${BINDIR} |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | filelist: Makefile |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | BASE=`pwd`; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | BASE=`basename $${BASE}`; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | depend: |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | @rm -f Makefile.bak; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | mv Makefile Makefile.bak; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | >>Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | for f in ${SRCS}; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | do \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | ${ECHO} "Dependencies for $$f:\c"; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | for h in `sed -n -e \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
50 | 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | do \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | ${ECHO} " $$h\c"; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | ${ECHO} " $$h\c" >>Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | done; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | ${ECHO} " done."; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | ${ECHO} "" >>Makefile; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | done; \ |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | ${ECHO} '# End of generated dependencies' >>Makefile |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
59 | |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | # Dependencies generated by make depend |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
62 | recv.o: ../lib/mbselib.h recv.h |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | send.o: ../lib/mbselib.h send.h |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | sniffer.o: ../lib/mbselib.h sniffer.h |
f7f9463cdefd
Added 433 MHz transmitter and receiver library and demo programs
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | # End of generated dependencies |