X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/5cb22046a33f24c1a696990f95e13d534efef497..HEAD:/Makefile diff --git a/Makefile b/Makefile index 82c259a..7bc0df3 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ -CC=gcc +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,18 +11,35 @@ C_OPTS+=-I ext/mongoose/ C_OPTS+=-l ws2_32 C_OPTS+=-l ssl C_OPTS+=-l crypto -C_OPTS+=-D MG_ENABLE_OPENSSL=1 -C_OPTS+=-g -# 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) +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/ -.PHONY: examples +deps: olm mongoose mjson -examples: out/examples/Login out/examples/Send out/examples/SendEncrypted out/examples/Sync \ No newline at end of file +.PHONY: deps olm mongoose mjson \ No newline at end of file