From 0326538d115050abe9a57c7517715ab5642d85eb Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 13 Nov 2023 21:13:00 +0100 Subject: [PATCH] update Makefile --- Makefile | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index c82a055..ce1ae2b 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ -CC=clang++ +CC=clang C_OPTS=-Wall -Wextra -pedantic C_OPTS+=src/matrix.c C_OPTS+=src/matrix_http_mongoose.c -C_OPTS+=ext/mjson/src/mjson.c -C_OPTS+=ext/mongoose/mongoose.c +C_OPTS+=out/*.o C_OPTS+=-I src/ C_OPTS+=-I ext/olm/include/ C_OPTS+=-I ext/mjson/src/ @@ -13,23 +12,34 @@ C_OPTS+=-l ws2_32 C_OPTS+=-l ssl C_OPTS+=-l crypto C_OPTS+=-l stdc++ -C_OPTS+=out/olmdbg/libolm.a -C_OPTS+=-D MG_ENABLE_OPENSSL=1 -C_OPTS+=-fuse-ld=lld.exe -g -gcodeview -Wl,/debug,/pdb:out/test.pdb -# C_OPTS+=-I ext/curl/include/ -# C_OPTS+=-L ext/curl/build/lib/ -# C_OPTS+=-l curl - +#C_OPTS+=-fuse-ld=lld.exe -g -gcodeview -Wl,/debug,/pdb:out/test.pdb #C_OPTS+=-Wl,--verbose out/examples/%: examples/%.c src/* $(CC) -o out/examples/$* examples/$*.c $(C_OPTS) -.PHONY: examples +olm: + cd out && \ + $(CC) -c \ + ../ext/olm/src/* \ + ../ext/olm/lib/crypto-algorithms/aes.c \ + ../ext/olm/lib/curve25519-donna/curve25519-donna.c \ + ../ext/olm/lib/crypto-algorithms/sha256.c \ + -I ../ext/olm/include \ + -I ../ext/olm/lib \ + -DOLM_STATIC_DEFINE \ + -DOLMLIB_VERSION_MAJOR=3 \ + -DOLMLIB_VERSION_MINOR=2 \ + -DOLMLIB_VERSION_PATCH=15 + +mongoose: + cd out && \ + $(CC) -c ../ext/mongoose/mongoose.c -I ../ext/mongoose/ -DMG_ENABLE_OPENSSL=1 + +mjson: + cd out && \ + $(CC) -c ../ext/mjson/src/mjson.c -I ../ext/mjson/src/ -examples: out/examples/Login out/examples/Send out/examples/SendEncrypted out/examples/Sync +deps: olm mongoose mjson -out/olm/libolm.a: - cd out/olm - cmake -DBUILD_SHARED_LIBS=OFF -DOLM_TESTS=OFF ../../ext/olm - cmake --build . \ No newline at end of file +.PHONY: deps olm mongoose mjson \ No newline at end of file -- 2.50.1