Update of /cvsroot/hoc/hoc/Foundation
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv10721/Foundation
Modified Files:
Makefile.in
Log Message:
Support dynamic linking in the makefiles.
Use:
make HocBuildDylibs=YES
and
sudo make install HocBuildDylibs=YES
requires a GHC installation with dynamic libraries.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/hoc/hoc/Foundation/Makefile.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Makefile.in 1 Nov 2006 15:45:04 -0000 1.17
+++ Makefile.in 13 Feb 2007 17:17:13 -0000 1.18
@@ -7,7 +7,15 @@
Makefile.in \
$(NULL)
-all: libHSFoundation.a HSFoundation.o register-inplace.build-stamp
+ifeq "$(HocBuildDylibs)" "YES"
+LIBRARIES=libHSFoundation.a libHSFoundation_dyn.dylib
+else
+LIBRARIES=libHSFoundation.a HSFoundation.o
+endif
+
+FOUNDATIONLIBDIR="$(destdir)"/$(GHC_LIB_PATH)/Foundation
+
+all: $(LIBRARIES) register-inplace.build-stamp
register-inplace.build-stamp: Foundation.conf-inplace
[ -f "../inplace.conf" ] || echo '[]' > ../inplace.conf
@@ -48,7 +56,8 @@
-package-name Foundation \
-hidir build/imports \
-package-conf ../inplace.conf \
- -fglasgow-exts -fth
+ -fglasgow-exts -fth\
+ $(EXTRA_GHCFLAGS)
test ! -r GNUstepBase.hs || \
$(GHC) --make GNUstepBase.hs \
@@ -56,7 +65,8 @@
-odir build/objects \
-hidir build/imports \
-package-conf ../inplace.conf \
- -fglasgow-exts -fth
+ -fglasgow-exts -fth \
+ $(EXTRA_GHCFLAGS)
touch $@
HSFoundation.o: ghcmake.build-stamp
@@ -67,7 +77,7 @@
libHSFoundation_dyn.dylib: ghcmake.build-stamp
export MACOSX_DEPLOYMENT_TARGET=10.3 && find build/objects/ -name \*.o \
- | xargs libtool -dynamic -o $@ -undefined dynamic_lookup
+ | xargs libtool -dynamic -o $@ -undefined dynamic_lookup -single_module
install_name_tool -id "`pwd`/$@" $@
clean:
@@ -77,11 +87,15 @@
register-inplace.build-stamp
install: install-files
- ranlib "$(destdir)"/$(GHC_LIB_PATH)/Foundation/libHSFoundation.a
+ ranlib $(FOUNDATIONLIBDIR)/libHSFoundation.a
+ifeq "$(HocBuildDylibs)" "YES"
+ install_name_tool -id $(FOUNDATIONLIBDIR)/libHSFoundation_dyn.dylib \
+ $(FOUNDATIONLIBDIR)/libHSFoundation_dyn.dylib
+endif
$(GHC_PKG) update Foundation.conf
install-files: all Foundation.conf
- mkdir -p "$(destdir)"/$(GHC_LIB_PATH)/Foundation
- cp -R libHSFoundation.a HSFoundation.o \
- build/imports "$(destdir)"/$(GHC_LIB_PATH)/Foundation/
+ mkdir -p $(FOUNDATIONLIBDIR)
+ cp -R $(LIBRARIES) \
+ build/imports $(FOUNDATIONLIBDIR)
|