fixed makefile

This commit is contained in:
Your Name
2025-08-16 14:55:23 -04:00
parent 6be88f7d64
commit 908a8f4b1f
5 changed files with 182215 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
# Event Miner Makefile
# Static build with nostr_core_lib dependency
# Build with nostr_core_lib dependency (uses system libraries)
CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -O2 -static
CFLAGS = -Wall -Wextra -std=c99 -O2
INCLUDES = -Inostr_core_lib/nostr_core
LIBS = -lm -lpthread
NOSTR_LIB = nostr_core_lib/libnostr_core.a
LIBS = -lz -ldl -lpthread -lm -L/usr/local/lib -lsecp256k1 -lssl -lcrypto -L/usr/local/lib -lcurl
NOSTR_LIB = nostr_core_lib/libnostr_core_x64.a
# Default target
all: event_miner
@@ -19,14 +19,14 @@ event_miner: event_miner.c $(NOSTR_LIB)
# Build nostr_core_lib dependency
$(NOSTR_LIB):
@echo "Building nostr_core_lib dependency..."
cd nostr_core_lib && make
cd nostr_core_lib && ./build.sh x64
@echo "✓ nostr_core_lib built successfully"
# Clean target
clean:
@echo "Cleaning build artifacts..."
rm -f event_miner
cd nostr_core_lib && make clean
cd nostr_core_lib && rm -f *.o libnostr_core_*.a
# Clean only event_miner (keep nostr_core_lib)
clean-miner:
@@ -75,6 +75,6 @@ help:
@echo " make clean && make # Clean rebuild"
@echo " make test # Build and test"
@echo ""
@echo "The binary will be statically linked with no external dependencies."
@echo "The binary will be linked with system libraries (OpenSSL, curl, secp256k1)."
.PHONY: all clean clean-miner test install uninstall rebuild help