diff options
| author | Claudius Holeksa <mail@keldu.de> | 2023-05-09 17:45:17 +0200 |
|---|---|---|
| committer | Claudius Holeksa <mail@keldu.de> | 2023-05-09 17:45:17 +0200 |
| commit | ecfee1ff28824eaef7cf9ff7bc422e5e99202121 (patch) | |
| tree | 7a74b57df26d482c06f69cd21da31551a01eb908 | |
| parent | accd05e6c5f41c536a97a7313ea1e635b0863205 (diff) | |
| download | mini-test-ecfee1ff28824eaef7cf9ff7bc422e5e99202121.tar.gz | |
Added Makefile and ammended README and nix files for that change
| -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 |
