--- src/tun/Makefile.orig 2011-08-21 12:24:59.000000000 -0500 +++ src/tun/Makefile 2012-03-06 17:39:36.000000000 -0600 @@ -22,14 +22,14 @@ INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers CFLAGS = -Wall -mkernel -force_cpusubtype_ALL \ - -fno-builtin -fno-stack-protector -arch i386 -arch x86_64 \ + -fno-builtin -fno-stack-protector @ARCHFLAGS@ \ -DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"$(TUNTAP_VERSION)\" \ -DTUN_KEXT_VERSION=\"$(TUN_KEXT_VERSION)\" CCFLAGS = $(CFLAGS) -LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext -arch i386 -arch x86_64 -Xlinker -kext +LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext @ARCHFLAGS@ -Xlinker -kext -CCP = g++ -CC = gcc +CCP = @CXX@ +CC = @CC@ all: $(KMOD_BIN) bundle