Factored JNIEXPORT into one place. Adopted the visbility attribute that

should allow strip to work on Mac OS X
This commit is contained in:
Eric Scharff 2007-11-01 14:00:22 -06:00
parent 7a4cca45c2
commit 7f33b7371b
4 changed files with 14 additions and 15 deletions

View File

@ -44,6 +44,7 @@ db = gdb --args
javac = javac
jar = jar
strip = :
strip-all = --strip-all
show-size = :
rdynamic = -rdynamic
@ -81,6 +82,7 @@ ifeq ($(platform),darwin)
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
-I$(JAVA_HOME)/include/linux -I$(src)
lflags = $(common-lflags) -ldl
strip-all =
endif
ifeq ($(platform),windows)
@ -326,9 +328,7 @@ ifeq ($(platform),windows)
else
$(cc) $(^) $(lflags) -o $(@)
endif
ifneq ($(platform),darwin)
@$(strip) --strip-all $(@)
endif
@$(strip) $(strip-all) $(@)
@$(show-size) $(@)
$(generator): $(generator-objects)

View File

@ -2,12 +2,6 @@
#include "constants.h"
#include "processor.h"
#ifdef __MINGW32__
# define JNIEXPORT __declspec(dllexport)
#else
# define JNIEXPORT __attribute__ ((visibility("default")))
#endif
using namespace vm;
namespace {

View File

@ -10,6 +10,17 @@
#include "types.h"
#include "math.h"
#undef JNIEXPORT
#ifdef __MINGW32__
# define JNIEXPORT __declspec(dllexport)
#else
#ifdef __APPLE__
# define JNIEXPORT __attribute__ ((visibility("used")))
#else
# define JNIEXPORT __attribute__ ((visibility("default")))
#endif
#endif
#ifdef __i386__
# define LD "d"
#ifdef __APPLE__

View File

@ -4,12 +4,6 @@
#include "constants.h"
#include "processor.h"
#ifdef __MINGW32__
# define JNIEXPORT __declspec(dllexport)
#else
# define JNIEXPORT __attribute__ ((visibility("default")))
#endif
using namespace vm;
namespace {