提交 24aaff58 编写于 作者: B Bodo Möller

Remove "Makefile.uni" files and some related stuff.

This was meant for building individual ciphers separately;
but nothing of this is maintained, it does not work
because we rely on central configuration by the Configure
utility with <openssl/opensslconf.h> etc., so the files
are only wasting space and time.
上级 d8779db4
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
DIR= bf
TOP= .
# use BF_PTR2 for intel boxes,
# BF_PTR for sparc and MIPS/SGI
# use nothing for Alpha and HP.
# There are 3 possible performance options, experiment :-)
#OPTS= -DBF_PTR # usr for sparc and MIPS/SGI
#OPTS= -DBF_PTR2 # use for pentium
OPTS= # use for pentium pro, Alpha and HP
MAKE=make -f Makefile
#CC=cc
#CFLAG= -O
CC=gcc
#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
CFLAG= -O3 -fomit-frame-pointer
CFLAGS=$(OPTS) $(CFLAG)
CPP=$(CC) -E
AS=as
RANLIB=ranlib
# Assember version of bf_encrypt().
BF_ENC=bf_enc.o # normal C version
#BF_ENC=asm/bx86-elf.o # elf format x86
#BF_ENC=asm/bx86-out.o # a.out format x86
#BF_ENC=asm/bx86-sol.o # solaris format x86
#BF_ENC=asm/bx86bsdi.o # bsdi format x86
LIBDIR=/usr/local/lib
BINDIR=/usr/local/bin
INCDIR=/usr/local/include
MANDIR=/usr/local/man
MAN1=1
MAN3=3
SHELL=/bin/sh
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c
GENERAL=Makefile Makefile.ssl Makefile.uni asm bf_locl.org README \
COPYRIGHT blowfish.doc INSTALL
TESTING= bftest bfspeed bf_opts
TESTING_SRC=bftest.c bfspeed.c bf_opts.c
HEADERS=bf_locl.h blowfish.h bf_pi.h
ALL= $(GENERAL) $(TESTING_SRC) $(LIBSRC) $(HEADERS)
BLIB= libblowfish.a
all: $(BLIB) $(TESTING)
cc:
$(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
gcc:
$(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
x86-elf:
$(MAKE) BF_ENC='asm/bx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
x86-out:
$(MAKE) BF_ENC='asm/bx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
x86-solaris:
$(MAKE) BF_ENC='asm/bx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
x86-bsdi:
$(MAKE) BF_ENC='asm/bx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
# elf
asm/bx86-elf.o: asm/bx86unix.cpp
$(CPP) -DELF asm/bx86unix.cpp | $(AS) -o asm/bx86-elf.o
# solaris
asm/bx86-sol.o: asm/bx86unix.cpp
$(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
as -o asm/bx86-sol.o asm/bx86-sol.s
rm -f asm/bx86-sol.s
# a.out
asm/bx86-out.o: asm/bx86unix.cpp
$(CPP) -DOUT asm/bx86unix.cpp | $(AS) -o asm/bx86-out.o
# bsdi
asm/bx86bsdi.o: asm/bx86unix.cpp
$(CPP) -DBSDI asm/bx86unix.cpp | $(AS) -o asm/bx86bsdi.o
asm/bx86unix.cpp:
(cd asm; perl bf-586.pl cpp >bx86unix.cpp)
test: all
./bftest
$(BLIB): $(LIBOBJ)
/bin/rm -f $(BLIB)
ar cr $(BLIB) $(LIBOBJ)
$(RANLIB) $(BLIB)
bftest: bftest.o $(BLIB)
$(CC) $(CFLAGS) -o bftest bftest.o $(BLIB)
bfspeed: bfspeed.o $(BLIB)
$(CC) $(CFLAGS) -o bfspeed bfspeed.o $(BLIB)
bf_opts: bf_opts.o $(BLIB)
$(CC) $(CFLAGS) -o bf_opts bf_opts.o $(BLIB)
tags:
ctags $(TESTING_SRC) $(LIBBF)
tar:
tar chf libbf.tar $(ALL)
shar:
shar $(ALL) >libbf.shar
depend:
makedepend $(LIBBF) $(TESTING_SRC)
clean:
/bin/rm -f *.o tags core $(TESTING) $(BLIB) .nfs* *.old *.bak asm/*.o
dclean:
sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
mv -f Makefile.new Makefile
# Eric is probably going to choke when he next looks at this --tjh
install: $(BLIB)
if test $(INSTALLTOP); then \
echo SSL style install; \
cp $(BLIB) $(INSTALLTOP)/lib; \
$(RANLIB) $(BLIB); \
chmod 644 $(INSTALLTOP)/lib/$(BLIB); \
cp blowfish.h $(INSTALLTOP)/include; \
chmod 644 $(INSTALLTOP)/include/blowfish.h; \
else \
echo Standalone install; \
cp $(BLIB) $(LIBDIR)/$(BLIB); \
$(RANLIB) $(BLIB); \
chmod 644 $(LIBDIR)/$(BLIB); \
cp blowfish.h $(INCDIR)/blowfish.h; \
chmod 644 $(INCDIR)/blowfish.h; \
fi
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
# There are 3 possible performance options, experiment :-)
#OPTS= -DBF_PTR
#OPTS= -DBF_PTR2
OPTS=
DIR= cast
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
CAST_ENC=c_enc.o
# or use
#CAST_ENC=asm/cx86-elf.o
#CAST_ENC=asm/cx86-out.o
#CAST_ENC=asm/cx86-sol.o
#CAST_ENC=asm/cx86bdsi.o
CFLAGS= $(OPTS) $(INCLUDES) $(CFLAG) -DFULL_TEST
GENERAL=Makefile
TEST=casttest
APP1=cast_spd
APP2=castopts
APPS=$(APP1) $(APP2)
LIB=libcast.a
LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
SRC= $(LIBSRC)
EXHEADER= cast.h
HEADER= cast_lcl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
# elf
asm/cx86-elf.o: asm/cx86unix.cpp
$(CPP) -DELF asm/cx86unix.cpp | as -o asm/cx86-elf.o
# solaris
asm/cx86-sol.o: asm/cx86unix.cpp
$(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s
as -o asm/cx86-sol.o asm/cx86-sol.s
rm -f asm/cx86-sol.s
# a.out
asm/cx86-out.o: asm/cx86unix.cpp
$(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o
# bsdi
asm/cx86bsdi.o: asm/cx86unix.cpp
$(CPP) -DBSDI asm/cx86unix.cpp | as -o asm/cx86bsdi.o
asm/cx86unix.cpp:
(cd asm; perl cast-586.pl cpp >cx86unix.cpp)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APP1): $(APP1).c $(LIB)
$(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB)
$(APP2): $(APP2).c $(LIB)
$(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) CC="cc" CFLAG="-O" all
gcc:
$(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
x86-elf:
$(MAKE) CAST_ENC="asm/cx86-elf.o" CFLAG="-DELF $(CFLAGS)" all
x86-out:
$(MAKE) CAST_ENC="asm/cx86-out.o" CFLAG="-DOUT $(CFLAGS)" all
x86-solaris:
$(MAKE) CAST_ENC="asm/cx86-sol.o" CFLAG="-DSOL $(CFLAGS)" all
x86-bdsi:
$(MAKE) CAST_ENC="asm/cx86-bdsi.o" CFLAG="-DBDSI $(CFLAGS)" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile being created.
&writeMakefile(
'potential_libs' => '', # e.g., '-lm'
'INC' => '', # e.g., '-I/usr/include/other'
'DISTNAME' => 'DES',
'VERSION' => '0.1',
'DEFINE' => '-DPERL5',
'OBJECT' => 'DES.o cbc_cksm.o cbc_enc.o ecb_enc.o pcbc_enc.o \
rand_key.o set_key.o str2key.o \
enc_read.o enc_writ.o fcrypt.o cfb_enc.o \
ecb3_enc.o ofb_enc.o cbc3_enc.o des_enc.o',
);
# You must select the correct terminal control system to be used to
# turn character echo off when reading passwords. There a 5 systems
# SGTTY - the old BSD system
# TERMIO - most system V boxes
# TERMIOS - SGI (ala IRIX).
# VMS - the DEC operating system
# MSDOS - we all know what it is :-)
# read_pwd.c makes a reasonable guess at what is correct.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
# If you are on a DEC Alpha, edit des.h and change the DES_LONG
# define to 'unsigned int'. I have seen this give a %20 speedup.
OPTS0= -DLIBDES_LIT -DRAND -DTERMIO #-DNOCONST
# Version 1.94 has changed the strings_to_key function so that it is
# now compatible with MITs when the string is longer than 8 characters.
# If you wish to keep the old version, uncomment the following line.
# This will affect the -E/-D options on des(1).
#OPTS1= -DOLD_STR_TO_KEY
# There are 4 possible performance options
# -DDES_PTR
# -DDES_RISC1
# -DDES_RISC2 (only one of DES_RISC1 and DES_RISC2)
# -DDES_UNROLL
# after the initial build, run 'des_opts' to see which options are best
# for your platform. There are some listed in options.txt
#OPTS2= -DDES_PTR
#OPTS3= -DDES_RISC1 # or DES_RISC2
#OPTS4= -DDES_UNROLL
OPTS= $(OPTS0) $(OPTS1) $(OPTS2) $(OPTS3) $(OPTS4)
MAKE=make -f Makefile
#CC=cc
#CFLAG= -O
CC=gcc
#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
CFLAG= -O3 -fomit-frame-pointer
CFLAGS=$(OPTS) $(CFLAG)
CPP=$(CC) -E
AS=as
# Assember version of des_encrypt*().
DES_ENC=des_enc.o fcrypt_b.o # normal C version
#DES_ENC=asm/dx86-elf.o asm/yx86-elf.o # elf format x86
#DES_ENC=asm/dx86-out.o asm/yx86-out.o # a.out format x86
#DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86
#DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86
LIBDIR=/usr/local/lib
BINDIR=/usr/local/bin
INCDIR=/usr/local/include
MANDIR=/usr/local/man
MAN1=1
MAN3=3
SHELL=/bin/sh
OBJ_LIT=cbc_enc.o ecb_enc.o $(DES_ENC) fcrypt.o set_key.o
OBJ_FULL=cbc_cksm.o $(OBJ_LIT) pcbc_enc.o \
xcbc_enc.o qud_cksm.o \
cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o \
enc_read.o enc_writ.o ofb64ede.o ofb64enc.o ofb_enc.o \
rand_key.o read_pwd.o read2pwd.o rpc_enc.o str2key.o supp.o
GENERAL_LIT=COPYRIGHT INSTALL README VERSION Makefile des_crypt.man \
des.doc options.txt asm
GENERAL_FULL=$(GENERAL_LIT) FILES Imakefile times vms.com KERBEROS MODES.DES \
des.man DES.pm DES.pod DES.xs Makefile.PL dess.cpp des3s.cpp \
Makefile.uni typemap t Makefile.ssl makefile.bc Makefile.lit \
des.org des_locl.org
TESTING_LIT= destest speed des_opts
TESTING_FULL= rpw $(TESTING_LIT)
TESTING_SRC_LIT=destest.c speed.c des_opts.c
TESTING_SRC_FULL=rpw.c $(TESTING_SRC_LIT)
HEADERS_LIT=des_ver.h des.h des_locl.h podd.h sk.h spr.h
HEADERS_FULL= $(HEADERS_LIT) rpc_des.h
LIBDES_LIT=cbc_enc.c ecb_enc.c fcrypt.c set_key.c des_enc.c fcrypt_b.c
LIBDES_FULL= cbc_cksm.c pcbc_enc.c qud_cksm.c \
cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c \
enc_read.c enc_writ.c ofb64ede.c ofb64enc.c ofb_enc.c \
rand_key.c rpc_enc.c str2key.c supp.c \
xcbc_enc.c $(LIBDES_LIT) read_pwd.c read2pwd.c
PERL= des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl
OBJ= $(OBJ_LIT)
GENERAL=$(GENERAL_LIT)
TESTING=$(TESTING_LIT)
TESTING_SRC=$(TESTING_SRC_LIT)
HEADERS=$(HEADERS_LIT)
LIBDES= $(LIBDES_LIT)
ALL= $(GENERAL) $(TESTING_SRC) $(LIBDES) $(PERL) $(HEADERS)
DLIB= libdes.a
all: $(DLIB) $(TESTING)
cc:
$(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
gcc:
$(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
x86-elf:
$(MAKE) DES_ENC='asm/dx86-elf.o asm/yx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
x86-out:
$(MAKE) DES_ENC='asm/dx86-out.o asm/yx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
x86-solaris:
$(MAKE) DES_ENC='asm/dx86-sol.o asm/yx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
x86-bsdi:
$(MAKE) DES_ENC='asm/dx86bsdi.o asm/yx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
# elf
asm/dx86-elf.o: asm/dx86unix.cpp
$(CPP) -DELF asm/dx86unix.cpp | $(AS) -o asm/dx86-elf.o
asm/yx86-elf.o: asm/yx86unix.cpp
$(CPP) -DELF asm/yx86unix.cpp | $(AS) -o asm/yx86-elf.o
# solaris
asm/dx86-sol.o: asm/dx86unix.cpp
$(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
as -o asm/dx86-sol.o asm/dx86-sol.s
rm -f asm/dx86-sol.s
asm/yx86-sol.o: asm/yx86unix.cpp
$(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
as -o asm/yx86-sol.o asm/yx86-sol.s
rm -f asm/yx86-sol.s
# a.out
asm/dx86-out.o: asm/dx86unix.cpp
$(CPP) -DOUT asm/dx86unix.cpp | $(AS) -o asm/dx86-out.o
asm/yx86-out.o: asm/yx86unix.cpp
$(CPP) -DOUT asm/yx86unix.cpp | $(AS) -o asm/yx86-out.o
# bsdi
asm/dx86bsdi.o: asm/dx86unix.cpp
$(CPP) -DBSDI asm/dx86unix.cpp | $(AS) -o asm/dx86bsdi.o
asm/yx86bsdi.o: asm/yx86unix.cpp
$(CPP) -DBSDI asm/yx86unix.cpp | $(AS) -o asm/yx86bsdi.o
asm/dx86unix.cpp:
(cd asm; perl des-586.pl cpp >dx86unix.cpp)
asm/yx86unix.cpp:
(cd asm; perl crypt586.pl cpp >yx86unix.cpp)
test: all
./destest
$(DLIB): $(OBJ)
/bin/rm -f $(DLIB)
ar cr $(DLIB) $(OBJ)
-if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \
else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \
else exit 0; fi; fi
des_opts: des_opts.o $(DLIB)
$(CC) $(CFLAGS) -o des_opts des_opts.o $(DLIB)
destest: destest.o $(DLIB)
$(CC) $(CFLAGS) -o destest destest.o $(DLIB)
rpw: rpw.o $(DLIB)
$(CC) $(CFLAGS) -o rpw rpw.o $(DLIB)
speed: speed.o $(DLIB)
$(CC) $(CFLAGS) -o speed speed.o $(DLIB)
des: des.o $(DLIB)
$(CC) $(CFLAGS) -o des des.o $(DLIB)
tags:
ctags $(TESTING_SRC) $(LIBDES)
tar_lit:
/bin/mv Makefile Makefile.tmp
/bin/cp Makefile.lit Makefile
tar chf libdes-l.tar $(LIBDES_LIT) $(HEADERS_LIT) \
$(GENERAL_LIT) $(TESTING_SRC_LIT)
/bin/rm -f Makefile
/bin/mv Makefile.tmp Makefile
tar:
tar chf libdes.tar $(ALL)
shar:
shar $(ALL) >libdes.shar
depend:
makedepend $(LIBDES) $(TESTING_SRC)
clean:
/bin/rm -f *.o tags core $(TESTING) $(DLIB) .nfs* *.old *.bak asm/*.o
dclean:
sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
mv -f Makefile.new Makefile
# Eric is probably going to choke when he next looks at this --tjh
install:
if test $(INSTALLTOP); then \
echo SSL style install; \
cp $(DLIB) $(INSTALLTOP)/lib; \
if test -s /bin/ranlib; then \
/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
else \
if test -s /usr/bin/ranlib; then \
/usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
fi; fi; \
chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
cp des.h $(INSTALLTOP)/include; \
chmod 644 $(INSTALLTOP)/include/des.h; \
else \
echo Standalone install; \
cp $(DLIB) $(LIBDIR)/$(DLIB); \
if test -s /bin/ranlib; then \
/bin/ranlib $(LIBDIR)/$(DLIB); \
else \
if test -s /usr/bin/ranlib; then \
/usr/bin/ranlib $(LIBDIR)/$(DLIB); \
fi; \
fi; \
chmod 644 $(LIBDIR)/$(DLIB); \
cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
cp des.h $(INCDIR)/des.h; \
chmod 644 $(INCDIR)/des.h; \
fi
# DO NOT DELETE THIS LINE -- make depend depends on it.
# You must select the correct terminal control system to be used to
# turn character echo off when reading passwords. There a 5 systems
# SGTTY - the old BSD system
# TERMIO - most system V boxes
# TERMIOS - SGI (ala IRIX).
# VMS - the DEC operating system
# MSDOS - we all know what it is :-)
# read_pwd.c makes a reasonable guess at what is correct.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
# If you are on a DEC Alpha, edit des.h and change the DES_LONG
# define to 'unsigned int'. I have seen this give a %20 speedup.
OPTS0= -DRAND -DTERMIO #-DNOCONST
# Version 1.94 has changed the strings_to_key function so that it is
# now compatible with MITs when the string is longer than 8 characters.
# If you wish to keep the old version, uncomment the following line.
# This will affect the -E/-D options on des(1).
#OPTS1= -DOLD_STR_TO_KEY
# There are 4 possible performance options
# -DDES_PTR
# -DDES_RISC1
# -DDES_RISC2 (only one of DES_RISC1 and DES_RISC2)
# -DDES_UNROLL
# after the initial build, run 'des_opts' to see which options are best
# for your platform. There are some listed in options.txt
#OPTS2= -DDES_PTR
#OPTS3= -DDES_RISC1 # or DES_RISC2
#OPTS4= -DDES_UNROLL
OPTS= $(OPTS0) $(OPTS1) $(OPTS2) $(OPTS3) $(OPTS4)
MAKE=make -f Makefile
#CC=cc
#CFLAG= -O
CC=gcc
#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
CFLAG= -O3 -fomit-frame-pointer
CFLAGS=$(OPTS) $(CFLAG)
CPP=$(CC) -E
AS=as
RANLIB=ranlib
# Assember version of des_encrypt*().
DES_ENC=des_enc.o fcrypt_b.o # normal C version
#DES_ENC=asm/dx86-elf.o asm/yx86-elf.o # elf format x86
#DES_ENC=asm/dx86-out.o asm/yx86-out.o # a.out format x86
#DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86
#DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86
LIBDIR=/usr/local/lib
BINDIR=/usr/local/bin
INCDIR=/usr/local/include
MANDIR=/usr/local/man
MAN1=1
MAN3=3
SHELL=/bin/sh
OBJ_LIT=cbc_enc.o ecb_enc.o $(DES_ENC) fcrypt.o set_key.o
OBJ_FULL=cbc_cksm.o $(OBJ_LIT) pcbc_enc.o \
xcbc_enc.o qud_cksm.o cbc3_enc.o \
cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o \
enc_read.o enc_writ.o ofb64ede.o ofb64enc.o ofb_enc.o \
rand_key.o read_pwd.o read2pwd.o rpc_enc.o str2key.o supp.o
GENERAL_LIT=COPYRIGHT INSTALL README VERSION Makefile des_crypt.man \
des.doc options.txt asm
GENERAL_FULL=$(GENERAL_LIT) FILES Imakefile times vms.com KERBEROS MODES.DES \
des.man DES.pm DES.pod DES.xs Makefile.PL dess.cpp des3s.cpp \
Makefile.uni typemap t Makefile.ssl makefile.bc Makefile.lit \
des.org des_locl.org
TESTING_LIT= destest speed des_opts
TESTING_FULL= rpw des $(TESTING_LIT)
TESTING_SRC_LIT=destest.c speed.c des_opts.c
TESTING_SRC_FULL=rpw.c des.c $(TESTING_SRC_LIT)
HEADERS_LIT=des_ver.h des.h des_locl.h podd.h sk.h spr.h
HEADERS_FULL= $(HEADERS_LIT) rpc_des.h
LIBDES_LIT=cbc_enc.c ecb_enc.c fcrypt.c set_key.c des_enc.c fcrypt_b.c
LIBDES_FULL= cbc_cksm.c pcbc_enc.c qud_cksm.c cbc3_enc.c \
cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c \
enc_read.c enc_writ.c ofb64ede.c ofb64enc.c ofb_enc.c \
rand_key.c rpc_enc.c str2key.c supp.c \
xcbc_enc.c $(LIBDES_LIT) read_pwd.c read2pwd.c
PERL= des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl
OBJ= $(OBJ_FULL)
GENERAL=$(GENERAL_FULL)
TESTING=$(TESTING_FULL)
TESTING_SRC=$(TESTING_SRC_FULL)
HEADERS=$(HEADERS_FULL)
LIBDES= $(LIBDES_FULL)
ALL= $(GENERAL) $(TESTING_SRC) $(LIBDES) $(PERL) $(HEADERS)
DLIB= libdes.a
all: $(DLIB) $(TESTING)
cc:
$(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
gcc:
$(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
x86-elf:
$(MAKE) DES_ENC='asm/dx86-elf.o asm/yx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
x86-out:
$(MAKE) DES_ENC='asm/dx86-out.o asm/yx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
x86-solaris:
$(MAKE) DES_ENC='asm/dx86-sol.o asm/yx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
x86-bsdi:
$(MAKE) DES_ENC='asm/dx86bsdi.o asm/yx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
# elf
asm/dx86-elf.o: asm/dx86unix.cpp
$(CPP) -DELF asm/dx86unix.cpp | $(AS) -o asm/dx86-elf.o
asm/yx86-elf.o: asm/yx86unix.cpp
$(CPP) -DELF asm/yx86unix.cpp | $(AS) -o asm/yx86-elf.o
# solaris
asm/dx86-sol.o: asm/dx86unix.cpp
$(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
as -o asm/dx86-sol.o asm/dx86-sol.s
rm -f asm/dx86-sol.s
asm/yx86-sol.o: asm/yx86unix.cpp
$(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
as -o asm/yx86-sol.o asm/yx86-sol.s
rm -f asm/yx86-sol.s
# a.out
asm/dx86-out.o: asm/dx86unix.cpp
$(CPP) -DOUT asm/dx86unix.cpp | $(AS) -o asm/dx86-out.o
asm/yx86-out.o: asm/yx86unix.cpp
$(CPP) -DOUT asm/yx86unix.cpp | $(AS) -o asm/yx86-out.o
# bsdi
asm/dx86bsdi.o: asm/dx86unix.cpp
$(CPP) -DBSDI asm/dx86unix.cpp | $(AS) -o asm/dx86bsdi.o
asm/yx86bsdi.o: asm/yx86unix.cpp
$(CPP) -DBSDI asm/yx86unix.cpp | $(AS) -o asm/yx86bsdi.o
asm/dx86unix.cpp:
(cd asm; perl des-586.pl cpp >dx86unix.cpp)
asm/yx86unix.cpp:
(cd asm; perl crypt586.pl cpp >yx86unix.cpp)
test: all
./destest
$(DLIB): $(OBJ)
/bin/rm -f $(DLIB)
ar cr $(DLIB) $(OBJ)
$(RANLIB) $(DLIB)
des_opts: des_opts.o $(DLIB)
$(CC) $(CFLAGS) -o des_opts des_opts.o $(DLIB)
destest: destest.o $(DLIB)
$(CC) $(CFLAGS) -o destest destest.o $(DLIB)
rpw: rpw.o $(DLIB)
$(CC) $(CFLAGS) -o rpw rpw.o $(DLIB)
speed: speed.o $(DLIB)
$(CC) $(CFLAGS) -o speed speed.o $(DLIB)
des: des.o $(DLIB)
$(CC) $(CFLAGS) -o des des.o $(DLIB)
tags:
ctags $(TESTING_SRC) $(LIBDES)
tar_lit:
/bin/mv Makefile Makefile.tmp
/bin/cp Makefile.lit Makefile
for i in $(HEADERS_LIT) $(LIBDES_LIT) $(GENERAL_LIT) $(TESTING_SRC_LIT) ;\
do \
n="$$n des/$$i"; \
done; \
( cd .. ; tar chf - $$n )| gzip > libdes-l.tgz
/bin/rm -f Makefile
/bin/mv Makefile.tmp Makefile
tar:
mv Makefile Makefile.tmp
/bin/cp Makefile.uni Makefile
for i in $(ALL) ;\
do \
n="$$n des/$$i"; \
done; \
( cd .. ; tar chf - $$n )| gzip > libdes.tgz
/bin/rm -f Makefile
/bin/mv Makefile.tmp Makefile
shar:
shar $(ALL) >libdes.shar
depend:
makedepend $(LIBDES) $(TESTING_SRC)
clean:
/bin/rm -f *.o tags core $(TESTING) $(DLIB) .nfs* *.old *.bak asm/*.o
dclean:
sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
mv -f Makefile.new Makefile
# Eric is probably going to choke when he next looks at this --tjh
install: des
if test $(INSTALLTOP); then \
echo SSL style install; \
cp $(DLIB) $(INSTALLTOP)/lib; \
$(RANLIB) $(DLIB); \
chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
cp des.h $(INSTALLTOP)/include; \
chmod 644 $(INSTALLTOP)/include/des.h; \
else \
echo Standalone install; \
cp $(DLIB) $(LIBDIR)/$(DLIB); \
$(RANLIB) $(DLIB); \
chmod 644 $(LIBDIR)/$(DLIB); \
cp des $(BINDIR)/des; \
chmod 711 $(BINDIR)/des; \
cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
cp des.h $(INCDIR)/des.h; \
chmod 644 $(INCDIR)/des.h; \
fi
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
DIR= cast
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
IDEA_ENC=i_cbc.o
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=ideatest
APPS=idea_spd
LIB=libidea.a
LIBSRC=i_skey.c i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c
LIBOBJ=i_skey.o i_ecb.o $(IDEA_ENC) i_cfb64.o i_ofb64.o
SRC= $(LIBSRC)
EXHEADER= idea.h
HEADER= idea_lcl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) CC="cc" CFLAG="-O" all
gcc:
$(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
DIR= md5
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
MD5_ASM_OBJ=
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=md5test
APPS=md5
LIB=libmd5.a
LIBSRC=md5_dgst.c md5_one.c
LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
SRC= $(LIBSRC)
EXHEADER= md5.h
HEADER= md5_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
# elf
asm/mx86-elf.o: asm/mx86unix.cpp
$(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o
# solaris
asm/mx86-sol.o: asm/mx86unix.cpp
$(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s
as -o asm/mx86-sol.o asm/mx86-sol.s
rm -f asm/mx86-sol.s
# a.out
asm/mx86-out.o: asm/mx86unix.cpp
$(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
# bsdi
asm/mx86bsdi.o: asm/mx86unix.cpp
$(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o
asm/mx86unix.cpp:
(cd asm; perl md5-586.pl cpp >mx86unix.cpp)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) MD5_ASM_OBJ="" CC="cc" CFLAG="-O" all
gcc:
$(MAKE) MD5_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
x86-elf:
$(MAKE) MD5_ASM_OBJ="asm/mx86-elf.o" CFLAG="-DELF -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-out:
$(MAKE) MD5_ASM_OBJ="asm/mx86-out.o" CFLAG="-DOUT -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-solaris:
$(MAKE) MD5_ASM_OBJ="asm/mx86-sol.o" CFLAG="-DSOL -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-bdsi:
$(MAKE) MD5_ASM_OBJ="asm/mx86-bdsi.o" CFLAG="-DBDSI -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
DIR= rc2
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
IDEA_ENC=rc2_cbc.o
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=rc2test
APPS=rc2speed
LIB=librc2.a
LIBSRC=rc2_skey.c rc2_ecb.c rc2_cbc.c rc2cfb64.c rc2ofb64.c
LIBOBJ=rc2_skey.o rc2_ecb.o $(IDEA_ENC) rc2cfb64.o rc2ofb64.o
SRC= $(LIBSRC)
EXHEADER= rc2.h
HEADER= rc2_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) CC="cc" CFLAG="-O" all
gcc:
$(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
DIR= rc4
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
RC4_ENC=rc4_enc.o
# or use
#RC4_ENC=asm/rx86-elf.o
#RC4_ENC=asm/rx86-out.o
#RC4_ENC=asm/rx86-sol.o
#RC4_ENC=asm/rx86bdsi.o
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=rc4test
APPS=rc4speed
LIB=librc4.a
LIBSRC=rc4_skey.c rc4_enc.c
LIBOBJ=rc4_skey.o $(RC4_ENC)
SRC= $(LIBSRC)
EXHEADER= rc4.h
HEADER= $(EXHEADER) rc4_locl.h
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
# elf
asm/rx86-elf.o: asm/rx86unix.cpp
$(CPP) -DELF asm/rx86unix.cpp | as -o asm/rx86-elf.o
# solaris
asm/rx86-sol.o: asm/rx86unix.cpp
$(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s
as -o asm/rx86-sol.o asm/rx86-sol.s
rm -f asm/rx86-sol.s
# a.out
asm/rx86-out.o: asm/rx86unix.cpp
$(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
# bsdi
asm/rx86bsdi.o: asm/rx86unix.cpp
$(CPP) -DBSDI asm/rx86unix.cpp | as -o asm/rx86bsdi.o
asm/rx86unix.cpp:
(cd asm; perl rc4-586.pl cpp >rx86unix.cpp)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) CC="cc" CFLAG="-O" all
gcc:
$(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
DIR= rc2
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
RANLIB= ranlib
IDEA_ENC=rc2_cbc.o
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=rc2test
APPS=rc2speed
LIB=librc2.a
LIBSRC=rc2_skey.c rc2_ecb.c rc2_cbc.c rc2cfb64.c rc2ofb64.c
LIBOBJ=rc2_skey.o rc2_ecb.o $(IDEA_ENC) rc2cfb64.o rc2ofb64.o
SRC= $(LIBSRC)
EXHEADER= rc2.h
HEADER= rc2_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) CC="cc" CFLAG="-O" all
gcc:
$(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
DIR= md5
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
MD5_ASM_OBJ=
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST=md5test
APPS=md5
LIB=libmd5.a
LIBSRC=md5_dgst.c md5_one.c
LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
SRC= $(LIBSRC)
EXHEADER= md5.h
HEADER= md5_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
# elf
asm/mx86-elf.o: asm/mx86unix.cpp
$(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o
# solaris
asm/mx86-sol.o: asm/mx86unix.cpp
$(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s
as -o asm/mx86-sol.o asm/mx86-sol.s
rm -f asm/mx86-sol.s
# a.out
asm/mx86-out.o: asm/mx86unix.cpp
$(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
# bsdi
asm/mx86bsdi.o: asm/mx86unix.cpp
$(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o
asm/mx86unix.cpp:
(cd asm; perl md5-586.pl cpp >mx86unix.cpp)
test: $(TEST)
./$(TEST)
$(TEST): $(TEST).c $(LIB)
$(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
$(APPS): $(APPS).c $(LIB)
$(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) MD5_ASM_OBJ="" CC="cc" CFLAG="-O" all
gcc:
$(MAKE) MD5_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
x86-elf:
$(MAKE) MD5_ASM_OBJ="asm/mx86-elf.o" CFLAG="-DELF -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-out:
$(MAKE) MD5_ASM_OBJ="asm/mx86-out.o" CFLAG="-DOUT -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-solaris:
$(MAKE) MD5_ASM_OBJ="asm/mx86-sol.o" CFLAG="-DSOL -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
x86-bdsi:
$(MAKE) MD5_ASM_OBJ="asm/mx86-bdsi.o" CFLAG="-DBDSI -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
# Targets
# make - twidle the options yourself :-)
# make cc - standard cc options
# make gcc - standard gcc options
# make x86-elf - linux-elf etc
# make x86-out - linux-a.out, FreeBSD etc
# make x86-solaris
# make x86-bdsi
DIR= sha
TOP= .
CC= gcc
CFLAG= -O3 -fomit-frame-pointer
CPP= $(CC) -E
INCLUDES=
INSTALLTOP=/usr/local/lib
MAKE= make
MAKEDEPEND= makedepend
MAKEFILE= Makefile.uni
AR= ar r
SHA_ASM_OBJ=
CFLAGS= $(INCLUDES) $(CFLAG)
GENERAL=Makefile
TEST1=shatest
TEST2=sha1test
APP1=sha
APP2=sha1
TEST=$(TEST1) $(TEST2)
APPS=$(APP1) $(APP2)
LIB=libsha.a
LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA_ASM_OBJ)
SRC= $(LIBSRC)
EXHEADER= sha.h
HEADER= sha_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
all: $(LIB) $(TEST) $(APPS)
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB)
# elf
asm/sx86-elf.o: asm/sx86unix.cpp
$(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o
# solaris
asm/sx86-sol.o: asm/sx86unix.cpp
$(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s
as -o asm/sx86-sol.o asm/sx86-sol.s
rm -f asm/sx86-sol.s
# a.out
asm/sx86-out.o: asm/sx86unix.cpp
$(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
# bsdi
asm/sx86bsdi.o: asm/sx86unix.cpp
$(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o
asm/sx86unix.cpp:
(cd asm; perl sha1-586.pl cpp >sx86unix.cpp)
test: $(TEST)
./$(TEST1)
./$(TEST2)
$(TEST1): $(TEST1).c $(LIB)
$(CC) -o $(TEST1) $(CFLAGS) $(TEST1).c $(LIB)
$(TEST2): $(TEST2).c $(LIB)
$(CC) -o $(TEST2) $(CFLAGS) $(TEST2).c $(LIB)
$(APP1): $(APP1).c $(LIB)
$(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB)
$(APP2): $(APP2).c $(LIB)
$(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB)
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
dclean:
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
/bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
cc:
$(MAKE) SHA_ASM_OBJ="" CC="cc" CFLAG="-O" all
gcc:
$(MAKE) SHA_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
x86-elf:
$(MAKE) SHA_ASM_OBJ="asm/sx86-elf.o" CFLAG="-DELF -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
x86-out:
$(MAKE) SHA_ASM_OBJ="asm/sx86-out.o" CFLAG="-DOUT -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
x86-solaris:
$(MAKE) SHA_ASM_OBJ="asm/sx86-sol.o" CFLAG="-DSOL -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
x86-bdsi:
$(MAKE) SHA_ASM_OBJ="asm/sx86-bdsi.o" CFLAG="-DBDSI -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
# DO NOT DELETE THIS LINE -- make depend depends on it.
#!/bin/sh
cwd=`pwd`
/bin/rm -fr tmp/*
cd crypto/des
make -f Makefile.uni tar
make -f Makefile.uni tar_lit
/bin/mv libdes.tgz $cwd/tmp
/bin/mv libdes-l.tgz $cwd/tmp
cd $cwd
for name in md5 sha cast bf idea rc4 rc2
do
echo doing $name
(cd crypto; tar cfh - $name)|(cd tmp; tar xf -)
cd tmp/$name
/bin/rm -f Makefile
/bin/rm -f Makefile.ssl
/bin/rm -f Makefile.ssl.orig
/bin/rm -f *.old
/bin/mv Makefile.uni Makefile
if [ -d asm ]; then
mkdir asm/perlasm
cp $cwd/crypto/perlasm/*.pl asm/perlasm
fi
cd ..
tar cf - $name|gzip >$name.tgz
# /bin/rm -fr $name
cd $cwd
done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册