46 lines
592 B
Makefile
46 lines
592 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../lib
|
||
|
endif
|
||
|
|
||
|
ifndef AR
|
||
|
AR = ar
|
||
|
endif
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
progname = placefinder
|
||
|
|
||
|
|
||
|
all: $(progname)
|
||
|
|
||
|
|
||
|
$(progname): $(objfiles)
|
||
|
$(CXX) -o $(progname) $(CXXFLAGS) $(LDFLAGS) $(objfiles) ../lib/allplacefinder.a ../../pikotools/src/pikotools.a
|
||
|
|
||
|
|
||
|
%.o: %.cpp
|
||
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||
|
|
||
|
|
||
|
clean:
|
||
|
rm -f $(objfiles)
|
||
|
rm -f $(progname)
|
||
|
|
||
|
|
||
|
depend:
|
||
|
makedepend -Y. -I../lib -f- $(sourcefiles) > Makefile.dep
|
||
|
|
||
|
|
||
|
-include Makefile.dep
|
||
|
|