From 1196eb51cc1ff8bc6293f9e5a1109c038f50c395 Mon Sep 17 00:00:00 2001 From: Bill Cox Date: Mon, 29 Jun 2015 11:54:02 -0700 Subject: [PATCH] Updated Makefiles based on feedback from Rune Magnussen --- software/Makefile | 14 +++++--------- software/infnoise.c | 1 + software/tools/Makefile | 23 ++++++++++++++--------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/software/Makefile b/software/Makefile index e737859..2576b23 100644 --- a/software/Makefile +++ b/software/Makefile @@ -1,13 +1,9 @@ -all: infnoise infnoise-v1 passgen +CFLAGS = -Wall -std=c99 -O3 -I Keccak + +all: infnoise infnoise: infnoise.c infnoise.h healthcheck.c writeentropy.c Keccak/KeccakF-1600-reference.c Keccak/brg_endian.h - gcc -Wall -std=c99 -O3 -I Keccak -o infnoise infnoise.c healthcheck.c writeentropy.c Keccak/KeccakF-1600-reference.c -lftdi -lm -lrt - -infnoise-v1: infnoise.c infnoise.h healthcheck.c writeentropy.c Keccak/KeccakF-1600-reference.c Keccak/brg_endian.h - gcc -Wall -std=c99 -O3 -DVERSION1 -I Keccak -o infnoise-v1 infnoise.c healthcheck.c writeentropy.c Keccak/KeccakF-1600-reference.c -lftdi -lm -lrt - -passgen: passgen.c - gcc -Wall -std=c99 -O3 -o passgen passgen.c -lm + $(CC) $(CFLAGS) -o infnoise infnoise.c healthcheck.c writeentropy.c Keccak/KeccakF-1600-reference.c -lftdi -lm -lrt clean: - rm -f infnoise infnoise-v1 + $(RM) -f infnoise diff --git a/software/infnoise.c b/software/infnoise.c index 107fc96..79f8ad8 100644 --- a/software/infnoise.c +++ b/software/infnoise.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/software/tools/Makefile b/software/tools/Makefile index b0fec93..091d352 100644 --- a/software/tools/Makefile +++ b/software/tools/Makefile @@ -1,25 +1,30 @@ -all: healthcheck findlongest entcheck hex2bin bin2hex flipbits dice +CFLAGS=-Wall -std=c99 -O3 + +all: passgen healthcheck findlongest entcheck hex2bin bin2hex flipbits dice + +passgen: passgen.c + $(CC) $(CFLAGS) -o passgen passgen.c -lm healthcheck: ../healthcheck.c - gcc -Wall -std=c99 -O3 -D TEST_HEALTHCHECK -o healthcheck ../healthcheck.c -lm -lrt + $(CC) $(CFLAGS) -D TEST_HEALTHCHECK -o healthcheck ../healthcheck.c -lm -lrt entcheck: entcheck.c - gcc -Wall -std=c99 -O3 -o entcheck entcheck.c -lm -lrt + $(CC) $(CFLAGS) -o entcheck entcheck.c -lm -lrt findlongest: findlongest.c - gcc -Wall -std=c99 -O3 -o findlongest findlongest.c + $(CC) $(CFLAGS) -o findlongest findlongest.c hex2bin: hex2bin.c - gcc -Wall -std=c99 -O3 -o hex2bin hex2bin.c + $(CC) $(CFLAGS) -o hex2bin hex2bin.c bin2hex: bin2hex.c - gcc -Wall -std=c99 -O3 -o bin2hex bin2hex.c + $(CC) $(CFLAGS) -o bin2hex bin2hex.c flipbits: flipbits.c - gcc -Wall -std=c99 -O3 -o flipbits flipbits.c + $(CC) $(CFLAGS) -o flipbits flipbits.c dice: dice.c - gcc -Wall -std=c99 -O3 -o dice dice.c + $(CC) $(CFLAGS) -o dice dice.c clean: - rm -f healthcheck findlongest entcheck hex2bin bin2hex flipbits dice + $(RM) -f passgen healthcheck findlongest entcheck hex2bin bin2hex flipbits dice