-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
48 lines (33 loc) · 1.38 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
CC = g++
CFLAGS = -DRASPBERRY_PI -DBCM2835_NO_DELAY_COMPATIBILITY -fPIC
LIBS = -lbcm2835
RADIOHEADBASE = ./src
INCLUDE = -I$(RADIOHEADBASE)
all: libradiohead.so
libradiohead.so: RH_RF95.o RHMesh.o RHRouter.o RHReliableDatagram.o RHDatagram.o RasPi.o RHHardwareSPI.o RHSPIDriver.o RHGenericDriver.o RHGenericSPI.o adapter.o
$(CC) $(CFLAGS) -shared -o libradiohead.so *.o -lbcm2835
rm *.o
adapter.o: $(RADIOHEADBASE)/adapter.cpp
$(CC) $(CFLAGS) -c $(RADIOHEADBASE)/adapter.cpp $(INCLUDE)
RasPi.o: $(RADIOHEADBASE)/RHutil/RasPi.cpp
$(CC) $(CFLAGS) -c $(RADIOHEADBASE)/RHutil/RasPi.cpp $(INCLUDE)
RH_RF95.o: $(RADIOHEADBASE)/RH_RF95.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHMesh.o: $(RADIOHEADBASE)/RHMesh.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHRouter.o: $(RADIOHEADBASE)/RHRouter.cpp
$(CC) $(CFLAGS) -c $(INCLUDE) $<
RHReliableDatagram.o: $(RADIOHEADBASE)/RHReliableDatagram.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) $<
clean:
rm -rf *.o *.so *.pyc