Files
pikotools/tests/Makefile
Tomasz Sowa c7adffd9fd sort a makedepend output
Makefile.dep is sorted now - it's better when making a diff to the previous version.
2024-09-22 15:24:05 +02:00

46 lines
604 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
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 -w 10 -Y. -I../src -f- $(sourcefiles) | sort -u > Makefile.dep
FORCE:
-include Makefile.dep