added 'tests' directory with tests for the pikotools library
currently only tests for convert/text functions
This commit is contained in:
46
tests/Makefile
Normal file
46
tests/Makefile
Normal file
@@ -0,0 +1,46 @@
|
||||
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
|
||||
|
||||
|
||||
all: $(progname) pikotools
|
||||
|
||||
|
||||
$(progname): $(objfiles) pikotools
|
||||
$(CXX) $(CXXFLAGS) -o $(progname) $(objfiles) ../src/pikotools.a
|
||||
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||||
|
||||
|
||||
pikotools: FORCE
|
||||
$(MAKE) -C ../src
|
||||
|
||||
|
||||
FORCE:
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(objfiles)
|
||||
rm -f $(progname)
|
||||
|
||||
|
||||
depend:
|
||||
makedepend -Y. -I../src -f- $(sourcefiles) > Makefile.dep
|
||||
|
||||
|
||||
-include Makefile.dep
|
||||
|
Reference in New Issue
Block a user