forked from CutePoisonX/PoisonConvert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·53 lines (38 loc) · 997 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
43
44
45
46
47
48
49
50
51
52
53
CXX=g++ -I/opt/include -L/lib/ -I./tclap-1.2.1/include/
CXXFLAGS=-c -Wall -g
LDFLAGS=
SOURCES = $(wildcard *.cpp)
OBJECTS = ${SOURCES:.cpp=.o}
CONFDESTDIR = /usr/syno/etc
DESTDIR = /usr/syno/bin
CONFDIRNAME = PoisonConvert_Config-files
SETTINGS_FILE = /usr/syno/etc/PoisonConvert_Settings
TITLE = poisonconvert
ARCHIVE=$(TITLE).tar.gz
.PHONY : all clean debug valgrind archive
all: $(TITLE)
$(TITLE): $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $(OBJECTS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ $< -MMD -MF ./[email protected]
clean :
rm -f ~* *.o *.gch *.d
cleanw :
del ~*
del *.o
del *.gch
del /q *.d
debug : $(TITLE)
cgdb ./$<
valgrind : $(TITLE)
valgrind --tool=memcheck --leak-check=yes ./$<
archive :
tar cfz $(ARCHIVE) --ignore-failed-read *.cpp *.h *.pdf Makefile
install:
install --mode=755 $(TITLE) $(DESTDIR)/
cp -r $(CONFDIRNAME)/ $(CONFDESTDIR)/$(CONFDIRNAME)/
uninstall:
rm $(DESTDIR)/$(TITLE)
rm $(SETTINGS_FILE)
rm -r $(CONFDESTDIR)/$(CONFDIRNAME)
-include $(wildcard ./*.d)