-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (34 loc) · 1.44 KB
/
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
43
44
45
46
47
48
# Makefile
# Sample for RH_RF95 (client and server) on Raspberry Pi
# Caution: requires bcm2835 library to be already installed
# http://www.airspayce.com/mikem/bcm2835/
CC = g++
CFLAGS = -DRASPBERRY_PI -DBCM2835_NO_DELAY_COMPATIBILITY -D__BASEFILE__=\"$*\"
LIBS = -lbcm2835
RADIOHEADBASE = ../../..
INCLUDE = -I$(RADIOHEADBASE)
all: lora_send lora_recv
RasPi.o: $(RADIOHEADBASE)/RHutil/RasPi.cpp
$(CC) $(CFLAGS) -c $(RADIOHEADBASE)/RHutil/RasPi.cpp $(INCLUDE)
lora_send.o: lora_send.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
lora_recv.o: lora_recv.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RH_RF95.o: $(RADIOHEADBASE)/RH_RF95.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHDatagram.o: $(RADIOHEADBASE)/RHDatagram.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHHardwareSPI.o: $(RADIOHEADBASE)/RHHardwareSPI.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHSPIDriver.o: $(RADIOHEADBASE)/RHSPIDriver.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHGenericDriver.o: $(RADIOHEADBASE)/RHGenericDriver.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHGenericSPI.o: $(RADIOHEADBASE)/RHGenericSPI.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
lora_send: lora_send.o RH_RF95.o RasPi.o RHHardwareSPI.o RHGenericDriver.o RHGenericSPI.o RHSPIDriver.o
$(CC) $^ $(LIBS) -o lora_send
lora_recv: lora_recv.o RH_RF95.o RasPi.o RHHardwareSPI.o RHGenericDriver.o RHGenericSPI.o RHSPIDriver.o
$(CC) $^ $(LIBS) -o lora_recv
clean:
rm -rf *.o lora_send lora_recv