cosmotool/lib/Makefile
2008-12-02 11:22:30 -06:00

41 lines
594 B
Makefile

SHLIBS= libCosmoTool.so
CXX=g++
CC=gcc
CXXFLAGS= -ggdb -O3
CFLAGS= -ggdb -O3
SOURCES= loadRamses.cpp yorick.cpp
LIBS= -lnetcdf_c++ -lnetcdf -lm
all: $(SHLIBS)
depend: $(SOURCES)
@echo "[DEPENDS] $^"
@$(CC) -M -MM $^ > .mydepends
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] $< ..."
@$(CC) -c -o $@ $< $(CFLAGS)
%.o: %.cpp
@echo "[C++] $< ..."
@$(CXX) -c -o $@ $< $(CXXFLAGS)
include .mydepends