• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#  Copyright (c) 1993, 1994, 1995, 1996
2# 	The Regents of the University of California.  All rights reserved.
3#
4#  Redistribution and use in source and binary forms, with or without
5#  modification, are permitted provided that: (1) source code distributions
6#  retain the above copyright notice and this paragraph in its entirety, (2)
7#  distributions including binary code include the above copyright notice and
8#  this paragraph in its entirety in the documentation or other materials
9#  provided with the distribution, and (3) all advertising materials mentioning
10#  features or use of this software display the following acknowledgement:
11#  ``This product includes software developed by the University of California,
12#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13#  the University nor the names of its contributors may be used to endorse
14#  or promote products derived from this software without specific prior
15#  written permission.
16#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19
20#
21# Various configurable paths (remember to edit Makefile.in, not Makefile)
22#
23
24# Top level hierarchy
25prefix = @prefix@
26exec_prefix = @exec_prefix@
27datarootdir = @datarootdir@
28# Pathname of directory to install the configure program
29bindir = @bindir@
30# Pathname of directory to install the rpcapd daemon
31sbindir = @sbindir@
32# Pathname of directory to install the include files
33includedir = @includedir@
34# Pathname of directory to install the library
35libdir =  @libdir@
36# Pathname of directory to install the man pages
37mandir = @mandir@
38
39# VPATH
40srcdir = @srcdir@
41top_srcdir = @top_srcdir@
42VPATH = @srcdir@
43
44#
45# You shouldn't need to edit anything below.
46#
47
48LD = /usr/bin/ld
49CC = @CC@
50AR = @AR@
51LN_S = @LN_S@
52MKDEP = @MKDEP@
53CCOPT = @V_CCOPT@
54INCLS = -I. -I.. -I@srcdir@ -I@srcdir@/.. @V_INCLS@
55DEFS = @DEFS@ @V_DEFS@
56ADDLOBJS = @ADDLOBJS@
57ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
58LIBS = @LIBS@
59PTHREAD_LIBS = @PTHREAD_LIBS@
60CROSSFLAGS=
61CFLAGS = @CFLAGS@   ${CROSSFLAGS}
62LDFLAGS = @LDFLAGS@ ${CROSSFLAGS}
63DYEXT = @DYEXT@
64V_RPATH_OPT = @V_RPATH_OPT@
65DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
66PROG=libpcap
67RPCAPD_LIBS = @RPCAPD_LIBS@
68
69# Standard CFLAGS
70FULL_CFLAGS = $(CCOPT) @V_PROG_CCOPT_FAT@ $(INCLS) $(DEFS) $(CFLAGS)
71
72INSTALL = @INSTALL@
73INSTALL_PROGRAM = @INSTALL_PROGRAM@
74INSTALL_DATA = @INSTALL_DATA@
75
76# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
77# Also, gcc does not remove the .o before forking 'as', which can be a
78# problem if you don't own the file but can write to the directory.
79.c.o:
80	@rm -f $@
81	$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
82
83SRC =	daemon.c \
84	fileconf.c \
85	log.c \
86	rpcapd.c
87
88OBJ =	$(SRC:.c=.o) ../rpcap-protocol.o ../sockutils.o ../fmtutils.o ../sslutils.o
89PUBHDR =
90
91HDR = $(PUBHDR) log.h
92
93TAGFILES = \
94	$(SRC) $(HDR)
95
96CLEANFILES = $(OBJ) rpcapd
97
98MANADMIN = \
99	rpcapd.manadmin.in
100
101MANFILE = \
102	rpcapd-config.manfile.in
103
104rpcapd: $(OBJ) ../libpcap.a
105	$(CC) $(CCOPT) $(CFLAGS) $(LDFLAGS) @V_PROG_LDFLAGS_FAT@ \
106	    -o $@ $(OBJ) ../libpcap.a $(LIBS) $(RPCAPD_LIBS) $(PTHREAD_LIBS)
107clean:
108	rm -f $(CLEANFILES)
109
110distclean: clean
111	rm -f Makefile config.cache config.log config.status \
112	    config.h stamp-h stamp-h.in
113	rm -f $(MANADMIN:.in=) $(MANFILE:.in=)
114	rm -rf autom4te.cache
115
116install: rpcapd
117	[ -d $(DESTDIR)$(sbindir) ] || \
118	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
119	$(INSTALL_PROGRAM) rpcapd $(DESTDIR)$(sbindir)/rpcapd
120	[ -d $(DESTDIR)$(mandir)/man@MAN_ADMIN_COMMANDS@ ] || \
121	    (mkdir -p $(DESTDIR)$(mandir)/man@MAN_ADMIN_COMMANDS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_ADMIN_COMMANDS@)
122	[ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
123	    (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
124	for i in $(MANADMIN); do \
125		$(INSTALL_DATA) `echo $$i | sed 's/.manadmin.in/.manadmin/'` \
126		    $(DESTDIR)$(mandir)/man@MAN_ADMIN_COMMANDS@/`echo $$i | sed 's/.manadmin.in/.@MAN_ADMIN_COMMANDS@/'`; done
127	for i in $(MANFILE); do \
128		$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
129		    $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
130
131uninstall:
132	rm -f $(DESTDIR)$(sbindir)/rpcapd
133	for i in $(MANADMIN); do \
134		rm -f $(DESTDIR)$(mandir)/man@MAN_ADMIN_COMMANDS@/`echo $$i | sed 's/.manadmin.in/.@MAN_ADMIN_COMMANDS@/'`; done
135	for i in $(MANFILE); do \
136		rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
137
138tags: $(TAGFILES)
139	ctags -wtd $(TAGFILES)
140
141depend:
142	$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC)
143