File: Makefile

package info (click to toggle)
filter 2.6.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, jessie, jessie-kfreebsd, lenny, sarge, squeeze, wheezy
  • size: 728 kB
  • ctags: 706
  • sloc: ansic: 4,033; sh: 3,932; makefile: 198
file content (107 lines) | stat: -rwxr-xr-x 2,100 bytes parent folder | download | duplicates (2)
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
# Variables
#	Variables established by Configure
CC		=	cc
CCFLAGS		=	 
CHGRP		=	/bin/chgrp
CHMOD		=	/bin/chmod
CP		=	/bin/cp
DEST		=	$(DESTDIR)/usr/bin
ECHO		=	/bin/echo
LFLAGS		=	 
LIB		=	
LIB2		= 	
LIBS		=	-lcurses 
LINT		=	lint
MAILGRP		=	mail
MAILERMODE	=	2755
MAKE		=	/usr/bin/make
MV		=	/bin/mv
OPTIMIZE	=	-O
RM		= 	/bin/rm -f
TOUCH		=	/bin/touch


#	Variables you may want to manually edit
#		If you want debug logging then you'll
#		want to uncomment the following.
#DEBUG		=	-DDEBUG

#	Other variables
CFLAGS		=	$(CCFLAGS) $(OPTIMIZE) $(DEBUG) $(DACSNET) 

# Definitions of variables
FILTER_SRC	=	actions.c	\
			filter.c	\
			lock.c		\
			parse.c		\
			regexp.c	\
			rules.c		\
			summarize.c	\
			utils.c		\
			audit.c		\
			istrcmp.c	\
			mk_lockname.c	\
			strtokq.c

FILTER_OBJ	=	actions.o	\
			filter.o	\
			lock.o		\
			parse.o		\
			regexp.o	\
			rules.o		\
			summarize.o	\
			utils.o		\
			audit.o		\
			istrcmp.o	\
			mk_lockname.o	\
			strtokq.o


# Standard targets
all:		filter

install:	$(DEST)/filter
	(cd doc && $(MAKE) DESTDIR=$(DESTDIR) $(MFLAGS) install)	

uninstall:	
		$(RM) $(DEST)/filter

clean:		
		$(RM) $(FILTER_OBJ) filter core

reallyclean:	clean
		$(RM) config.sh

# Dependencies and rules
#	Dependencies of header files upon other header files they include
.PRECIOUS:		defs.h 

defs.h:	config.h 
	$(CHMOD) u+w $@
	$(TOUCH) $@


#	Dependencies and rules for C object files
actions.o:		defs.h filter.h s_filter.h
filter.o:		defs.h filter.h s_filter.h version.h
lock.o:			defs.h filter.h s_filter.h
parse.o:		defs.h filter.h s_filter.h
regexp.o:		defs.h regexp.h
rules.o:		defs.h filter.h s_filter.h
summarize.o:		defs.h filter.h s_filter.h
utils.o:		defs.h filter.h s_filter.h
audit.o:		defs.h filter.h s_filter.h

#	Dependencies and rules for compiling programs
filter:	$& $(FILTER_OBJ)
	$(CC) $(LFLAGS) -o $@ $(FILTER_OBJ)

#	Dependencies and rules for installing programs from bin directory
$(DEST)/filter:		filter
			-$(MV) $(DEST)/filter $(DEST)/filter.old
			-$(RM) $(DEST)/filter.old
			$(CP) $? $@
			$(CHGRP) $(MAILGRP) $@
			$(CHMOD) $(MAILERMODE) $@