diff -ur c08.00/source/Makefile c08.00.new/source/Makefile --- c08.00/source/Makefile 2008-08-18 13:05:17.000000000 +0200 +++ c08.00.new/source/Makefile 2010-04-02 00:59:09.000000000 +0200 @@ -3,11 +3,11 @@ # you need g++ or pathCC to create Makefile.dep (set with CXXDEPEND) # but after that you can use any compiler you want (set with CXX) -OPT = -O3 -ftrapping-math -fno-math-errno -CXX = g++ -CXXFLAGS = -ansi ${OPT} -Wall -g -LDFLAGS = ${OPT} -Wall -g -LDLIBS= +#OPT = -O3 -ftrapping-math -fno-math-errno +#CXX = g++ +#CXXFLAGS = -ansi ${OPT} -Wall -g +#LDFLAGS = ${OPT} -Wall -g +#LDLIBS= SRCDIR=. main := maincl.cpp @@ -15,7 +15,7 @@ libsource := ${filter-out ${main},${source}} includes := ${notdir ${wildcard ${SRCDIR}/*.h}} objects := ${source:.cpp=.o} -libobjects := ${libsource:.cpp=.o} +libobjects := ${libsource:.cpp=.lo} # include a configuration file if one exists (or carry on without # worrying if it doesn't) @@ -81,18 +81,22 @@ LDLIBS += -L${CLOUDY_LAPACK_PATH}/lib -llapack endif -cloudy.exe : ${preobjects} maincl.o libcloudy.a +cloudy.exe : ${preobjects} maincl.o libcloudy.so ${CXX} ${LDFLAGS} -o cloudy.exe maincl.o -L. -lcloudy ${LDLIBS} libcloudy.a: ${libobjects} ar ru libcloudy.a ${libobjects} ${RANLIB} libcloudy.a +libcloudy.so: ${libobjects} + ${CXX} -shared -o libcloudy.so.0 -Wl,-soname,libcloudy.so.0 ${libobjects} ${LDFLAGS} + ln -s libcloudy.so.0 libcloudy.so + clean : rm -f *.o rm -f *.h.gch rm -rf SunWS_cache - rm -f libcloudy.a + rm -f libcloudy.* rm -f cloudy.exe distclean : @@ -121,6 +125,8 @@ %.h.gch: %.h ${CXX} ${CXXFLAGS} -o $@ $< +%.lo: %.cpp + ${CXX} ${CXXFLAGS} -fPIC -DPIC -c -o $@ $< # only include Makefile.dep when we really need it, this prevents unnecessary builds of Makefile.dep ifneq (${DEP_GOALS},) -include Makefile.dep