Nicolas Cannasse wrote:
As for OSX, it seems then that I need to use "-bundle_loader and link to all libraries and frameworks that the executable loader links to". Could you suggest a patch using this method ?

Here you go.

Cheers,
Lauri

--- neko/Makefile.~1.31.~       2006-01-09 12:44:28.000000000 +0200
+++ neko/Makefile       2006-01-13 01:07:25.000000000 +0200
@@ -28,15 +28,26 @@
 ### OSX SPECIFIC
 
 ifeq (${MACOSX}, 1)
-export MACOSX_DEPLOYMENT_TARGET=10.3
+
+ifndef MACOSX_DEPLOYMENT_TARGET
+export MACOSX_DEPLOYMENT_TARGET=10.2
+endif
+
 MAKESO = gcc
 LIBNEKO_NAME = libneko.dylib
 LIBNEKO_INSTALL = -install_name @executable_path/${LIBNEKO_NAME}
 LIBNEKO_LIBS = -ldl -lgc -lm -dynamiclib -single_module ${LIBNEKO_INSTALL}
 NEKOVM_FLAGS = -L${PWD}/bin -lneko
+
+MACOSX_LEGACY = $(shell perl -e "if(${MACOSX_DEPLOYMENT_TARGET} < 10.3) { 
print 1; } else { print 0; }")
+ifeq (${MACOSX_LEGACY}, 1)
+STD_NDLL_FLAGS = -bundle -bundle_loader ${PWD}/bin/neko $(NEKOVM_FLAGS)
+else
 STD_NDLL_FLAGS = -bundle -undefined dynamic_lookup ${NEKOVM_FLAGS}
 endif
 
+endif
+
 ### MAKE
 
 VM_OBJECTS = vm/main.o
--
Neko : One VM to run them all (http://nekovm.org)

Reply via email to