cosmotool/lib/Makefile

55 lines
1.0 KiB
Makefile
Raw Normal View History

2008-12-02 18:22:30 +01:00
SHLIBS= libCosmoTool.so
CXX=g++
CC=gcc
2009-01-08 16:19:13 +01:00
CXXFLAGS= -ggdb -O0
CFLAGS= -ggdb -O0
SOURCES= loadRamses.cpp yorick.cpp miniargs.cpp fortran.cpp interpolate.cpp
LIBS= -lnetcdf_c++ -lnetcdf -lgsl -lgslcblas -lm
2008-12-02 18:22:30 +01:00
2008-12-02 18:22:46 +01:00
VPATH=../src
2008-12-02 18:22:30 +01:00
all: $(SHLIBS)
2009-01-08 16:19:13 +01:00
libCosmoTool.so: loadRamses.o yorick.o miniargs.o fortran.o interpolate.o
2008-12-02 18:22:46 +01:00
2008-12-02 18:22:30 +01:00
depend: $(SOURCES)
@echo "[DEPENDS] $^"
@$(CC) -M -MM $^ > .mydepends
2008-12-02 18:22:46 +01:00
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
2009-01-08 16:19:13 +01:00
@cp ../src/*.tcc ../install/include/CosmoTool
2008-12-02 18:22:46 +01:00
@cp ../src/*.h ../install/include/CosmoTool
2008-12-02 18:22:30 +01:00
distclean: clean
@rm -f .mydepends
clean:
@rm -f *.o
@rm -f $(PROGS)
.mydepends: depend
%.so:
@echo "[LINK SHARED] $@"
@$(CXX) -shared -o $@ $^ $(LIBS)
%.prog:
@echo "[L] $@"
@$(CXX) -o $@ $^ $(LIBS)
%.o: %.c
@echo "[C] $< ..."
2008-12-02 18:22:46 +01:00
@$(CC) -c -fPIC -o $@ $< $(CFLAGS)
2008-12-02 18:22:30 +01:00
%.o: %.cpp
@echo "[C++] $< ..."
2008-12-02 18:22:46 +01:00
@$(CXX) -c -fPIC -o $@ $< $(CXXFLAGS)
2008-12-02 18:22:30 +01:00
include .mydepends