diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-01 01:52:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-01 01:52:41 +0100 |
commit | 718b1a6ea1c44bcf15e55d3c265310e1cd9211fa (patch) | |
tree | 845d8af1096f28425fa2b6bd0281bceb8ee6b51f /Makefile | |
parent | Style fix (diff) | |
download | libkeccak-718b1a6ea1c44bcf15e55d3c265310e1cd9211fa.tar.gz libkeccak-718b1a6ea1c44bcf15e55d3c265310e1cd9211fa.tar.bz2 libkeccak-718b1a6ea1c44bcf15e55d3c265310e1cd9211fa.tar.xz |
Improve makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,4 @@ -.NONPOSIX: +.POSIX: # If possible, use CONFIGFILE=optimised.mk CONFIGFILE = config.mk @@ -110,21 +110,22 @@ $(OBJ): $(HDR) $(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS) libkeccak.$(LIBEXT): $(OBJ) - $(CC) $(LIBFLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(LIBFLAGS) -o $@ $(OBJ) $(LDFLAGS) libkeccak.a: $(OBJ) - $(AR) rc $@ $? + -rm -f -- $@ + $(AR) rc $@ $(OBJ) $(AR) -s $@ test: test.o libkeccak.a - $(CC) $(FLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(FLAGS) -o $@ test.o libkeccak.a $(LDFLAGS) test.o: test.c $(HDR) $(CC) $(FLAGS) -O3 -c -o $@ test.c $(CFLAGS) $(CPPFLAGS) benchmark: benchmark.o libkeccak.a - $(CC) $(FLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(FLAGS) -o $@ benchmark.o libkeccak.a $(LDFLAGS) benchmark.o: benchmark.c $(HDR) $(CC) $(FLAGS) -O3 -c -o $@ benchmark.c $(CFLAGS) $(CPPFLAGS) |