|
@@ -1,6 +1,6 @@
|
|
|
$Id$
|
|
|
---- aiccu.orig/unix-console/Makefile Mon Jan 15 11:04:04 2007
|
|
|
-+++ aiccu/unix-console/Makefile Mon Jun 25 13:19:42 2007
|
|
|
+--- aiccu.orig/unix-console/Makefile 2007-01-15 12:04:27.000000000 +0100
|
|
|
++++ aiccu/unix-console/Makefile 2009-12-28 16:39:06.687500000 +0100
|
|
|
@@ -10,9 +10,9 @@
|
|
|
# $Date: 2007-01-15 11:04:27 $
|
|
|
# **********************************************************/
|
|
@@ -13,7 +13,172 @@ $Id$
|
|
|
|
|
|
# New features not fully implemented and thus disabled for now
|
|
|
#CFLAGS += -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE
|
|
|
-@@ -145,11 +145,6 @@ all: aiccu
|
|
|
+@@ -46,110 +46,103 @@ LDFLAGS += -lgnutls
|
|
|
+ endif
|
|
|
+
|
|
|
+ # Linux
|
|
|
+-ifeq ($(shell uname | grep -c "Linux"),1)
|
|
|
+ CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
|
|
|
+ SRCS += ../common/aiccu_linux.c
|
|
|
+ OBJS += ../common/aiccu_linux.o
|
|
|
+ LDFLAGS += -lpthread -lresolv
|
|
|
+-endif
|
|
|
+
|
|
|
+ # FreeBSD
|
|
|
+-ifeq ($(shell uname | grep -c "FreeBSD"),1)
|
|
|
+-CFLAGS += -D_FREEBSD
|
|
|
++#ifeq ($(shell uname | grep -c "FreeBSD"),1)
|
|
|
++#CFLAGS += -D_FREEBSD
|
|
|
+
|
|
|
+ # FreeBSD 4.x
|
|
|
+-ifeq ($(shell uname -r | cut -c 1),4)
|
|
|
+-CFLAGS += -D AICCU_TYPE="\"freebsd4\""
|
|
|
+-SRCS += ../common/aiccu_freebsd4.c
|
|
|
+-OBJS += ../common/aiccu_freebsd4.o
|
|
|
+-else
|
|
|
++#ifeq ($(shell uname -r | cut -c 1),4)
|
|
|
++#CFLAGS += -D AICCU_TYPE="\"freebsd4\""
|
|
|
++#SRCS += ../common/aiccu_freebsd4.c
|
|
|
++#OBJS += ../common/aiccu_freebsd4.o
|
|
|
++#else
|
|
|
+ # FreeBSD 5.x/6.x/7.x
|
|
|
+-CFLAGS += -D NEED_IFHEAD -D AICCU_TYPE="\"kame\""
|
|
|
+-SRCS += ../common/aiccu_kame.c
|
|
|
+-OBJS += ../common/aiccu_kame.o
|
|
|
+-endif
|
|
|
+-endif
|
|
|
++#CFLAGS += -D NEED_IFHEAD -D AICCU_TYPE="\"kame\""
|
|
|
++#SRCS += ../common/aiccu_kame.c
|
|
|
++#OBJS += ../common/aiccu_kame.o
|
|
|
++#endif
|
|
|
++#endif
|
|
|
+
|
|
|
+ # DragonFlyBSD
|
|
|
+-ifeq ($(shell uname | grep -c "DragonFly"),1)
|
|
|
+-CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
|
|
|
+-SRCS += ../common/aiccu_freebsd4.c
|
|
|
+-OBJS += ../common/aiccu_freebsd4.o
|
|
|
+-CFLAGS += -pthread
|
|
|
+-endif
|
|
|
++#ifeq ($(shell uname | grep -c "DragonFly"),1)
|
|
|
++#CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
|
|
|
++#SRCS += ../common/aiccu_freebsd4.c
|
|
|
++#OBJS += ../common/aiccu_freebsd4.o
|
|
|
++#CFLAGS += -pthread
|
|
|
++#endif
|
|
|
+
|
|
|
+ # NetBSD
|
|
|
+-ifeq ($(shell uname | grep -c "NetBSD"),1)
|
|
|
+-CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
|
|
|
+-
|
|
|
++#ifeq ($(shell uname | grep -c "NetBSD"),1)
|
|
|
++#CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
|
|
|
++#
|
|
|
+ # Check if net/if_tun.h has TUNSIFHEAD and enable support for it
|
|
|
+-ifneq ($(shell grep -c TUNSIFHEAD /usr/include/net/if_tun.h 2>/dev/null),1)
|
|
|
++#ifneq ($(shell grep -c TUNSIFHEAD /usr/include/net/if_tun.h 2>/dev/null),1)
|
|
|
+ # Supports TUNSIFHEAD -> AYIYA/l2tp available
|
|
|
+-CFLAGS += -D NEED_IFHEAD
|
|
|
+-else
|
|
|
++#CFLAGS += -D NEED_IFHEAD
|
|
|
++#else
|
|
|
+ # Doesn't support TUNSIFHEAD -> No AYIYA/l2tp available
|
|
|
+-CFLAGS += -D NO_IFHEAD
|
|
|
+-endif
|
|
|
++#CFLAGS += -D NO_IFHEAD
|
|
|
++#endif
|
|
|
+
|
|
|
+-SRCS += ../common/aiccu_kame.c
|
|
|
+-OBJS += ../common/aiccu_kame.o
|
|
|
+-CFLAGS += -pthread -D_NETBSD_SOURCE
|
|
|
+-endif
|
|
|
++#SRCS += ../common/aiccu_kame.c
|
|
|
++#OBJS += ../common/aiccu_kame.o
|
|
|
++#CFLAGS += -pthread -D_NETBSD_SOURCE
|
|
|
++#endif
|
|
|
+
|
|
|
+ # OpenBSD
|
|
|
+-ifeq ($(shell uname | grep -c "OpenBSD"),1)
|
|
|
+-CFLAGS += -D_OPENBSD -D HAS_IFHEAD
|
|
|
+-# 2.7-2.9
|
|
|
+-ifeq ($(shell uname -r | cut -c 1),2)
|
|
|
+-CFLAGS += -D AICCU_TYPE="\"openbsd2\""
|
|
|
+-SRCS += ../common/aiccu_openbsd2.c
|
|
|
+-OBJS += ../common/aiccu_openbsd2.o
|
|
|
+-else
|
|
|
+-# 3.x-4.x etc
|
|
|
+-CFLAGS += -D AICCU_TYPE="\"openbsd\""
|
|
|
+-SRCS += ../common/aiccu_openbsd.c
|
|
|
+-OBJS += ../common/aiccu_openbsd.o
|
|
|
+-endif
|
|
|
+-CFLAGS += -pthread
|
|
|
+-endif
|
|
|
++#ifeq ($(shell uname | grep -c "OpenBSD"),1)
|
|
|
++#CFLAGS += -D_OPENBSD -D HAS_IFHEAD
|
|
|
++## 2.7-2.9
|
|
|
++#ifeq ($(shell uname -r | cut -c 1),2)
|
|
|
++#CFLAGS += -D AICCU_TYPE="\"openbsd2\""
|
|
|
++#SRCS += ../common/aiccu_openbsd2.c
|
|
|
++#OBJS += ../common/aiccu_openbsd2.o
|
|
|
++#else
|
|
|
++## 3.x-4.x etc
|
|
|
++#CFLAGS += -D AICCU_TYPE="\"openbsd\""
|
|
|
++#SRCS += ../common/aiccu_openbsd.c
|
|
|
++#OBJS += ../common/aiccu_openbsd.o
|
|
|
++#endif
|
|
|
++#CFLAGS += -pthread
|
|
|
++#endif
|
|
|
+
|
|
|
+ # Darwin
|
|
|
+-ifeq ($(shell uname | grep -c "Darwin"),1)
|
|
|
+-CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
|
|
|
+-SRCS += ../common/aiccu_darwin.c
|
|
|
+-OBJS += ../common/aiccu_darwin.o
|
|
|
+-LDFLAGS += -lresolv
|
|
|
+-endif
|
|
|
++#ifeq ($(shell uname | grep -c "Darwin"),1)
|
|
|
++#CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
|
|
|
++#SRCS += ../common/aiccu_darwin.c
|
|
|
++#OBJS += ../common/aiccu_darwin.o
|
|
|
++#LDFLAGS += -lresolv
|
|
|
++#endif
|
|
|
+
|
|
|
+ # SunOS / Solaris
|
|
|
+-ifeq ($(shell uname | grep -c "SunOS"),1)
|
|
|
+-CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
|
|
|
+-SRCS += ../common/aiccu_sunos.c
|
|
|
+-OBJS += ../common/aiccu_sunos.o
|
|
|
+-LDFLAGS += -lsocket -lnsl -lresolv
|
|
|
+-endif
|
|
|
++#ifeq ($(shell uname | grep -c "SunOS"),1)
|
|
|
++#CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
|
|
|
++#SRCS += ../common/aiccu_sunos.c
|
|
|
++#OBJS += ../common/aiccu_sunos.o
|
|
|
++#LDFLAGS += -lsocket -lnsl -lresolv
|
|
|
++#endif
|
|
|
+
|
|
|
+ # AIX
|
|
|
+-ifeq ($(shell uname | grep -c "AIX"),1)
|
|
|
+-CC = @/usr/vac/bin/xlc_r
|
|
|
+-CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
|
|
|
+-CFLAGS += -D AICCU_CONSOLE
|
|
|
+-CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
|
|
|
+-SRCS += ../common/aiccu_aix.c
|
|
|
+-OBJS += ../common/aiccu_aix.o
|
|
|
+-LDFLAGS += -lpthread
|
|
|
+-endif
|
|
|
++#ifeq ($(shell uname | grep -c "AIX"),1)
|
|
|
++#CC = @/usr/vac/bin/xlc_r
|
|
|
++#CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
|
|
|
++#CFLAGS += -D AICCU_CONSOLE
|
|
|
++#CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
|
|
|
++#SRCS += ../common/aiccu_aix.c
|
|
|
++#OBJS += ../common/aiccu_aix.o
|
|
|
++#LDFLAGS += -lpthread
|
|
|
++#endif
|
|
|
+
|
|
|
+
|
|
|
+ all: aiccu
|
|
|
|
|
|
aiccu: $(OBJS) ${SRCS} ${INCS}
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
|