2002-10-15 00:34:13 +04:00
|
|
|
top_builddir = ..
|
|
|
|
top_srcdir = @srcdir@/..
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
CXX=@CXX@
|
|
|
|
CXXFLAGS=@CXXFLAGS@ @INCLTDL@
|
|
|
|
|
2002-10-15 01:07:23 +04:00
|
|
|
all: uselib module1.dll module2.dll
|
2002-10-15 00:34:13 +04:00
|
|
|
|
2002-10-15 01:07:23 +04:00
|
|
|
uselib: main.cc main.h
|
2002-10-15 01:10:54 +04:00
|
|
|
$(CXX) $(CXXFLAGS) -c -o main.o ${srcdir}/main.cc
|
2002-10-15 01:07:23 +04:00
|
|
|
dlltool --export-all --output-def uselib.def main.o
|
|
|
|
dlltool --dllname uselib.exe --def uselib.def --output-lib uselib.a
|
|
|
|
dlltool --dllname uselib.exe --output-exp uselib.exp --def uselib.def
|
|
|
|
$(CXX) $(CXXFLAGS) -o uselib uselib.exp main.o
|
|
|
|
rm uselib.exp uselib.def
|
2002-10-15 00:34:13 +04:00
|
|
|
|
2002-10-15 01:07:23 +04:00
|
|
|
module1.dll: module1.cc main.h
|
2002-10-15 01:10:54 +04:00
|
|
|
$(CXX) $(CXXFLAGS) -shared -o module1.dll ${srcdir}/module1.cc uselib.a
|
2002-10-15 00:34:13 +04:00
|
|
|
|
2002-10-15 01:07:23 +04:00
|
|
|
module2.dll: module2.cc main.h
|
2002-10-15 01:10:54 +04:00
|
|
|
$(CXX) $(CXXFLAGS) -shared -o module2.dll ${srcdir}/module2.cc uselib.a
|
2002-10-15 00:34:13 +04:00
|
|
|
|
2002-10-15 01:07:23 +04:00
|
|
|
%.o: %.cc
|
|
|
|
$(CXX) $(CXXFLAGS) -c $<
|
2002-10-15 00:34:13 +04:00
|
|
|
|
2002-10-16 08:09:24 +04:00
|
|
|
include ${top_srcdir}/common-make-defs.txt
|
|
|
|
|
|
|
|
clean: clean-common
|