d52e44afdb
revision is exactly the same as the present versin from test6-ltdlopen. - added: Makefile.in README main.cc main.h module1.cc module2.cc
46 lines
1.1 KiB
Makefile
46 lines
1.1 KiB
Makefile
top_builddir = ..
|
|
top_srcdir = @srcdir@/..
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
CXX=@CXX@
|
|
CXXFLAGS=@CXXFLAGS@ @INCLTDL@
|
|
LDFLAGS=@LDFLAGS@ @LT_LDFLAGS@
|
|
LIBS=@LIBS@ @LIBLTDL@
|
|
|
|
LIBTOOL=@LIBTOOL@
|
|
RPATH=`pwd`/lib
|
|
|
|
all: uselib libmodule1.la libmodule2.la
|
|
|
|
uselib: libmain.la
|
|
$(LIBTOOL) $(CXX) $(LDFLAGS) -o uselib libmain.la $(LIBS)
|
|
|
|
libmain.la: main.lo
|
|
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmain.la main.lo -rpath ${RPATH} $(LIBS)
|
|
mkdir -p lib bin
|
|
$(LIBTOOL) cp libmain.la ${RPATH}
|
|
|
|
libmodule1.la: module1.lo libmain.la
|
|
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmodule1.la module1.lo -rpath ${RPATH} libmain.la
|
|
mkdir -p lib bin
|
|
$(LIBTOOL) cp libmodule1.la ${RPATH}
|
|
|
|
libmodule2.la: module2.lo libmain.la
|
|
$(LIBTOOL) $(CXX) $(LDFLAGS) -o libmodule2.la module2.lo -rpath ${RPATH} libmain.la
|
|
mkdir -p lib bin
|
|
$(LIBTOOL) cp libmodule2.la ${RPATH}
|
|
|
|
%.lo: %.cc
|
|
$(LIBTOOL) $(CXX) $(CXXFLAGS) -c $<
|
|
|
|
test:
|
|
@echo "*** Running test in `pwd`"
|
|
-./uselib
|
|
@echo "*** Test done in `pwd`"
|
|
|
|
clean:
|
|
-$(LIBTOOL) rm libmodule1.la module1.lo libmodule2.la module2.lo
|
|
rm -rf *.o *.lo *.la uselib.exe bin lib uselib uselib.exe
|
|
rm -rf .libs
|