jeger/benchmark/Makefile

25 lines
598 B
Makefile
Raw Normal View History

2023-09-09 12:14:57 -04:00
#CPPFLAGS := -DDEBUG
#CXXFLAGS := -O0 -ggdb
CXXFLAGS := -O2
2023-09-09 10:28:16 -04:00
BUILD.cpp := ${CXX} ${CXXFLAGS} ${CPPFLAGS}
build: jeger gnu
jeger: ../source/vector.c ../source/jeger.c jeger_racer.cpp
2023-09-09 12:14:57 -04:00
g++ -shared ../source/vector.c -o vector.so
g++ -shared ../source/jeger.c -o jeger.so
${BUILD.cpp} -I../source/ jeger_racer.cpp vector.so jeger.so -o jeger_racer.out
2023-09-09 10:28:16 -04:00
gnu: gnu_racer.cpp
${BUILD.cpp} gnu_racer.cpp -o gnu_racer.out
2023-09-09 12:20:25 -04:00
test: build
export LD_LIBRARY_PATH=$$(realpath .):$$LD_LIBRARY_PATH
perf stat -r 10000 ./gnu_racer.out
perf stat -r 10000 ./jeger_racer.out
2023-09-09 10:28:16 -04:00
clean:
rm *.so *.out
2023-09-09 12:20:25 -04:00
.PHONY: test