-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (29 loc) · 1.18 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
#out-of-tree build is supported by copying the Makefile to
#the build directory and editing the srcdir= to contain
#the path to the wavedcc director.
srcdir=
#to cross-compile, add the target architecture to the CC
#value, e.g. CC=aarch64-linux-g++. Your path needs to
#include the location of the build tools.
CC=g++
#umcomment for libpigpio:
#CFLAGS=-Wall -pthread
#LDFLAGS=-pthread -lpigpio -lrt
#or, uncomment for libpigpiod:
CFLAGS=-Wall -pthread -DUSE_PIGPIOD_IF
LDFLAGS=-pthread -lpigpiod_if2 -lrt
all: wavedccd wavedcc
wavedccd: wavedccd.o dccengine.o dccpacket.o
$(CC) -o wavedccd wavedccd.o dccpacket.o dccengine.o $(LDFLAGS)
wavedccd.o: $(srcdir)wavedccd.cpp $(srcdir)dccengine.h
$(CC) $(CFLAGS) -o wavedccd.o -c $(srcdir)wavedccd.cpp
wavedcc: wavedcc.o dccengine.o dccpacket.o
$(CC) -o wavedcc wavedcc.o dccpacket.o dccengine.o $(LDFLAGS)
wavedcc.o: $(srcdir)wavedcc.cpp $(srcdir)dccengine.h
$(CC) $(CFLAGS) -o wavedcc.o -c $(srcdir)wavedcc.cpp
dccengine.o: $(srcdir)dccengine.cpp
$(CC) $(CFLAGS) -o dccengine.o -c $(srcdir)dccengine.cpp
dccpacket.o: $(srcdir)dccpacket.cpp
$(CC) $(CFLAGS) -o dccpacket.o -c $(srcdir)dccpacket.cpp
clean:
rm -rf *.o wavedccd wavedcc