This commit is contained in:
Guilhem Lavaux 2008-12-02 11:22:46 -06:00
parent 35baf0675c
commit 4862035315

View File

@ -3,15 +3,28 @@ CXX=g++
CC=gcc CC=gcc
CXXFLAGS= -ggdb -O3 CXXFLAGS= -ggdb -O3
CFLAGS= -ggdb -O3 CFLAGS= -ggdb -O3
SOURCES= loadRamses.cpp yorick.cpp SOURCES= loadRamses.cpp yorick.cpp miniargs.cpp
LIBS= -lnetcdf_c++ -lnetcdf -lm LIBS= -lnetcdf_c++ -lnetcdf -lm
VPATH=../src
all: $(SHLIBS) all: $(SHLIBS)
libCosmoTool.so: loadRamses.o yorick.o miniargs.o
depend: $(SOURCES) depend: $(SOURCES)
@echo "[DEPENDS] $^" @echo "[DEPENDS] $^"
@$(CC) -M -MM $^ > .mydepends @$(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 distclean: clean
@rm -f .mydepends @rm -f .mydepends
@ -31,10 +44,10 @@ clean:
%.o: %.c %.o: %.c
@echo "[C] $< ..." @echo "[C] $< ..."
@$(CC) -c -o $@ $< $(CFLAGS) @$(CC) -c -fPIC -o $@ $< $(CFLAGS)
%.o: %.cpp %.o: %.cpp
@echo "[C++] $< ..." @echo "[C++] $< ..."
@$(CXX) -c -o $@ $< $(CXXFLAGS) @$(CXX) -c -fPIC -o $@ $< $(CXXFLAGS)
include .mydepends include .mydepends