Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 #
2 # Copyright (C) 2002 - present Phil Dibowitz.
3 #
4 # See iptstate.cc for copyright info
5 #
6 # Makefile for IPTState
7 #
8
9 ### USERS CAN CHANGE STUFF HERE
10
•11 PREFIX?=$(CURDIR)/debian/iptstate/usr
12 SBIN?=$(PREFIX)/sbin
13 INSTALL?=/usr/bin/install
•14 #STRIP?=/usr/bin/strip
15 MAN?=$(PREFIX)/share/man
16 PKG_CONFIG?=pkg-config
17
18 ### ADVANCED USERS AND PACKAGERS MIGHT WANT TO CHANGE THIS
19
20 CXX?= g++
21 # All of our snprintf()s have size limits and are not a security issue,
22 # but having to modulo every hours/second/minute variable in every snprintf
23 # is the only way to work around format-truncation warning which is cumbersome
24 # and hard to read. Hence -Wformat-truncation=0
25 CXXFLAGS?= -g -Wall -O2 -Werror=format-security -Wformat-truncation=0
26 CXXFILES?= iptstate.cc
27
28 # THIS IS FOR NORMAL COMPILATION
29 LIBS?= $(shell $(PKG_CONFIG) --libs ncurses libnetfilter_conntrack)
30
31 ### YOU SHOULDN'T NEED TO CHANGE ANYTHING BELOW THIS
32
33 all: iptstate
34
35
36 iptstate: iptstate.cc Makefile
37 @\
38 echo "+------------------------------------------------------------+" ;\
39 echo "| Welcome to IP Tables State by Phil Dibowitz |" ;\
40 echo "| |" ;\
41 echo "| PLEASE read the LICENSE and the README for important info. |" ;\
42 echo "| |" ;\
43 echo "| You may also wish to read the README for install info, |" ;\
44 echo "| the WISHLIST for upcoming features, BUGS for known bugs |" ;\
45 echo "| and info on bug reports, and the Changelog to find out |" ;\
46 echo "| what's new. |" ;\
47 echo "| |" ;\
48 echo "| Let's compile... |" ;\
49 echo "+------------------------------------------------------------+" ;\
50 echo "";
51
52 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CXXFILES) -o iptstate $(LIBS)
53 @touch iptstate
54
55 @\
56 echo "" ;\
57 echo "All done. Do 'make install' as root and you should be set to go!" ;\
58 echo ""
59
•60 #strip: iptstate
61 # $(STRIP) iptstate
62 # @touch strip
63
64
65 install:
•66 $(INSTALL) -D -o root -g root --mode=755 iptstate $(SBIN)/iptstate
67 $(INSTALL) -D --mode=444 iptstate.8 $(MAN)/man8/iptstate.8
68
69
70 clean:
71 /bin/rm -rf iptstate
•72 # /bin/rm -rf strip
73
74
75 uninstall:
76 /bin/rm -rf $(SBIN)/iptstate
77 /bin/rm -rf $(MAN)/man1/iptstate.1
78 /bin/rm -rf $(MAN)/man8/iptstate.8
79