2022-06-26 06:15:19 +02:00
|
|
|
sourcefiles:=$(shell find . -name "*.cpp")
|
|
|
|
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
ifndef CXX
|
|
|
|
CXX = g++
|
|
|
|
endif
|
2019-08-21 17:59:03 +02:00
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
ifndef CXXFLAGS
|
|
|
|
CXXFLAGS = -Wall -pedantic -O2 -std=c++20 -I../src -I../../pikotools/src -I/usr/local/include
|
|
|
|
endif
|
2019-08-21 17:59:03 +02:00
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
ifndef LDFLAGS
|
|
|
|
LDFLAGS = -L/usr/local/lib
|
|
|
|
endif
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
name = mormsample
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
all: $(name)
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
$(name): morm pikotools $(objfiles)
|
|
|
|
$(CXX) -o $(name) $(CXXFLAGS) $(LDFLAGS) $(objfiles) ../src/morm.a ../../pikotools/src/pikotools.a $(LDFLAGS) -lpq -lpthread
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
morm: FORCE
|
|
|
|
@cd ../src ; $(MAKE) -e
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
pikotools: FORCE
|
|
|
|
@cd ../../pikotools/src ; $(MAKE) -e
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
2021-06-24 21:14:29 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
clean:
|
|
|
|
rm -f $(objfiles)
|
|
|
|
rm -f $(name)
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
depend:
|
2022-06-26 06:15:19 +02:00
|
|
|
makedepend -Y. -I../src -I../../pikotools/src -f- $(sourcefiles) > Makefile.dep
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
FORCE:
|
|
|
|
|
2019-08-21 17:59:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-26 06:15:19 +02:00
|
|
|
-include Makefile.dep
|
2019-08-21 17:59:03 +02:00
|
|
|
|