66 lines
2.2 KiB
Makefile
66 lines
2.2 KiB
Makefile
# Usage:
|
|
# include ../masterbuild/platform.mk
|
|
|
|
include ../masterbuild/common.mk
|
|
|
|
# Given PLATFORM setup flags
|
|
ifeq (${PLATFORM},lin64)
|
|
PLATFORMFLAGS = -m64 -fPIC -O2 -D${UNAME}
|
|
MD5 = openssl md5
|
|
else
|
|
ifeq (${PLATFORM},lin64)
|
|
# PLATFORMFLAGS = -g -m64 -fPIC -DDEBUG -DTOMCAT_SERVLET -D${UNAME}
|
|
PLATFORMFLAGS = -m64 -fPIC -O2 -D${UNAME}
|
|
MD5 = openssl md5
|
|
else
|
|
ifeq (${PLATFORM},lin32)
|
|
PLATFORMFLAGS = -m32 -O2 -D${UNAME}
|
|
MD5 = openssl md5
|
|
else
|
|
ifeq (${PLATFORM},Darwin)
|
|
PLATFORMFLAGS = -m64 -DDEBUG -Wno-deprecated-declarations -DTOMCAT_SERVLET -D${UNAME}
|
|
#-I/opt/local/include
|
|
JNI_INCLUDE = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin
|
|
LIBEXTN = .dylib
|
|
#DEV=Development/daisy-svn/daisy-svn.ws
|
|
# assumption above incorrect; require Macports /opt/local/bin versions of gcc47
|
|
CC11 = gcc-mp-4.7
|
|
CPP11 = g++-mp-4.7
|
|
else
|
|
ifeq (${PLATFORM},iOS)
|
|
# This doesn't work yet, but is somewhat close
|
|
# for now, just drag and drop libionu/*.c (except jnibinding.c) into XCode iOS/OSX project
|
|
# as a separate build target and turn off ARC
|
|
CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
|
LD = libtool
|
|
LIBEXTN = .dylib
|
|
# do not build jnibinding but it'll never get used on iOS
|
|
JNI_INCLUDE =
|
|
JNI_OBJ =
|
|
PLATFORMFLAGS = -x c++ -arch armv7s \
|
|
-miphoneos-version-min=5.1 \
|
|
-fpascal-strings \
|
|
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk \
|
|
-I../OpenSSL-for-iPhone/include
|
|
else
|
|
ifeq (${PLATFORM},win32)
|
|
PLATFORMFLAGS = /O2 /MD /nologo /W3 /WX- /Oi /Gm- /EHsc /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope
|
|
else
|
|
PLATFORMFLAGS = -m32 -DDEBUG -D${UNAME}
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# setup initial CFLAGS and LDFLAGS - actual Makefile can add to these
|
|
ifeq (${PLATFORM},win32)
|
|
DEF_CFLAGS = ${PLATFORMFLAGS} ${CCFLAGS} -I../win/pthreads/include
|
|
DEF_LDFLAGS = ${PLATFORMFLAGS} -L../thirdparty/openssl/lib/${PLATFORM}
|
|
else
|
|
DEF_CFLAGS = -Wall -pthread ${PLATFORMFLAGS} -W ${CCFLAGS}
|
|
DEF_LDFLAGS = ${PLATFORMFLAGS} -L../thirdparty/openssl/lib/${PLATFORM} -lssl -lcrypto -ldl
|
|
endif
|
|
|