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
|
$NetBSD: patch-aa,v 1.5 2007/01/18 14:42:17 ghen Exp $
--- unix-console/Makefile.orig 2007-01-15 12:04:27.000000000 +0100
+++ unix-console/Makefile
@@ -26,25 +26,12 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
#CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
CFLAGS += $(CWARNS) -D_GNU_SOURCE
-CC = @gcc
+CC = cc
RM = rm
-# Add -O3 when nothing is specified yet
-ifeq ($(shell echo $(CFLAGS) | grep -c "\-O"),0)
-CFLAGS += -O3
-endif
-
# This is a console client
CFLAGS += -D AICCU_CONSOLE
-# GnuTLS Support ?
-# Used by TIC to secure that communication
-# Currently defaultly builds only on Linux, but other platforms might easily also support it
-ifeq ($(shell uname | grep -c "Linux"),1)
-CFLAGS += -D AICCU_GNUTLS
-LDFLAGS += -lgnutls
-endif
-
# Linux
ifeq ($(shell uname | grep -c "Linux"),1)
CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
@@ -72,7 +59,7 @@ endif
# DragonFlyBSD
ifeq ($(shell uname | grep -c "DragonFly"),1)
-CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
+CFLAGS += -D_DFBSD -DNEED_IFHEAD -DAICCU_TYPE="\"dragonfly\""
SRCS += ../common/aiccu_freebsd4.c
OBJS += ../common/aiccu_freebsd4.o
CFLAGS += -pthread
@@ -80,15 +67,15 @@ endif
# NetBSD
ifeq ($(shell uname | grep -c "NetBSD"),1)
-CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
+CFLAGS += -D_NETBSD -DAICCU_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),0)
# Supports TUNSIFHEAD -> AYIYA/l2tp available
-CFLAGS += -D NEED_IFHEAD
+CFLAGS += -DNEED_IFHEAD
else
# Doesn't support TUNSIFHEAD -> No AYIYA/l2tp available
-CFLAGS += -D NO_IFHEAD
+CFLAGS += -DNO_IFHEAD
endif
SRCS += ../common/aiccu_kame.c
|