]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - Makefile
changes to olm and esp
[matrix_esp_thesis] / Makefile
index d19abaa22537315f818f4fe2c0e5a3677356ca09..ce1ae2b9c1ac66a3dc5ca3a19204ca6981667ab2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,45 @@
-CC=gcc\r
+CC=clang\r
 \r
 C_OPTS=-Wall -Wextra -pedantic\r
+C_OPTS+=src/matrix.c\r
+C_OPTS+=src/matrix_http_mongoose.c\r
+C_OPTS+=out/*.o\r
 C_OPTS+=-I src/\r
 C_OPTS+=-I ext/olm/include/\r
-C_OPTS+=src/matrix.c\r
+C_OPTS+=-I ext/mjson/src/\r
+C_OPTS+=-I ext/mongoose/\r
+C_OPTS+=-l ws2_32\r
+C_OPTS+=-l ssl\r
+C_OPTS+=-l crypto\r
+C_OPTS+=-l stdc++\r
+#C_OPTS+=-fuse-ld=lld.exe -g -gcodeview -Wl,/debug,/pdb:out/test.pdb\r
+#C_OPTS+=-Wl,--verbose\r
 \r
-out/examples/%: examples/%.c\r
+out/examples/%: examples/%.c src/*\r
        $(CC) -o out/examples/$* examples/$*.c $(C_OPTS)\r
 \r
+olm:\r
+       cd out && \\r
+       $(CC) -c \\r
+               ../ext/olm/src/* \\r
+               ../ext/olm/lib/crypto-algorithms/aes.c \\r
+               ../ext/olm/lib/curve25519-donna/curve25519-donna.c \\r
+               ../ext/olm/lib/crypto-algorithms/sha256.c \\r
+               -I ../ext/olm/include \\r
+               -I ../ext/olm/lib \\r
+               -DOLM_STATIC_DEFINE \\r
+               -DOLMLIB_VERSION_MAJOR=3 \\r
+               -DOLMLIB_VERSION_MINOR=2 \\r
+               -DOLMLIB_VERSION_PATCH=15\r
+\r
+mongoose:\r
+       cd out && \\r
+       $(CC) -c ../ext/mongoose/mongoose.c -I ../ext/mongoose/ -DMG_ENABLE_OPENSSL=1\r
+\r
+mjson:\r
+       cd out && \\r
+       $(CC) -c ../ext/mjson/src/mjson.c -I ../ext/mjson/src/\r
 \r
-.PHONY: examples\r
+deps: olm mongoose mjson\r
 \r
-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