From d007bf79d088095432e0142231a354c7c615f11a Mon Sep 17 00:00:00 2001 From: dancoffman Date: Fri, 4 Nov 2022 13:44:04 -0700 Subject: [PATCH] Do not change the default behavior of src `make` --- src/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 8f95212..3eb3a79 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,13 @@ INCLUDE_DIRS = ../inc CFLAGS += -O2 +all: c_kzg_4844.o lib + +c_kzg_4844.o: c_kzg_4844.c Makefile + clang -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $< + +# Will fail with "patch does not apply" if it has already been patched. +# Safe to ignore. blst: cd ../blst; \ git apply < ../blst_sha.patch; \ @@ -8,8 +15,6 @@ blst: cp libblst.a ../lib && \ cp bindings/*.h ../inc -c_kzg_4844.o: c_kzg_4844.c Makefile - clang -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $< - +# Copy make sure c_kzg_4844.o is built and copy it for the NodeJS bindings lib: c_kzg_4844.o Makefile cp *.o ../bindings/node.js