]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - Makefile
remove newline
[matrix_esp_thesis] / Makefile
index 82c259ab65a27aa1862edd8649c5fb4aa731e656..7bc0df3775c766f679289968345e408a69b9be52 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,9 @@
-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
 \r
 C_OPTS=-Wall -Wextra -pedantic\r
 C_OPTS+=src/matrix.c\r
 C_OPTS+=src/matrix_http_mongoose.c\r
-C_OPTS+=ext/mjson/src/mjson.c\r
-C_OPTS+=ext/mongoose/mongoose.c\r
+C_OPTS+=out/*.o\r
 C_OPTS+=-I src/\r
 C_OPTS+=-I ext/olm/include/\r
 C_OPTS+=-I ext/mjson/src/\r
 C_OPTS+=-I src/\r
 C_OPTS+=-I ext/olm/include/\r
 C_OPTS+=-I ext/mjson/src/\r
@@ -12,18 +11,35 @@ C_OPTS+=-I ext/mongoose/
 C_OPTS+=-l ws2_32\r
 C_OPTS+=-l ssl\r
 C_OPTS+=-l crypto\r
 C_OPTS+=-l ws2_32\r
 C_OPTS+=-l ssl\r
 C_OPTS+=-l crypto\r
-C_OPTS+=-D MG_ENABLE_OPENSSL=1\r
-C_OPTS+=-g\r
-# C_OPTS+=-I ext/curl/include/\r
-# C_OPTS+=-L ext/curl/build/lib/\r
-# C_OPTS+=-l curl\r
-\r
-#C_OPTS+=-Wl,--verbose\r
+C_OPTS+=-l stdc++\r
+# uncomment to generate msvc debug symbols with clang (requires lld)\r
+# C_OPTS+=-fuse-ld=lld -g -gcodeview -Wl,/debug,/pdb:\r
 \r
 out/examples/%: examples/%.c src/*\r
        $(CC) -o out/examples/$* examples/$*.c $(C_OPTS)\r
 \r
 \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
 \r
-.PHONY: examples\r
+deps: olm mongoose mjson\r
 \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