diff options
| -rw-r--r-- | .nix/derivation.nix | 1 | ||||
| -rw-r--r-- | Makefile | 17 | ||||
| -rw-r--r-- | README.md | 4 |
3 files changed, 20 insertions, 2 deletions
diff --git a/.nix/derivation.nix b/.nix/derivation.nix index a779c57..ff76034 100644 --- a/.nix/derivation.nix +++ b/.nix/derivation.nix @@ -10,6 +10,7 @@ stdenvNoCC.mkDerivation { nativeBuildInputs = [ clang + gnumake ]; output = [ "out" "dev" ]; diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2e56cbb --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +.PHONY: all clean + +all: build/libkeltest.a + +build/libkeltest.a: + mkdir -p ./build + c++ -std=c++17 -DKELTEST_COMPILE_TEST_BINARY src/keltest/test.cpp -o build/test.o + ar build/libkeltest.a build/test.o + +clean: + rm -rf ./build + +install: build/libkeltest.a + mkdir -p ${prefix}/lib + mkdir -p ${prefix}/include/keltest + cp build/libkeltest.a ${prefix}/lib/libkeltest.a + cp src/keltest/test.h ${prefix}/include/keltest/test.h @@ -19,13 +19,13 @@ Currently just compile each test file with a compiler of your choice with and generate a test binary with -`c++ -std=c++17 -DKEL_COMPILE_TEST_BINARY keltest.a test_file_a.o test_file_b.o -o tests` +`c++ -std=c++17 libkeltest.a test_file_a.o test_file_b.o -o tests` ## Modified commands if not available in env `c++ -std=c++17 test_file_a.cpp -I${keltest_src} -c -o test_file_a.o` `c++ -std=c++17 test_file_b.cpp -I${keltest_src} -c -o test_file_b.o` -`c++ -std=c++17 -DKEL_COMPILE_TEST_BINARY ${keltest_src}/keltest/test.cpp test_file_a.o test_file_b.o -o tests` +`c++ -std=c++17 -DKELTEST_COMPILE_TEST_BINARY ${keltest_src}/keltest/test.cpp test_file_a.o test_file_b.o -o tests` # Writing tests |
