Revision bcfd5e054f2cd37ff002e2ab1d2dfca8b905154c authored by Christoph M. Wintersteiger on 05 December 2019, 15:37:06 UTC, committed by Christoph M. Wintersteiger on 09 December 2019, 11:53:55 UTC
1 parent 19d9952
Raw File
Makefile
# A minimalistic Makefile for all testing options.

TARGETS = $(patsubst %.c,%.exe,$(wildcard *.c))

CFLAGS += -I$(KREMLIN_HOME)/include -I../dist/gcc64-only \
  -I$(KREMLIN_HOME)/kremlib/dist/minimal \
  -O3 -march=native -mtune=native

all: $(TARGETS)

test: $(patsubst %.exe,%.test,$(TARGETS))

# Dependency

%.d: %.c
	@set -e; rm -f $@; \
	  $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
	  sed 's,\($(notdir $*)\)\.o[ :]*,$(dir $@)\1.o $@ : ,g' < $@.$$$$ > $@; \
	  rm -f $@.$$$$

# Compiling against individual files rather than a whole .a
# Side-effect: running with -B ensures *ALL* files get recompiled with optimized
# flags.

curve64-rfc.exe: $(patsubst %.c,%.o,$(wildcard rfc7748_src/*.c))

%.exe: %.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ ../dist/gcc64-only/libevercrypt.a -o $@

# Running tests

%.test: %.exe
	./$<
back to top