fixed makefile
This commit is contained in:
14
Makefile
14
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user