cosmotool/lib/Makefile

52 lines
1.2 KiB
Makefile
Raw Normal View History

2010-09-12 10:35:25 +02:00
SHLIBS= libCosmoTool.$(SOSUFFIX)
2010-04-23 09:29:10 +02:00
SOURCES= loadRamses.cpp yorick.cpp miniargs.cpp fortran.cpp interpolate.cpp load_data.cpp powerSpectrum.cpp octTree.cpp loadGadget.cpp
2009-01-08 16:19:13 +01:00
LIBS= -lnetcdf_c++ -lnetcdf -lgsl -lgslcblas -lm
2008-12-02 18:22:30 +01:00
2009-01-11 17:04:59 +01:00
include config.mk
2008-12-02 18:22:46 +01:00
VPATH=../src
2008-12-02 18:22:30 +01:00
all: $(SHLIBS)
2010-09-12 10:35:25 +02:00
libCosmoTool.$(SOSUFFIX): loadRamses.o yorick.o miniargs.o fortran.o interpolate.o load_data.o powerSpectrum.o octTree.o loadGadget.o
2008-12-02 18:22:46 +01:00
2008-12-02 18:22:30 +01:00
depend: $(SOURCES)
@echo "[DEPENDS] $^"
2009-01-11 17:04:59 +01:00
@$(CC) $(CPPFLAGS) -M -MM $^ > .mydepends
2008-12-02 18:22:30 +01:00
2008-12-02 18:22:46 +01:00
install:
@mkdir -p ../install/lib
@mkdir -p ../install/include/CosmoTool
@echo "Copying libraries"
2010-09-12 10:35:25 +02:00
@cp libCosmoTool.$(SOSUFFIX) ../install/lib
2008-12-02 18:22:46 +01:00
@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
2008-12-02 18:22:30 +01:00
distclean: clean
@rm -f .mydepends
clean:
@rm -f *.o
@rm -f $(PROGS)
2009-01-11 17:04:59 +01:00
.mydepends: depend Makefile config.mk
2008-12-02 18:22:30 +01:00
2010-09-12 10:35:25 +02:00
%.$(SOSUFFIX):
2008-12-02 18:22:30 +01:00
@echo "[LINK SHARED] $@"
2010-09-12 10:35:25 +02:00
@$(CXX) $(SOFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
2008-12-02 18:22:30 +01:00
%.prog:
@echo "[L] $@"
2009-01-11 17:04:59 +01:00
@$(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
2008-12-02 18:22:30 +01:00
%.o: %.c
@echo "[C] $< ..."
2009-01-11 17:04:59 +01:00
@$(CC) -c -fPIC -o $@ $< $(CPPFLAGS) $(CFLAGS)
2008-12-02 18:22:30 +01:00
%.o: %.cpp
@echo "[C++] $< ..."
2009-01-11 17:04:59 +01:00
@$(CXX) -c -fPIC -o $@ $< $(CPPFLAGS) $(CXXFLAGS)
2008-12-02 18:22:30 +01:00
include .mydepends