X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/a8515e0eed66fa9d48297d4d5b2176ca564193ce..HEAD:/Makefile diff --git a/Makefile b/Makefile index bfcb1de..7bc0df3 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/ @@ -12,23 +11,35 @@ C_OPTS+=-I ext/mongoose/ C_OPTS+=-l ws2_32 C_OPTS+=-l ssl C_OPTS+=-l crypto -C_OPTS+=out/olm/libolm.a -C_OPTS+=-D MG_ENABLE_OPENSSL=1 -C_OPTS+=-fuse-ld=lld.exe -g -gcodeview -Wl,/debug,/pdb:test.pdb -# C_OPTS+=-I ext/curl/include/ -# C_OPTS+=-L ext/curl/build/lib/ -# C_OPTS+=-l curl - -#C_OPTS+=-Wl,--verbose +C_OPTS+=-l stdc++ +# uncomment to generate msvc debug symbols with clang (requires lld) +# C_OPTS+=-fuse-ld=lld -g -gcodeview -Wl,/debug,/pdb: 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