-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
42 lines (33 loc) · 971 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#############################################################################
#
# Makefile for RF24toTUN
#
# License: MIT
# Author: Rei <devel@reixd.net>
# Date: 22.08.2014
#
# Description:
# ------------
# use make all and make install to install the examples
# You can change the install directory by editing the prefix line
#
prefix := /usr/local
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -std=c++0x
# The needed libraries
LIBS=-lrf24-bcm -lrf24network -lboost_thread -lboost_system
# define all programs
PROGRAMS = rf24totun
SOURCES = rf24totun.cpp
all: ${PROGRAMS}
${PROGRAMS}: ${SOURCES}
g++ ${CCFLAGS} -W -pedantic -Wall ${LIBS} $@.cpp -o $@
clean:
rm -rf $(PROGRAMS)
install: all
test -d $(prefix) || mkdir $(prefix)
test -d $(prefix)/bin || mkdir $(prefix)/bin
for prog in $(PROGRAMS); do \
install -m 0755 $$prog $(prefix)/bin; \
done
.PHONY: install