75 lines
2.1 KiB
Plaintext
75 lines
2.1 KiB
Plaintext
$NetBSD: patch-aa,v 1.6 2014/01/01 16:06:58 bsiegert Exp $
|
|
|
|
--- unix-console/Makefile.orig Mon Jan 15 11:04:04 2007
|
|
+++ 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,20 +67,29 @@ 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
|
|
OBJS += ../common/aiccu_kame.o
|
|
CFLAGS += -pthread -D_NETBSD_SOURCE
|
|
+endif
|
|
+
|
|
+# MirBSD
|
|
+ifeq ($(shell uname | grep -c "MirBSD"),1)
|
|
+CFLAGS += -D_OPENBSD -D HAS_IFHEAD
|
|
+CFLAGS += -D AICCU_TYPE="\"openbsd\""
|
|
+SRCS += ../common/aiccu_openbsd.c
|
|
+OBJS += ../common/aiccu_openbsd.o
|
|
+CFLAGS += -pthread
|
|
endif
|
|
|
|
# OpenBSD
|