From 486203531556a3286b067c54c93caac4bfbf1dc6 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 2 Dec 2008 11:22:46 -0600 Subject: [PATCH] Updated --- lib/Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 5fa3c6c..1c3d3fc 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -3,15 +3,28 @@ CXX=g++ CC=gcc CXXFLAGS= -ggdb -O3 CFLAGS= -ggdb -O3 -SOURCES= loadRamses.cpp yorick.cpp +SOURCES= loadRamses.cpp yorick.cpp miniargs.cpp LIBS= -lnetcdf_c++ -lnetcdf -lm +VPATH=../src + all: $(SHLIBS) +libCosmoTool.so: loadRamses.o yorick.o miniargs.o + depend: $(SOURCES) @echo "[DEPENDS] $^" @$(CC) -M -MM $^ > .mydepends +install: + @mkdir -p ../install/lib + @mkdir -p ../install/include/CosmoTool + @echo "Copying libraries" + @cp libCosmoTool.so ../install/lib + @echo "Copying header files" + @cp ../src/*.hpp ../install/include/CosmoTool + @cp ../src/*.h ../install/include/CosmoTool + distclean: clean @rm -f .mydepends @@ -31,10 +44,10 @@ clean: %.o: %.c @echo "[C] $< ..." - @$(CC) -c -o $@ $< $(CFLAGS) + @$(CC) -c -fPIC -o $@ $< $(CFLAGS) %.o: %.cpp @echo "[C++] $< ..." - @$(CXX) -c -o $@ $< $(CXXFLAGS) + @$(CXX) -c -fPIC -o $@ $< $(CXXFLAGS) include .mydepends