-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
34 lines (25 loc) · 884 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
# définition des variables
CFLAGS = -W -Wall -v -g
LDFLAGS=-pthread -ldl -lrt -lnfc_nci_linux
EXEC=HandoverDemo
INSTALL_DEMO_PATH ?= $(INSTALL_PATH)/usr/bin
# all
all: $(EXEC)
$(EXEC): main.o LibNfcManager.o Demo.o
$(CXX) main.o LibNfcManager.o Demo.o -o $(EXEC) $(LDFLAGS)
Demo.o : ./src/Demo.cpp ./inc/Demo.hpp
$(CXX) $(LDFLAGS) -c ./src/Demo.cpp -o Demo.o $(CFLAGS)
LibNfcManager.o : ./src/LibNfcManager.cpp ./inc/LibNfcManager.hpp
$(CXX) $(LDFLAGS) -c ./src/LibNfcManager.cpp -o LibNfcManager.o $(CFLAGS)
main.o: ./src/main.cpp ./inc/LibNfcManager.hpp ./inc/Demo.hpp
$(CXX) $(LDFLAGS) -c ./src/main.cpp -o main.o $(CFLAGS)
install: all
mkdir -p $(INSTALL_DEMO_PATH)
install -m 755 $(EXEC) $(INSTALL_DEMO_PATH)
# clean
clean:
rm -rf *.bak rm -rf *.o
# mrproper
mrproper: clean
rm -rf $(EXEC)
.PHONY: all install clean mrproper