-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (42 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
63 lines (42 loc) · 1.44 KB
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
CC = gcc
CFLAGS = -pipe -g -Wall
RM = rm -f
## For Solaris
#LIBS += -lsocket -lnsl -lresolv
### Firewall code selection ###
## For the script based system.
#FW_OBJS=fw_program.o
#CFLAGS += -DFW_PROGRAM=\"/your/fw/program\"
## For the touch a file based system.
FW_OBJS=fw_touch.o
## For the built-in Linux method.
## Note that this only works with 2.2 kernels.
## Porting to 2.4 should be easy but I havn't done it :)
#FW_OBJS=fw_linux.o
### Digest code selection ###
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LDFLAGS += "-L/opt/homebrew/opt/openssl/lib/"
CFLAGS += "-I/opt/homebrew/opt/openssl/include/"
endif
# For libcrpyto/OpenSSL
LIBS += -lcrypto
# For libmd (http://www.penguin.cz/~mhi/libmd/)
#LIBS += =-lmd
#CFLAGS += -DUSE_MD
TARGETS = in.ipscrompd ipscromp fw_test
all: $(TARGETS)
install: all
install -m 755 -s ipscromp /usr/local/bin
install -m 755 -s in.ipscrompd /usr/local/sbin
install -m 755 scripts/ipscromp_dynfw /usr/local/sbin
install -m 755 scripts/ipscromp_nft_setup /usr/local/sbin
ipscromp: ipscromp.o common.o
$(CC) $(CFLAGS) -o ipscromp ipscromp.o common.o $(LDFLAGS) $(LIBS)
in.ipscrompd: $(FW_OBJS) in.ipscrompd.o common.o auth_proto_v2.o
$(CC) $(CFLAGS) -o in.ipscrompd in.ipscrompd.o common.o \
auth_proto_v2.o $(FW_OBJS) $(LDFLAGS) $(LIBS)
fw_test: $(FW_OBJS) common.o fw_test.o
$(CC) $(CFLAGS) -o fw_test $(FW_OBJS) common.o fw_test.o $(LDFLAGS) $(LIBS)
clean:;
$(RM) *.o core *.core *~ $(TARGETS)