2022-06-26 06:16:09 +02:00
|
|
|
sourcefiles:=$(shell find . -name "*.cpp")
|
|
|
|
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
2009-11-13 22:10:06 +01:00
|
|
|
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
|
|
|
|
ifndef CXX
|
|
|
|
CXX = g++
|
2016-03-18 10:22:13 +01:00
|
|
|
endif
|
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
ifndef CXXFLAGS
|
|
|
|
CXXFLAGS = -Wall -pedantic -O2 -std=c++20 -I../../pikotools/src -I/usr/local/include
|
|
|
|
endif
|
2016-03-18 10:22:13 +01:00
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
ifndef AR
|
|
|
|
AR = ar
|
|
|
|
endif
|
2016-03-18 10:22:13 +01:00
|
|
|
|
|
|
|
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
libname = ezc.a
|
2013-10-16 01:48:06 +02:00
|
|
|
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
all: $(libname)
|
2016-03-18 10:22:13 +01:00
|
|
|
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
$(libname): $(objfiles)
|
|
|
|
$(AR) rcs $(libname) $(objfiles)
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2022-06-26 06:16:09 +02:00
|
|
|
rm -f $(objfiles)
|
2012-01-12 03:32:04 +01:00
|
|
|
rm -f $(libname)
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
2022-06-26 06:16:09 +02:00
|
|
|
depend:
|
|
|
|
makedepend -Y. -I../../pikotools/src -f- $(sourcefiles) > Makefile.dep
|
|
|
|
|
|
|
|
|
|
|
|
-include Makefile.dep
|
|
|
|
|