- clean up the libtool section of the makefile

- remove the unsuccessful experiment with libmain.la
- now the executable uses -export-dynamic and the modules use -module,
  as it should be
This commit is contained in:
Bryce Denney 2002-10-16 02:36:45 +00:00
parent 21df25a043
commit e972168d39

View File

@ -11,23 +11,23 @@ LIBS=@LIBS@ @LIBLTDL@
LIBTOOL=@LIBTOOL@ LIBTOOL=@LIBTOOL@
RPATH=`pwd`/lib RPATH=`pwd`/lib
all: uselib libmodule1.la libmodule2.la # select whether to use libtool or win32-specific target
all: all_libtool
#all: all_win32
uselib: libmain.la ########### libtool makefile for all platforms except win32 ###########
$(LIBTOOL) $(CXX) $(LDFLAGS) -o uselib libmain.la $(LIBS) all_libtool: uselib libmodule1.la libmodule2.la
libmain.la: main.lo uselib: main.lo
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmain.la main.lo -rpath ${RPATH} $(LIBS) $(LIBTOOL) $(CXX) -export-dynamic $(LDFLAGS) -o uselib main.lo $(LIBS)
mkdir -p lib bin
$(LIBTOOL) cp libmain.la ${RPATH}
libmodule1.la: module1.lo libmain.la libmodule1.la: module1.lo
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmodule1.la module1.lo -rpath ${RPATH} libmain.la $(LIBTOOL) $(CXX) -module $(LDFLAGS) -o libmodule1.la module1.lo -rpath ${RPATH}
mkdir -p lib bin mkdir -p lib bin
$(LIBTOOL) cp libmodule1.la ${RPATH} $(LIBTOOL) cp libmodule1.la ${RPATH}
libmodule2.la: module2.lo libmain.la libmodule2.la: module2.lo
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmodule2.la module2.lo -rpath ${RPATH} libmain.la $(LIBTOOL) $(CXX) -module $(LDFLAGS) -o libmodule2.la module2.lo -rpath ${RPATH}
mkdir -p lib bin mkdir -p lib bin
$(LIBTOOL) cp libmodule2.la ${RPATH} $(LIBTOOL) cp libmodule2.la ${RPATH}