-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (31 loc) · 903 Bytes
/
Makefile
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
# The following variables may be changed on the make command line:
#
# the directory to the strongSwan sources
SWANDIR?=~/strongswan
# location of config.h
CONFIGH?=$(SWANDIR)/config.h
# default install prefix
PREFIX?=/usr/local
# location of the installed strongSwan libraries
SWANLIBS?=$(PREFIX)/lib/ipsec
# location of the strongSwan plugins
SWANPLUGINS?=$(PREFIX)/lib/ipsec/plugins
# target location of the plugin config snippet
PLUGINCONF?=/etc/strongswan.d/charon/
CFLAGS=-O2 -Wall -fpic \
-include $(CONFIGH) \
-I$(SWANDIR)/src/libstrongswan \
-I$(SWANDIR)/src/libcharon
LDFLAGS=-L$(SWANLIBS) \
-lstrongswan \
-lcharon
redirect.so: redirect.o
gcc -shared -o $@ $< $(LDFLAGS)
%.o: %.c
gcc -c $< -o $@ $(CFLAGS)
install: redirect.so redirect.conf
cp redirect.so $(SWANPLUGINS)/libstrongswan-redirect.so
cp redirect.conf $(PLUGINCONF)
clean:
rm -f *.so *.o
.PHONY: clean install