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