-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.macosx
65 lines (54 loc) · 2.08 KB
/
Makefile.macosx
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
61
62
63
64
65
#
# Protean MacOS X (Darwin) Makefile definitions
#
# 1) System specific additional libraries, include paths, etc
# (Where to find X11 libraries, etc)
#
SYSTEM_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers
SYSTEM_LDFLAGS =
SYSTEM_LIBS = -lresolv
# 2) System specific capabilities
# Must choose appropriate for the following:
#
# A) -DHAVE_CUSERID (preferred) or -DHAVE_GETLOGIN for cuserid() or getlogin()
# functions to obtain user's login name (We may change this to getpwd()
# if that is better across different platforms and login environments)
#
# B) -DHAVE_LOCKF (preferred) or -D_LOCKF for lockf() or flock() file locking
# functions to attempt exclusive lock on writing to files
#
# C) Specify -DHAVE_DIRFD if you system provides the "dirfd()" function
# (Most don't have it defined ... but some do)
#
# D) Optionally specify -DHAVE_ASSERT if your system has a built-in ASSERT()
# routine.
#
# E) Some systems (SOLARIS/SUNOS) have a few gotchas which require
# some #ifdefs to avoid compiler warnings ... so you might need
# to specify -DSOLARIS or -DSUNOS depending on your OS.
#
# F) Uncomment this if you have the NRL IPv6+IPsec software
#DNETSEC = -DNETSEC -I/usr/inet6/include
#
# (We export these for other Makefiles as needed)
#
SYSTEM_HAVES = -DMACOSX -DHAVE_IPV6 -DHAVE_ASSERT -DHAVE_GETLOGIN -DHAVE_FLOCK \
-D_FILE_OFFSET_BITS=64 -DHAVE_DIRFD -DHAVE_PSELECT
#Add this for MacOS 10.2 or 10.3 builds: -DSOCKLEN_T=int
SYSTEM_SRC = ../src/bsd/bsdRouteMgr.cpp
SYSTEM_SRC_EX = ../src/unix/bpfCap.cpp ../src/bsd/bsdDetour.cpp \
../src/unix/unixVif.cpp ../src/unix/unixSerial.cpp
# The "SYSTEM" keyword can be used for dependent makes
SYSTEM = macosx
CC = g++
#SYSTEM_CFLAGS = -Wall -Wcast-align -fPIC
SYSTEM_CFLAGS = -Wall -Wcast-align -fPIC -arch x86_64 -arch i386
SYSTEM_SOFLAGS = -dynamiclib
SYSTEM_SOEXT = dylib
# The "-arch" flags make a universal 32/64-bit lib
SYSTEM_JNIFLAGS = -arch x86_64 -arch i386 -bundle
SYSTEM_JNIEXT = jnilib
SYSTEM_FRAMEWORK = -framework JavaVM
RANLIB = ranlib
AR = ar
include Makefile.common