2021-05-10 20:08:50 +02:00
|
|
|
sourcefiles:=$(shell find . -name "*.cpp")
|
|
|
|
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
|
|
|
|
|
|
|
|
|
|
|
ifndef CXX
|
|
|
|
CXX = g++
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CXXFLAGS
|
|
|
|
CXXFLAGS = -Wall -pedantic -O2 -std=c++20 -I../src -I/usr/local/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
progname = tests
|
2021-05-17 03:20:51 +02:00
|
|
|
pikotoolslibfile = ../src/pikotools.a
|
2021-05-10 20:08:50 +02:00
|
|
|
|
|
|
|
|
2021-05-17 03:20:51 +02:00
|
|
|
all: $(progname)
|
2021-05-10 20:08:50 +02:00
|
|
|
|
|
|
|
|
2021-05-17 03:20:51 +02:00
|
|
|
$(progname): $(objfiles) FORCE
|
|
|
|
$(CXX) $(CXXFLAGS) -o $(progname) $(objfiles) $(pikotoolslibfile)
|
2021-05-10 20:08:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(objfiles)
|
|
|
|
rm -f $(progname)
|
|
|
|
|
|
|
|
|
|
|
|
depend:
|
|
|
|
makedepend -Y. -I../src -f- $(sourcefiles) > Makefile.dep
|
|
|
|
|
|
|
|
|
2021-05-17 03:20:51 +02:00
|
|
|
FORCE:
|
|
|
|
|
|
|
|
|
2021-05-10 20:08:50 +02:00
|
|
|
-include Makefile.dep
|
|
|
|
|