c-kzg-4844/src/Makefile

31 lines
595 B
Makefile
Raw Normal View History

2021-02-04 14:15:15 +00:00
TESTS = blst_util_test fft_common_test fft_fr_test fft_g1_test poly_test
LIB_SRC = poly.c blst_util.c fft_common.c fft_fr.c fft_g1.c
2021-02-03 16:59:59 +00:00
LIB_OBJ = $(LIB_SRC:.c=.o)
CFLAGS =
2021-02-01 20:15:45 +00:00
.PRECIOUS: %.o
2021-02-01 20:15:45 +00:00
2021-02-03 21:00:14 +00:00
%.o: %.c %.h c_kzg.h Makefile
2021-02-03 16:59:59 +00:00
clang -Wall $(CFLAGS) -c $*.c
2021-02-03 16:59:59 +00:00
libckzg.a: $(LIB_OBJ) Makefile
ar rc libckzg.a $(LIB_OBJ)
2021-02-03 21:00:14 +00:00
%_test: %_test.c debug_util.o libckzg.a Makefile
clang -Wall $(CFLAGS) -o $@ $@.c debug_util.o libckzg.a -L../lib -lblst
2021-02-02 23:06:42 +00:00
./$@
2021-02-03 16:59:59 +00:00
lib: clean libckzg.a
debuglib: CFLAGS += -DDEBUG
debuglib: clean libckzg.a
2021-02-01 20:15:45 +00:00
2021-02-03 16:59:59 +00:00
test: $(TESTS)
2021-02-01 20:15:45 +00:00
clean:
rm -f *.o
2021-02-03 14:30:44 +00:00
rm -f libckzg.a
2021-02-03 16:59:59 +00:00
rm -f $(TESTS)
2021-02-01 20:15:45 +00:00
rm -f a.out