"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 # Makefile for PortSentry package.
2 #
3 # Send problems/code hacks to sentrysupport@psionic.com
4 #
5 #
6 #
7 # $Id: Makefile,v 1.78 2002/04/08 17:42:33 crowland Exp crowland $
8 #
9 # Generic compiler (usually linked to gcc on most platforms)
10 CC = cc
11
12 # GNU..
13 #CC = gcc
14
15 # Normal systems flags
16 CFLAGS = -O -Wall
17
18 # Debug mode for portsentry
19 #CFLAGS = -Wall -g -DNODAEMON -DDEBUG
20 #CFLAGS = -Wall -g -DNODAEMON -DDEBUG -DDEBUG2
21 #CFLAGS = -Wall -g -DNODAEMON
22 #CFLAGS = -Wall -g -DDEBUG
23
24 # Profiler mode for portsentry
25 #CFLAGS = -pg -O -Wall -DNODAEMON
26 #LIBS = /usr/lib/libefence.a
27
28 INSTALLDIR = /usr/local/psionic
29 CHILDDIR=/portsentry2
30
31 all:
32 @echo ""
33 @echo ""
34 @echo "Usage: make <systype>"
35 @echo ""
36 @echo "<systype> is one of: generic, linux, bsd, openbsd, freebsd, netbsd"
37 @echo ""
38 @echo "NOTE: bsd, openbsd, freebsd, netbsd, generic have NOT BEEN TESTED FOR THIS BETA VERSION"
39 @echo ""
40 @echo "This code requires snprintf()/vsnprintf() system calls"
41 @echo "to work. If you run a modern OS it should work on"
42 @echo "your system with 'make generic'. If you get it to"
43 @echo "work on an unlisted OS please write us with the"
44 @echo "changes."
45 @echo ""
46 @echo "Install: AFTER YOU FOLLOWED THE ABOVE STEP: make install"
47 @echo ""
48 @echo "NOTE: This will install the package in this"
49 @echo " directory: $(INSTALLDIR)"
50 @echo ""
51 @echo "Edit the makefile if you wish to change these paths."
52 @echo "Existing files will be moved to a .bak extension."
53
54 clean:
55 /bin/rm ./portsentry
56
57 uninstall:
58 /bin/rm $(INSTALLDIR)$(CHILDDIR)/*
59 /bin/rmdir $(INSTALLDIR)
60
61 install:
62 @echo "Creating psionic directory $(INSTALLDIR)"
63 @if [ ! -d $(INSTALLDIR) ]; then /bin/mkdir $(INSTALLDIR); fi
64 @echo "Setting directory permissions"
65 @if [ "$(INSTALLDIR)" = "/usr/local/psionic" ]; then /bin/chmod 700 $(INSTALLDIR) ; fi
66 @echo "Creating portsentry directory $(INSTALLDIR)$(CHILDDIR)"
67 @if [ ! -d $(INSTALLDIR)$(CHILDDIR) ]; then /bin/mkdir\
68 $(INSTALLDIR)$(CHILDDIR); fi
69 @echo "Setting directory permissions"
70 chmod 700 $(INSTALLDIR)$(CHILDDIR)
71 @echo "Copying files"
72 @if [ -f $(INSTALLDIR)$(CHILDDIR)/portsentry.conf ]; then /bin/cp\
73 $(INSTALLDIR)$(CHILDDIR)/portsentry.conf $(INSTALLDIR)$(CHILDDIR)/portsentry.conf.bak; fi
74 cp ./portsentry.conf $(INSTALLDIR)$(CHILDDIR)
75 @if [ -f $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore ]; then /bin/cp\
76 $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore.bak; fi
77 cp ./portsentry.ignore $(INSTALLDIR)$(CHILDDIR)
78 @if [ -f $(INSTALLDIR)$(CHILDDIR)/portsentry ]; then /bin/cp\
79 $(INSTALLDIR)$(CHILDDIR)/portsentry $(INSTALLDIR)$(CHILDDIR)/portsentry.bak; fi
80 cp ./portsentry $(INSTALLDIR)$(CHILDDIR)
81 @echo "Setting permissions"
82 chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore
83 chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.conf
84 chmod 700 $(INSTALLDIR)$(CHILDDIR)/portsentry
85 @echo ""
86 @echo ""
87 @echo "Edit $(INSTALLDIR)$(CHILDDIR)/portsentry.conf and change"
88 @echo "your settings if you haven't already. (route, etc)"
89 @echo ""
90 @echo ""
91
92 linux:
93 SYSTYPE=linux
94 @echo "Making $(SYSTYPE)"
95 $(CC) $(CFLAGS) -D_BSD_SOURCE -o ./portsentry ./portsentry.c \
96 ./portsentry_io.c ./portsentry_util.c -lpcap
97
98
99 # The following are NOT TESTED for Beta
100
101 openbsd:
102 SYSTYPE=openbsd
103 @echo "Making $(SYSTYPE)"
104 $(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
105 ./portsentry_io.c ./portsentry_util.c -lpcap
106
107
108 bsd:
109 SYSTYPE=bsd
110 @echo "Making $(SYSTYPE)"
111 $(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
112 ./portsentry_io.c ./portsentry_util.c -lpcap
113
114 freebsd:
115 SYSTYPE=freebsd
116 @echo "Making $(SYSTYPE)"
117 $(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
118 ./portsentry_io.c ./portsentry_util.c -lpcap
119
120 osx:
121 SYSTYPE=osx
122 @echo "Making $(SYSTYPE)"
123 $(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
124 ./portsentry_io.c ./portsentry_util.c -lpcap
125
126 netbsd:
127 SYSTYPE=netbsd
128 @echo "Making $(SYSTYPE)"
129 $(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
130 ./portsentry_io.c ./portsentry_util.c -lpcap
131
132
133 generic:
134 SYSTYPE=generic
135 @echo "Making $(SYSTYPE)"
136 $(CC) $(CFLAGS) -o ./portsentry ./portsentry.c \
137 ./portsentry_io.c ./portsentry_util.c -lpcap
138