File: Makefile

package info (click to toggle)
fwlogwatch 1.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 804 kB
  • ctags: 595
  • sloc: ansic: 5,465; lex: 1,371; php: 706; sh: 445; makefile: 145
file content (124 lines) | stat: -rw-r--r-- 4,423 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright (C) 2000-2004 Boris Wesslowski
# $Id: Makefile,v 1.73 2004/04/04 14:42:16 bw Exp $

# Linux
CC = gcc
CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
LDFLAGS = #-g #-static -p
LIBS = -lcrypt -lz #-lc_p

# Solaris
#LIBS = -lnsl -lsocket -lcrypt -lz
#
#CC = gcc
#CFLAGS = -DSOLARIS -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic #-g
#LDFLAGS = #-g
#
#CC = cc
#CFLAGS = -DSOLARIS -DHAVE_ZLIB -DHAVE_GETTEXT -v -fast -xCC

# OpenBSD
#CC = gcc
#CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall -I/usr/local/include
#LIBS = -L/usr/local/lib -lz -lintl

# FreeBSD
#CC = gcc
#CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall -I/usr/local/include
#LIBS = -L/usr/local/lib -lcrypt -lz -lintl

# You might want to add -DSHORT_NAMES to CFLAGS if you only intend to
# analyze log formats with short list/chain/branch/interface names like
# ipchains. You can also add -DLOGDOTS if your Cisco log host logs FQDNs
# and you only want the hostnames in the output.
# -DHAVE_IPV6 enables IPv6 support for the status web server.


LEX = flex
LFLAGS = -B #-f #-p -p -d

INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -s -m 0755
INSTALL_SCRIPT = $(INSTALL) -m 0755
INSTALL_DATA = $(INSTALL) -m 0644
# Debianized by Alberto Gonzalez Iniesta <agi@agi.as> Wed, 27 Mar 2002
DESTDIR = 
INSTALL_DIR = $(DESTDIR)/usr
CONF_DIR = $(DESTDIR)/etc
LOCALE_DIR = $(DESTDIR)/usr

OBJS = cisco_ios.o cisco_pix.o compare.o ipchains.o ipfilter.o ipfw.o \
       lancom.o main.o modes.o net.o netfilter.o netscreen.o output.o \
       parser.o rcfile.o report.o resolve.o response.o snort.o utils.o \
       whois.o win_xp.o

all:	fwlogwatch

cisco_ios.o:	main.h utils.h
cisco_pix.o:	main.h utils.h
compare.o:	compare.h main.h output.h utils.h
ipchains.o:	main.h utils.h
ipfilter.o:	main.h utils.h
ipfw.o:		main.h utils.h
lancom.o:	main.h utils.h
main.o:		main.h modes.h parser.h rcfile.h utils.h
modes.o:	compare.h main.h net.h output.h parser.h rcfile.h report.h \
		resolve.h response.h utils.h whois.h
net.o:		compare.h main.h output.h resolve.h response.h utils.h
netfilter.o:	main.h utils.h
netscreen.o:	main.h utils.h
output.o:	main.h output.h resolve.h utils.h whois.h
parser.o:	cisco_ios.h cisco_pix.h compare.h ipchains.h ipfilter.h \
		ipfw.h main.h netfilter.h netscreen.h parser.h snort.h \
		win_xp.h
rcfile.o:	main.h parser.h rcfile.h utils.h
report.o:	main.h output.h resolve.h response.h utils.h
resolve.o:	main.h resolve.h utils.h
response.o:	main.h response.h utils.h
snort.o:	main.h utils.h
utils.o:	main.h
whois.o:	main.h utils.h
win_xp.o:	main.h utils.h

fwlogwatch:	$(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

install:	all
	$(INSTALL_PROGRAM) fwlogwatch $(INSTALL_DIR)/sbin/fwlogwatch
	$(INSTALL_SCRIPT) contrib/fwlw_notify $(CONF_DIR)/fwlogwatch/fwlw_notify
	$(INSTALL_SCRIPT) contrib/fwlw_respond $(CONF_DIR)/fwlogwatch/fwlw_respond
	$(INSTALL_DATA) fwlogwatch.8 $(INSTALL_DIR)/share/man/man8/fwlogwatch.8

install-config:
	$(INSTALL_DATA) fwlogwatch.config $(CONF_DIR)/fwlogwatch/fwlogwatch.config
	$(INSTALL_DATA) fwlogwatch.template $(CONF_DIR)/fwlogwatch/fwlogwatch.template

install-i18n:
	cd po; make
	$(INSTALL_DATA) po/de.mo $(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo
	$(INSTALL_DATA) po/ja.mo $(LOCALE_DIR)/share/locale/ja/LC_MESSAGES/fwlogwatch.mo
	$(INSTALL_DATA) po/pt_BR.mo $(LOCALE_DIR)/share/locale/pt_BR/LC_MESSAGES/fwlogwatch.mo
	$(INSTALL_DATA) po/sv.mo $(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo
	$(INSTALL_DATA) po/zh_CN.mo $(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo
	$(INSTALL_DATA) po/zh_TW.mo $(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo

install-rhinit:
	$(INSTALL_SCRIPT) contrib/fwlogwatch.init.redhat $(CONF_DIR)/rc.d/init.d/fwlogwatch

uninstall:
	@rm -f $(INSTALL_DIR)/sbin/fwlogwatch \
		$(CONF_DIR)/fwlw_notify \
		$(CONF_DIR)/fwlw_respond \
		$(INSTALL_DIR)/share/man/man8/fwlogwatch.8 \
		$(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo \
		$(LOCALE_DIR)/share/locale/ja/LC_MESSAGES/fwlogwatch.mo \
		$(LOCALE_DIR)/share/locale/pt_BR/LC_MESSAGES/fwlogwatch.mo \
		$(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo \
		$(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo \
		$(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo \
		$(CONF_DIR)/fwlogwatch.config \
		$(CONF_DIR)/fwlogwatch.template

clean:
	rm -f *.o *~ *.bak fwlogwatch
	cd po; make clean