Makefile (775B)
1 .SUFFIXES: .o .c 2 3 CC=clang 4 OBJS=\ 5 hnp.o \ 6 dlog_fmpz.o 7 DEPS=hnp.h 8 CFLAGS+=-std=c99 -pedantic -Wall -Werror -Wstrict-prototypes 9 CFLAGS+=-Wmissing-prototypes -Wmissing-declarations -Wshadow 10 CFLAGS+=-Wpointer-arith -Wcast-qual -Wsign-compare -O2 11 CFLAGS+=-fstack-protector-all -Wtype-limits -fno-common 12 CFLAGS+=-fno-builtin 13 CFLAGS+=-I/usr/local/include/flint -I/usr/local/include 14 LDFLAGS=-L/usr/local/lib -lflint -lgmp 15 BUILDDIR=build 16 EXAMPLES=\ 17 hnpsolve 18 19 all: $(BUILDDIR) $(OBJS) $(EXAMPLES) 20 21 $(BUILDDIR): 22 mkdir -p $(BUILDDIR) 23 mkdir -p $(BUILDDIR)/examples 24 25 .c.o: $(DEPS) 26 $(CC) $(CFLAGS) -c $< -o $(BUILDDIR)/$@ 27 28 hnpsolve: examples/hnpsolve.c 29 $(CC) $(CFLAGS) -I./ -o $(BUILDDIR)/examples/hnpsolve examples/hnpsolve.c $(BUILDDIR)/*.o $(LDFLAGS) 30 31 clean: 32 rm -rf $(BUILDDIR)