Fixed. Simplified
This commit is contained in:
parent
1fea6371e6
commit
88157e5687
3 changed files with 40 additions and 58 deletions
40
lib/Makefile
Normal file
40
lib/Makefile
Normal file
|
@ -0,0 +1,40 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue