clean-up makefiles

This commit is contained in:
Steffen Jaeckel 2013-09-03 14:27:32 +02:00
parent ab07d6a283
commit 61a3206f06
5 changed files with 43 additions and 44 deletions

View File

@ -40,7 +40,7 @@ CFLAGS += -c -I./testprof/ -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -Wn
# additional warnings (newer GCC 3.4 and higher)
ifdef GCC_34
CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wpointer-arith
-Wmissing-declarations -Wpointer-arith
endif
ifndef IGNORE_SPEED
@ -234,7 +234,7 @@ src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_en
src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
src/prngs/sprng.o src/prngs/yarrow.o
src/prngs/sprng.o src/prngs/yarrow.o
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
@ -262,7 +262,7 @@ COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
#The default rule for make builds the libtomcrypt library.
default:library
#ciphers come in two flavours... enc+dec and enc
#ciphers come in two flavours... enc+dec and enc
src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
$(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
@ -278,11 +278,11 @@ library: $(LIBNAME)
$(OBJECTS): $(HEADERS)
testprof/$(LIBTEST):
testprof/$(LIBTEST):
cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) CC="$(CC)" LD="$(LD)" AR="$(AR)" RANLIB="$(RANLIB)" $(MAKE)
$(LIBNAME): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(RANLIB) $@
#This rule makes the hash program included with libtomcrypt
@ -393,7 +393,7 @@ docdvi: crypt.tex
#zipup the project (take that!)
no_oops: clean
cd .. ; cvs commit
cd .. ; cvs commit
echo Scanning for scratch/dirty files
find . -type f | grep -v CVS | xargs -n 1 bash mess.sh
@ -407,6 +407,6 @@ zipup: no_oops docs
mv -fv crypt* ~ ; rm -rf libtomcrypt-$(VERSION)
# $Source: /cvs/libtom/libtomcrypt/makefile,v $
# $Revision: 1.151 $
# $Date: 2007/06/20 13:14:31 $
# $Source$
# $Revision$
# $Date$

View File

@ -4,10 +4,10 @@
#
# Be aware that ICC isn't quite as stable as GCC and several optimization switches
# seem to break the code (that GCC and MSVC compile just fine). In particular
# "-ip" and "-x*" seem to break the code (ROL/ROR macro problems). As the makefile
# "-ip" and "-x*" seem to break the code (ROL/ROR macro problems). As the makefile
# is shipped the code will build and execute properly.
#
# Also note that ICC often makes code that is slower than GCC. This is probably due to
# Also note that ICC often makes code that is slower than GCC. This is probably due to
# a mix of not being able to use "-ip" and just having fewer optimization algos than GCC.
#
# Tom St Denis
@ -38,7 +38,7 @@ default:library
# -ax? specifies make code specifically for ? but compatible with IA-32
# -x? specifies compile solely for ? [not specifically IA-32 compatible]
#
# where ? is
# where ? is
# K - PIII
# W - first P4 [Williamette]
# N - P4 Northwood
@ -51,7 +51,7 @@ CFLAGS += -O2 -xP -ip
endif
ifndef IGNORE_SPEED
CFLAGS += -O3 -xP -ip
CFLAGS += -O3 -xP -ip
endif
# want to see stuff?
@ -215,7 +215,7 @@ src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_en
src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
src/prngs/sprng.o src/prngs/yarrow.o
src/prngs/sprng.o src/prngs/yarrow.o
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
@ -238,7 +238,7 @@ else
GROUP=wheel
endif
#ciphers come in two flavours... enc+dec and enc
#ciphers come in two flavours... enc+dec and enc
aes_enc.o: aes.c aes_tab.c
$(CC) $(CFLAGS) -DENCRYPT_ONLY -c aes.c -o aes_enc.o
@ -249,7 +249,7 @@ TVS=demos/tv_gen.o
TIMINGS=demos/timing.o
TESTS=demos/test.o
#ciphers come in two flavours... enc+dec and enc
#ciphers come in two flavours... enc+dec and enc
src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
$(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
@ -290,7 +290,7 @@ timing: library $(TIMINGS) testprof/$(LIBTEST)
test: library $(TESTS) testprof/$(LIBTEST)
$(CC) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
#This rule installs the library and the header files. This must be run
#as root in order to have a high enough permission to write to the correct
#directories and to set the owner and group to root.
@ -301,7 +301,6 @@ install: library
install -g $(GROUP) -o $(USER) $(LIBTEST) $(DESTDIR)$(LIBPATH)
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
# $Source: /cvs/libtom/libtomcrypt/makefile.icc,v $
# $Revision: 1.77 $
# $Date: 2007/06/20 13:14:31 $
# $Source$
# $Revision$
# $Date$

View File

@ -125,7 +125,7 @@ src/pk/pkcs1/pkcs_1_v1_5_encode.obj src/pk/rsa/rsa_decrypt_key.obj src/pk/rsa/rs
src/pk/rsa/rsa_export.obj src/pk/rsa/rsa_exptmod.obj src/pk/rsa/rsa_free.obj src/pk/rsa/rsa_import.obj \
src/pk/rsa/rsa_make_key.obj src/pk/rsa/rsa_sign_hash.obj src/pk/rsa/rsa_verify_hash.obj src/prngs/fortuna.obj \
src/prngs/rc4.obj src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj src/prngs/sober128.obj \
src/prngs/sprng.obj src/prngs/yarrow.obj
src/prngs/sprng.obj src/prngs/yarrow.obj
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
@ -143,7 +143,7 @@ src/ciphers/aes/aes_enc.obj: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
library: $(OBJECTS)
lib /out:tomcrypt.lib $(OBJECTS)
cd testprof
cd testprof
nmake -f makefile.msvc
cd ..
@ -159,6 +159,6 @@ test: demos/test.c library
timing: demos/timing.c library
cl $(CFLAGS) demos/timing.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS)
# $Source: /cvs/libtom/libtomcrypt/makefile.msvc,v $
# $Revision: 1.55 $
# $Date: 2007/06/20 13:14:31 $
# $Source$
# $Revision$
# $Date$

View File

@ -2,14 +2,14 @@
#
# This makefile produces a shared object and requires libtool to be installed.
#
# Thanks to Zed Shaw for helping debug this on BSD/OSX.
# Thanks to Zed Shaw for helping debug this on BSD/OSX.
# Tom St Denis
# The version
VERSION=0:117
# Compiler and Linker Names
CC=libtool --mode=compile --tag=CC gcc
CC=libtool --mode=compile --tag=CC gcc
# ranlib tools
ifndef RANLIB
@ -22,7 +22,7 @@ CFLAGS += -c -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -DLTC_SOURCE
# additional warnings (newer GCC 3.4 and higher)
ifdef GCC_34
CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wpointer-arith
-Wmissing-declarations -Wpointer-arith
endif
@ -92,9 +92,9 @@ USER=root
endif
ifdef INSTALL_GROUP
GROUP=$(INSTALL_GROUP)
GROUP=$(INSTALL_GROUP)
else
GROUP=wheel
GROUP=wheel
endif
#List of objects to compile.
@ -220,7 +220,7 @@ src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_en
src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
src/prngs/sprng.o src/prngs/yarrow.o
src/prngs/sprng.o src/prngs/yarrow.o
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
@ -241,7 +241,7 @@ TIMINGS=demos/timing.o
#The default rule for make builds the libtomcrypt library.
default:library
#ciphers come in two flavours... enc+dec and enc
#ciphers come in two flavours... enc+dec and enc
src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
$(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
@ -276,7 +276,7 @@ hashsum: library
gcc -o hashsum hashsum.o -ltomcrypt $(EXTRALIBS)
#makes the crypt program
crypt: library
crypt: library
gcc $(CFLAGS) demos/encrypt.c -o encrypt.o
gcc -o crypt encrypt.o -ltomcrypt $(EXTRALIBS)
@ -289,6 +289,6 @@ test: library testprof/$(LIBTEST) $(TESTS)
timing: library testprof/$(LIBTEST) $(TIMINGS)
gcc -o $(TIMING) $(TIMINGS) -ltomcrypt_prof -ltomcrypt $(EXTRALIBS)
# $Source: /cvs/libtom/libtomcrypt/makefile.shared,v $
# $Revision: 1.81 $
# $Date: 2007/06/20 13:14:31 $
# $Source$
# $Revision$
# $Date$

View File

@ -161,7 +161,7 @@ src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_en
src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \
src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \
src/prngs/sprng.o src/prngs/yarrow.o
src/prngs/sprng.o src/prngs/yarrow.o
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \
@ -189,7 +189,7 @@ COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
#The default rule for make builds the libtomcrypt library.
default:library
#ciphers come in two flavours... enc+dec and enc
#ciphers come in two flavours... enc+dec and enc
src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
$(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
@ -203,8 +203,8 @@ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
#This rule makes the libtomcrypt library.
library: $(LIBNAME)
testprof/$(LIBTEST):
cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE)
testprof/$(LIBTEST):
cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE)
$(LIBNAME): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS)
@ -249,6 +249,6 @@ install_test: testprof/$(LIBTEST)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
install -g $(GROUP) -o $(USER) testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH)
# $Source: /cvs/libtom/libtomcrypt/makefile.unix,v $
# $Revision: 1.8 $
# $Date: 2007/06/20 13:14:31 $
# $Source$
# $Revision$
# $Date$