mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-02-17 12:37:49 +00:00
Add library creation to makefile
This commit is contained in:
parent
e5e1ef207f
commit
cc1ea188bc
18
src/Makefile
18
src/Makefile
@ -1,25 +1,25 @@
|
|||||||
tests = fft_util_test fft_fr_test fft_g1_test
|
tests = fft_util_test fft_fr_test fft_g1_test
|
||||||
|
c_kzg_sources = fft_util.c fft_fr.c fft_g1.c
|
||||||
|
c_kzg_objects = $(c_kzg_sources:.c=.o)
|
||||||
|
|
||||||
.PRECIOUS: %.o
|
.PRECIOUS: %.o
|
||||||
|
|
||||||
%.o: %.c %.h c-kzg.h
|
%.o: %.c %.h c-kzg.h
|
||||||
clang -Wall -c $*.c
|
clang -Wall -c $*.c
|
||||||
|
|
||||||
fft_fr_test: fft_fr.o fft_fr_test.c test_util.o fft_util.o Makefile
|
libckzg.a: $(c_kzg_objects)
|
||||||
clang -Wall -o $@ $@.c test_util.o fft_fr.o fft_util.o -L../lib -lblst
|
ar rc libckzg.a $(c_kzg_objects)
|
||||||
|
|
||||||
|
%_test: %_test.c test_util.o libckzg.a Makefile
|
||||||
|
clang -Wall -o $@ $@.c test_util.o libckzg.a -L../lib -lblst
|
||||||
./$@
|
./$@
|
||||||
|
|
||||||
fft_g1_test: fft_g1.o fft_g1_test.c test_util.o fft_util.o Makefile
|
lib: libckzg.a
|
||||||
clang -Wall -o $@ $@.c test_util.o fft_g1.o fft_util.o -L../lib -lblst
|
|
||||||
./$@
|
|
||||||
|
|
||||||
%_test: %.o %_test.c test_util.o Makefile
|
|
||||||
clang -Wall -o $@ $@.c test_util.o $*.o -L../lib -lblst
|
|
||||||
./$@
|
|
||||||
|
|
||||||
test: $(tests)
|
test: $(tests)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
rm -f libckzg.a
|
||||||
rm -f $(tests)
|
rm -f $(tests)
|
||||||
rm -f a.out
|
rm -f a.out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user