Last version before deleting Makefile and CmakeLists.txt
This commit is contained in:
30
Makefile
30
Makefile
@@ -14,10 +14,10 @@ ifneq ($(ENABLE_LOGGING),)
|
||||
endif
|
||||
|
||||
# Include paths
|
||||
INCLUDES = -I. -Inostr_core -Icjson -Isecp256k1/include -Inostr_websocket -I./openssl-install/include
|
||||
INCLUDES = -I. -Inostr_core -Inostr_core/crypto -Icjson -Isecp256k1/include -Inostr_websocket -I./openssl-install/include
|
||||
|
||||
# Library source files
|
||||
LIB_SOURCES = nostr_core/core.c nostr_core/core_relays.c nostr_core/nostr_crypto.c nostr_core/nostr_secp256k1.c nostr_core/nostr_aes.c nostr_core/nostr_chacha20.c nostr_websocket/nostr_websocket_openssl.c cjson/cJSON.c
|
||||
# Library source files - modular NIP-based structure
|
||||
LIB_SOURCES = nostr_core/crypto/nostr_crypto.c nostr_core/crypto/nostr_secp256k1.c nostr_core/crypto/nostr_aes.c nostr_core/crypto/nostr_chacha20.c cjson/cJSON.c nostr_core/utils.c nostr_core/nip001.c nostr_core/nip005.c nostr_core/nip006.c nostr_core/nip011.c nostr_core/nip013.c nostr_core/nip019.c
|
||||
LIB_OBJECTS = $(LIB_SOURCES:.c=.o)
|
||||
ARM64_LIB_OBJECTS = $(LIB_SOURCES:.c=.arm64.o)
|
||||
|
||||
@@ -243,11 +243,11 @@ ARM64_CORE_TEST_EXEC = tests/nostr_core_test_arm64
|
||||
ARM64_RELAY_POOL_TEST_EXEC = tests/relay_pool_test_arm64
|
||||
ARM64_NIP04_TEST_EXEC = tests/nip04_test_arm64
|
||||
|
||||
# Test compilation flags
|
||||
TEST_CFLAGS = -Wall -Wextra -std=c99 -g -I. -I./secp256k1/include -I./openssl-install/include -DDISABLE_NIP05
|
||||
TEST_LDFLAGS = -L. -lnostr_core -lm -static
|
||||
ARM64_TEST_CFLAGS = -Wall -Wextra -std=c99 -g -I. -DDISABLE_NIP05
|
||||
ARM64_TEST_LDFLAGS = -L. -lnostr_core_arm64 -lssl -lcrypto -lm -static
|
||||
# Test compilation flags - matches exact customer usage pattern
|
||||
TEST_CFLAGS = -Wall -Wextra -std=c99 -g -I. -I./secp256k1/include -I./openssl-install/include
|
||||
TEST_LDFLAGS = ./libnostr_core.a -lm -static
|
||||
ARM64_TEST_CFLAGS = -Wall -Wextra -std=c99 -g -I.
|
||||
ARM64_TEST_LDFLAGS = ./libnostr_core_arm64.a -lm -static
|
||||
|
||||
# Build crypto test executable (x86_64)
|
||||
$(CRYPTO_TEST_EXEC): tests/nostr_crypto_test.c $(STATIC_LIB)
|
||||
@@ -279,10 +279,10 @@ $(NIP04_TEST_EXEC): tests/nip04_test.c $(STATIC_LIB)
|
||||
@echo "Building NIP-04 encryption test suite (x86_64)..."
|
||||
$(CC) $(TEST_CFLAGS) $< -o $@ $(TEST_LDFLAGS)
|
||||
|
||||
# Build HTTP test executable (x86_64) - Uses static curl for compatibility testing
|
||||
$(HTTP_TEST_EXEC): tests/http_test.c
|
||||
# Build HTTP test executable (x86_64) - Uses customer linking pattern
|
||||
$(HTTP_TEST_EXEC): tests/http_test.c $(STATIC_LIB)
|
||||
@echo "Building HTTP/curl compatibility test (x86_64)..."
|
||||
$(CC) $(TEST_CFLAGS) -I./curl-install/include $< -o $@ ./curl-install/lib/libcurl.a -lssl -lcrypto -lz -ldl -lpthread -static
|
||||
$(CC) $(TEST_CFLAGS) $< -o $@ $(TEST_LDFLAGS)
|
||||
|
||||
# Build WebSocket SSL test executable (x86_64)
|
||||
$(WSS_TEST_EXEC): tests/wss_test.c $(STATIC_LIB)
|
||||
@@ -299,15 +299,15 @@ $(MAKEFILE_STATIC_TEST_EXEC): tests/makefile_static_test.c
|
||||
@echo "Building Makefile-based static configuration test (x86_64)..."
|
||||
$(CC) $(TEST_CFLAGS) $< -o $@ -static
|
||||
|
||||
# Build NIP-05 test executable (x86_64) - NIP-05 enabled with static curl
|
||||
# Build NIP-05 test executable (x86_64) - Uses customer linking pattern
|
||||
$(NIP05_TEST_EXEC): tests/nip05_test.c $(STATIC_LIB)
|
||||
@echo "Building NIP-05 identifier verification test (x86_64)..."
|
||||
$(CC) -Wall -Wextra -std=c99 -g -I. -I./secp256k1/include -I./openssl-install/include -I./curl-install/include $< -o $@ -L. -L./openssl-install/lib64 -lnostr_core ./curl-install/lib/libcurl.a ./openssl-install/lib64/libssl.a ./openssl-install/lib64/libcrypto.a -lz -ldl -lpthread -lm -static
|
||||
$(CC) $(TEST_CFLAGS) $< -o $@ $(TEST_LDFLAGS)
|
||||
|
||||
# Build NIP-11 test executable (x86_64) - NIP-11 enabled with static curl
|
||||
# Build NIP-11 test executable (x86_64) - Uses customer linking pattern
|
||||
$(NIP11_TEST_EXEC): tests/nip11_test.c $(STATIC_LIB)
|
||||
@echo "Building NIP-11 relay information test (x86_64)..."
|
||||
$(CC) -Wall -Wextra -std=c99 -g -I. -I./secp256k1/include -I./openssl-install/include -I./curl-install/include $< -o $@ -L. -L./openssl-install/lib64 -lnostr_core ./curl-install/lib/libcurl.a ./openssl-install/lib64/libssl.a ./openssl-install/lib64/libcrypto.a -lz -ldl -lpthread -lm -static
|
||||
$(CC) $(TEST_CFLAGS) $< -o $@ $(TEST_LDFLAGS)
|
||||
|
||||
# Build simple initialization test executable (x86_64)
|
||||
tests/simple_init_test: tests/simple_init_test.c $(STATIC_LIB)
|
||||
|
||||
Reference in New Issue
Block a user