diff options
| author | Patrick | 2023-11-13 21:13:00 +0100 |
|---|---|---|
| committer | Patrick | 2023-11-13 21:13:00 +0100 |
| commit | 0326538d115050abe9a57c7517715ab5642d85eb (patch) | |
| tree | 2b911f4e9196d43aed1f60f50b8d78d1989d7699 | |
| parent | 03dae6117523564ee29b35b087970cfa3d523d20 (diff) | |
| download | matrix_esp_thesis-0326538d115050abe9a57c7517715ab5642d85eb.tar.gz matrix_esp_thesis-0326538d115050abe9a57c7517715ab5642d85eb.zip | |
update Makefile
| -rw-r--r-- | Makefile | 42 |
1 files changed, 26 insertions, 16 deletions
@@ -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 |
