start working on an allplacefinder library
in 'lib' directory there'll be the library in 'placefinder' directory there'll be a cmd tool (placefinder)
This commit is contained in:
45
lib/Makefile
Normal file
45
lib/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
sourcefiles:=$(shell find . -name "*.cpp")
|
||||
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
||||
|
||||
|
||||
|
||||
ifndef CXX
|
||||
CXX = g++
|
||||
endif
|
||||
|
||||
ifndef CXXFLAGS
|
||||
CXXFLAGS = -Wall -pedantic -O2 -std=c++20
|
||||
endif
|
||||
|
||||
ifndef AR
|
||||
AR = ar
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
libname = allplacefinder.a
|
||||
|
||||
|
||||
all: $(libname)
|
||||
|
||||
|
||||
$(libname): $(objfiles)
|
||||
$(AR) rcs $(libname) $(objfiles)
|
||||
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(objfiles)
|
||||
rm -f $(libname)
|
||||
|
||||
|
||||
depend:
|
||||
makedepend -Y. -f- $(sourcefiles) > Makefile.dep
|
||||
|
||||
|
||||
-include Makefile.dep
|
||||
|
Reference in New Issue
Block a user