Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 # Copyright (C) 2000-2013 Boris Wesslowski
2 # $Id: Makefile 731 2013-05-17 14:15:23Z bw $
3
4 # You might want to add -DSHORT_NAMES to CFLAGS if you only intend to analyze
5 # log formats with short list/chain/branch/interface names like ipchains.
6 # You can also add -DLOGDOTS if your Cisco log host logs FQDNs and you only
7 # want the host names in the output.
8 # -DHAVE_ZLIB enables support for gzip compressed files.
9 # -DHAVE_GETTEXT enables localization support.
10 # -DHAVE_ADNS enables support for asynchronous DNS lookups.
11
12 # Linux
13 CC = gcc
•14 CFLAGS += -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
15 LDFLAGS ?= -s #-g #-static -p
16 LIBS = -lcrypt -lz #-ladns #-lc_p
17
18 # Mac OS X
19 #CC = gcc
20 #CFLAGS = -DHAVE_ZLIB -pipe -O2 -Wall
21 #LIBS = -lz
22
23 # Solaris
24 #LIBS = -lnsl -lsocket -lcrypt -lz
25 #
26 #CC = gcc
27 #CFLAGS = -DSOLARIS -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic #-g
28 #LDFLAGS = #-g
29 #
30 #CC = cc
31 #CFLAGS = -DSOLARIS -DHAVE_ZLIB -DHAVE_GETTEXT -v -fast -xCC
32
33 # OpenBSD
34 #CC = gcc
35 #CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall -I/usr/local/include
36 #LIBS = -L/usr/local/lib -lz -lintl
37
38 # FreeBSD
39 #CC = gcc
40 #CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall -I/usr/local/include
41 #LIBS = -L/usr/local/lib -lcrypt -lz -lintl
42
43
44 LEX = flex
45 LFLAGS = -B --nounput #-f #-p -p -d
46
47 INSTALL = install
48 INSTALL_PROGRAM = $(INSTALL) -m 0755
49 INSTALL_SCRIPT = $(INSTALL) -m 0755
50 INSTALL_DATA = $(INSTALL) -m 0644
•51 DESTDIR = /usr
52 CONF_DIR = /etc
53 LOCALE_DIR = /usr
54
55 OBJS = cisco_ios.o cisco_pix.o compare.o ipchains.o ipfilter.o ipfw.o \
56 lancom.o main.o modes.o net.o netfilter.o netscreen.o output.o \
57 parser.o rcfile.o resolve.o response.o snort.o utils.o whois.o
58
59 all: fwlogwatch
60
61 cisco_ios.o: main.h utils.h
62 cisco_pix.o: main.h utils.h
63 compare.o: compare.h main.h output.h utils.h
64 ipchains.o: main.h utils.h
65 ipfilter.o: main.h utils.h
66 ipfw.o: main.h utils.h
67 lancom.o: main.h utils.h
68 main.o: main.h modes.h parser.h rcfile.h utils.h
69 modes.o: compare.h main.h net.h output.h parser.h rcfile.h \
70 resolve.h response.h utils.h whois.h
71 net.o: compare.h main.h output.h resolve.h response.h utils.h
72 netfilter.o: main.h utils.h
73 netscreen.o: main.h utils.h
74 output.o: main.h output.h resolve.h utils.h whois.h
75 parser.o: cisco_ios.h cisco_pix.h compare.h ipchains.h ipfilter.h \
76 ipfw.h main.h netfilter.h netscreen.h parser.h snort.h
77 rcfile.o: main.h parser.h rcfile.h utils.h
78 resolve.o: main.h resolve.h utils.h
79 response.o: main.h response.h utils.h
80 snort.o: main.h utils.h
81 utils.o: main.h
82 whois.o: main.h utils.h
83
84 fwlogwatch: $(OBJS)
85 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
86
87 install: all
•88 $(INSTALL_PROGRAM) fwlogwatch $(DESTDIR)/usr/sbin/fwlogwatch
89 $(INSTALL_SCRIPT) contrib/fwlw_notify $(DESTDIR)/usr/sbin/fwlw_notify
90 $(INSTALL_SCRIPT) contrib/fwlw_respond $(DESTDIR)/usr/sbin/fwlw_respond
91 $(INSTALL_DATA) fwlogwatch.8 $(DESTDIR)/usr/share/man/man8/fwlogwatch.8
92
93 install-config:
•94 $(INSTALL_DATA) fwlogwatch.config $(CONF_DIR)/fwlogwatch/fwlogwatch.config
95
96 install-i18n:
97 cd po; make
98 $(INSTALL_DATA) po/de.mo $(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo
99 $(INSTALL_DATA) po/ja.mo $(LOCALE_DIR)/share/locale/ja/LC_MESSAGES/fwlogwatch.mo
100 $(INSTALL_DATA) po/pt.mo $(LOCALE_DIR)/share/locale/pt/LC_MESSAGES/fwlogwatch.mo
101 $(INSTALL_DATA) po/sv.mo $(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo
102 $(INSTALL_DATA) po/zh_CN.mo $(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo
103 $(INSTALL_DATA) po/zh_TW.mo $(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo
104
105 install-rhinit:
106 $(INSTALL_SCRIPT) contrib/fwlogwatch.init.redhat $(CONF_DIR)/rc.d/init.d/fwlogwatch
107
108 uninstall:
•109 @rm -f $(DESTDIR)/usr/sbin/fwlogwatch \
110 $(DESTDIR)/usr/sbin/fwlw_notify \
111 $(DESTDIR)/usr/sbin/fwlw_respond \
112 $(DESTDIR)/usr/share/man/man8/fwlogwatch.8 \
113 $(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo \
114 $(LOCALE_DIR)/share/locale/ja/LC_MESSAGES/fwlogwatch.mo \
115 $(LOCALE_DIR)/share/locale/pt/LC_MESSAGES/fwlogwatch.mo \
116 $(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo \
117 $(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo \
118 $(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo \
•119 $(CONF_DIR)/fwlogwatch/fwlogwatch.config \
120
121 clean:
122 rm -f *.o *~ *.bak fwlogwatch
123 cd po; make clean
124
125 indent:
126 indent --k-and-r-style --indent-level 2 --line-length 180 *.c *.h