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 pikotoolslibfile = ../src/pikotools.a all: $(progname) $(progname): $(objfiles) FORCE $(CXX) $(CXXFLAGS) -o $(progname) $(objfiles) $(pikotoolslibfile) %.o: %.cpp $(CXX) -c $(CXXFLAGS) -o $@ $< clean: rm -f $(objfiles) rm -f $(progname) depend: makedepend -Y. -I../src -f- $(sourcefiles) > Makefile.dep FORCE: -include Makefile.dep