Fixes build parameters for Mac

This commit is contained in:
Eric Scharff 2007-10-25 08:55:48 -06:00
parent 1c9667104e
commit 782f7e8feb

View File

@ -33,6 +33,9 @@ test = test
build-cxx = g++
build-cc = gcc
pthread = -pthread
lpthread = -lpthread
cxx = $(build-cxx)
cc = $(build-cc)
ar = ar
@ -54,11 +57,6 @@ common-cflags = $(warnings) -fno-rtti -fno-exceptions \
-I$(JAVA_HOME)/include -idirafter $(src) -I$(bld) -D__STDC_LIMIT_MACROS \
-DBUILTIN_LIBRARIES=\"natives,tlscontext,scaler\"
cflags = $(common-cflags) -fPIC -fvisibility=hidden \
-I$(JAVA_HOME)/include/linux -I$(src) -pthread
lflags = -lpthread -ldl -lm -lz
system = posix
asm = x86
@ -66,6 +64,8 @@ ifeq ($(platform),darwin)
rdynamic =
thread-cflags =
shared = -dynamiclib
pthread =
lpthread =
endif
ifeq ($(platform),windows)
inc = /usr/local/win32/include
@ -84,6 +84,11 @@ ifeq ($(platform),windows)
cflags = $(common-cflags) -I$(inc)
endif
cflags = $(common-cflags) -fPIC -fvisibility=hidden \
-I$(JAVA_HOME)/include/linux -I$(src) $(pthread)
lflags = $(lpthread) -ldl -lm -lz
ifeq ($(mode),debug)
cflags += -O0 -g3
endif
@ -275,7 +280,7 @@ endif
$(executable): $(archive)
@echo "linking $(@)"
$(cc) -Wl,--whole-archive $(^) -Wl,--no-whole-archive \
$(cc) -Wl,-all_load $(^) \
$(lflags) $(rdynamic) -o $(@)
@$(strip) --strip-all $(@)
@$(show-size) $(@)