pikotools/tests/Makefile

47 lines
599 B
Makefile

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