2021-03-17 13:16:01 +01:00
|
|
|
sourcefiles:=$(shell find . -name "*.cpp")
|
|
|
|
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CXX = g++10
|
|
|
|
#CXX = clang++
|
|
|
|
#CXXFLAGS = -fsanitize=address -O0 -g3 -gdwarf-2 -O0 -std=c++14 -I../ttmath -I../pikotools -Wl,-rpath=/usr/local/lib/gcc5/ -Wall -pedantic -Wextra
|
|
|
|
#CXXFLAGS = -O0 -g3 -gdwarf-2 -O0 -std=c++17 -I../ttmath -I../pikotools -Wl,-rpath=/usr/local/lib/gcc7/ -Wall -pedantic -Wextra
|
|
|
|
CXXFLAGS = -Wl,-rpath=/usr/local/lib/gcc10/ -O0 -g3 -std=c++20 -I../pikotools -Wall -pedantic
|
|
|
|
|
2012-01-12 03:46:16 +01:00
|
|
|
|
|
|
|
ifndef CXX
|
2013-10-16 01:53:57 +02:00
|
|
|
CXX = clang++
|
2012-01-12 03:46:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CXXFLAGS
|
2013-10-16 01:53:57 +02:00
|
|
|
CXXFLAGS = -Wall -O2 -I/usr/local/include
|
2012-01-12 03:46:16 +01:00
|
|
|
endif
|
|
|
|
|
2012-07-01 01:22:31 +02:00
|
|
|
ifndef LDFLAGS
|
|
|
|
LDFLAGS = -L/usr/local/lib
|
|
|
|
endif
|
|
|
|
|
2014-11-12 05:11:28 +01:00
|
|
|
ifndef AR
|
|
|
|
AR = ar
|
|
|
|
endif
|
|
|
|
|
2012-01-12 03:46:16 +01:00
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
#export CXX
|
|
|
|
#export CXXFLAGS
|
|
|
|
#export LDFLAGS
|
|
|
|
#export AR
|
2012-05-05 17:08:04 +02:00
|
|
|
|
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
libname = pikotools.a
|
2012-05-05 17:08:04 +02:00
|
|
|
|
2012-01-12 03:46:16 +01:00
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
all: $(libname)
|
2012-01-12 03:46:16 +01:00
|
|
|
|
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
$(libname): $(objfiles)
|
|
|
|
$(AR) rcs $(libname) $(objfiles)
|
2016-01-21 19:49:42 +01:00
|
|
|
|
2012-01-12 03:46:16 +01:00
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
2012-05-05 17:08:04 +02:00
|
|
|
|
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
clean:
|
|
|
|
rm -f $(objfiles)
|
|
|
|
rm -f $(libname)
|
2012-05-05 17:08:04 +02:00
|
|
|
|
2012-01-12 03:46:16 +01:00
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
depend:
|
|
|
|
makedepend -Y. -f- $(sourcefiles) > Makefile.dep
|
2012-01-12 03:46:16 +01:00
|
|
|
|
|
|
|
|
2021-03-17 13:16:01 +01:00
|
|
|
-include Makefile.dep
|
2012-01-12 03:46:16 +01:00
|
|
|
|