1 # Makefile for an IPSec VPN client compatible with Cisco equipment.
2 # Copyright (C) 2002 Geoffrey Keating
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 CFLAGS
=-W
-Wall
-O
-g
'-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config
--cflags)
20 LDFLAGS
=-g
$(shell libgcrypt-config
--libs
)
22 ifeq ($(shell uname
-s
), Linux
)
25 ifeq ($(shell uname
-s
), FreeBSD
)
26 CFLAGS
+= -DSOCKADDR_IN_SIN_LEN
-DHAVE_SA_LEN
29 ifeq ($(shell uname
-s
), NetBSD
)
30 CFLAGS
+= -DSOCKADDR_IN_SIN_LEN
-DHAVE_SA_LEN
33 ifeq ($(shell uname
-s
), OpenBSD
)
34 CFLAGS
+= -DSOCKADDR_IN_SIN_LEN
-DHAVE_SA_LEN
-DNEED_IPLEN_FIX
-DNEW_TUN
37 ifeq ($(shell uname
-s
), SunOS
)
41 vpnc
: vpnc.o isakmp-pkt.o tunip.o
$(SYSDEP
) dh.o math_group.o
42 $(CC
) -o
$@
$^
$(LDFLAGS
)
44 vpnc.o
: isakmp.h isakmp-pkt.h dh.h sysdep.h math_group.h vpnc.h VERSION
45 isakmp-pkt.o
: isakmp.h isakmp-pkt.h vpnc.h
46 tunip.o
: sysdep.h vpnc.h
47 dh.o
: dh.h math_group.h
48 math_group.o
: math_group.h
50 FILELIST
:= $(shell echo
*.c
*.h vpnc-
*) Makefile README ChangeLog COPYING TODO VERSION vpnc.conf vpnc
.8
52 ..
/vpnc-
%.
tar.gz
: vpnc-
$*.
tar.gz
54 vpnc-
%.
tar.gz
: $(FILELIST
)
56 cp
-al
$(FILELIST
) vpnc-
$*/
60 release
: VERSION vpnc-
$(shell cat VERSION
).
tar.gz