You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
830 B
32 lines
830 B
SHELL=/bin/bash |
|
OPTFLAGS=-O2 -flto -g |
|
EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic |
|
CPPFLAGS=-std=gnu++11 -I../include -I/home/michael/tmp/gmt5/include/gmt |
|
LIBSFLAGS=-L/home/michael/tmp/gmt5/lib64 -Wl,-rpath /home/michael/tmp/gmt5/lib64 -lgmt -ldl -lpthread $(MODLIBS) |
|
WARNFLAGS=-Wall |
|
|
|
CFLAGS=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(CPPFLAGS) |
|
LDFLAGS=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(LIBSFLAGS) |
|
|
|
CC=g++ |
|
|
|
SOURCE = $(wildcard *.cpp) |
|
DEPENDS = $(subst .cpp,.d,$(SOURCE)) |
|
OBJECTS = $(subst .cpp,.o,$(SOURCE)) |
|
|
|
gmttest: $(OBJECTS) $(MODOBJECTS) |
|
$(CC) -o $@ $(OBJECTS) $(MODOBJECTS) $(LDFLAGS) |
|
|
|
include $(DEPENDS) |
|
|
|
%.o: %.cpp |
|
$(CC) -c $(CFLAGS) -o $@ $< |
|
|
|
%.d: %.cpp |
|
$(CC) $(CPPFLAGS) -MM -MT $(subst .cpp,.o,$<) $< | sed 's%\(^.*\):%\1 $@ :%g' >$@ |
|
|
|
clean: |
|
rm -f *.o *.d |
|
|
|
distclean: clean |
|
rm -f gmttest
|