1 # You must select the correct terminal control system to be used to
\r# turn character echo off when reading passwords. There a 5 systems
\r# SGTTY - the old BSD system
\r# TERMIO - most system V boxes
\r# TERMIOS - SGI (ala IRIX).
\r# VMS - the DEC operating system
\r# MSDOS - we all know what it is :-)
\r# read_pwd.c makes a reasonable guess at what is correct.
\r\r# If you are on a DEC Alpha, edit des.h and change the DES_LONG
\r# define to 'unsigned int'. I have seen this give a %20 speedup.
\r\rOPTS0= -DRAND -DTERMIO #-DNOCONST
\r\r# Version 1.94 has changed the strings_to_key function so that it is
\r# now compatible with MITs when the string is longer than 8 characters.
\r# If you wish to keep the old version, uncomment the following line.
\r# This will affect the -E/-D options on des(1).
\r#OPTS1= -DOLD_STR_TO_KEY
\r\r# There are 4 possible performance options
\r# -DDES_PTR
\r# -DDES_RISC1
\r# -DDES_RISC2 (only one of DES_RISC1 and DES_RISC2)
\r# -DDES_UNROLL
\r# after the initial build, run 'des_opts' to see which options are best
\r# for your platform. There are some listed in options.txt
\r#OPTS2= -DDES_PTR
\r#OPTS3= -DDES_RISC1 # or DES_RISC2
\rOPTS4= -DDES_UNROLL
\r\rOPTS= $(OPTS0) $(OPTS1) $(OPTS2) $(OPTS3) $(OPTS4)
\r\rCC=cc
\rCFLAGS= -D_HPUX_SOURCE -Aa +O2 $(OPTS) $(CFLAG)
\r\r#CC=gcc
\r#CFLAGS= -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)
\r\rCPP=$(CC) -E
\r\rDES_ENC=des_enc.o # normal C version
\r#DES_ENC=asm/dx86-elf.o # elf format x86
\r#DES_ENC=asm/dx86-out.o # a.out format x86
\r#DES_ENC=asm/dx86-sol.o # solaris format x86
\r#DES_ENC=asm/dx86bsdi.o # bsdi format x86
\r\rLIBDIR=/usr/local/lib
\rBINDIR=/usr/local/bin
\rINCDIR=/usr/local/include
\rMANDIR=/usr/local/man
\rMAN1=1
\rMAN3=3
\rSHELL=/bin/sh
\rOBJS= cbc3_enc.o cbc_cksm.o cbc_enc.o ncbc_enc.o pcbc_enc.o qud_cksm.o \
\r cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o ecb_enc.o ede_enc.o \
\r enc_read.o enc_writ.o fcrypt.o ofb64ede.o ofb64enc.o ofb_enc.o \
\r rand_key.o read_pwd.o set_key.o rpc_enc.o str2key.o supp.o \
\r $(DES_ENC) xcbc_enc.o
\r\rGENERAL=$(GENERAL_LIT) FILES Imakefile times vms.com KERBEROS MODES.DES \
\r GNUmakefile des.man DES.pm DES.pod DES.xs Makefile.PL \
\r Makefile.uni typemap t Makefile.ssl makefile.bc Makefile.lit \
\r des.org des_locl.org
\rDES= des.c
\rTESTING=rpw.c $(TESTING_LIT)
\rHEADERS= $(HEADERS_LIT) rpc_des.h
\rLIBDES= cbc_cksm.c pcbc_enc.c qud_cksm.c \
\r cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c cbc3_enc.c \
\r enc_read.c enc_writ.c ofb64ede.c ofb64enc.c ofb_enc.c \
\r rand_key.c rpc_enc.c str2key.c supp.c \
\r xcbc_enc.c $(LIBDES_LIT) read_pwd.c
\r\rTESTING_LIT=destest.c speed.c des_opts.c
\rGENERAL_LIT=COPYRIGHT INSTALL README VERSION Makefile des_crypt.man \
\r des.doc options.txt asm
\rHEADERS_LIT=des_ver.h des.h des_locl.h podd.h sk.h spr.h
\rLIBDES_LIT=ede_enc.c cbc_enc.c ncbc_enc.c ecb_enc.c fcrypt.c set_key.c des_enc.c
\r\rPERL= des.pl testdes.pl doIP doIP2 doPC1 doPC2 PC1 PC2 shifts.pl
\r\rALL= $(GENERAL) $(DES) $(TESTING) $(LIBDES) $(PERL) $(HEADERS)
\r\rDLIB= libdes.a
\r\rall: $(DLIB) destest rpw des speed des_opts
\r\rcc:
\r make CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
\r\rgcc:
\r make CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
\r\rx86-elf:
\r make DES_ENC=asm/dx86-elf.o CC=gcc CFLAGS="-DELF -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
\r\rx86-out:
\r make DES_ENC=asm/dx86-out.o CC=gcc CFLAGS="-DOUT -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
\r\rx86-solaris:
\r make DES_ENC=asm/dx86-sol.o CFLAGS="-DSOL -O $(OPTS) $(CFLAG)" all
\r\rx86-bsdi:
\r make DES_ENC=asm/dx86bsdi.o CC=gcc CFLAGS="-DBSDI -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
\r\rasm/dx86-elf.o: asm/dx86-cpp.s asm/dx86unix.cpp
\r $(CPP) -DELF asm/dx86unix.cpp | as -o asm/dx86-elf.o
\r\rasm/dx86-sol.o: asm/dx86-cpp.s asm/dx86unix.cpp
\r $(CPP) -DSOL asm/dx86unix.cpp | as -o asm/dx86-sol.o
\r\rasm/dx86-out.o: asm/dx86-cpp.s asm/dx86unix.cpp
\r $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
\r\rasm/dx86bsdi.o: asm/dx86-cpp.s asm/dx86unix.cpp
\r $(CPP) -DBSDI asm/dx86unix.cpp | as -o asm/dx86bsdi.o
\r\rtest: all
\r ./destest
\r\r$(DLIB): $(OBJS)
\r /bin/rm -f $(DLIB)
\r ar cr $(DLIB) $(OBJS)
\r -if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \
\r else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \
\r else exit 0; fi; fi
\r\rdes_opts: des_opts.o libdes.a
\r $(CC) $(CFLAGS) -o des_opts des_opts.o libdes.a
\r\rdestest: destest.o libdes.a
\r $(CC) $(CFLAGS) -o destest destest.o libdes.a
\r\rrpw: rpw.o libdes.a
\r $(CC) $(CFLAGS) -o rpw rpw.o libdes.a
\r\rspeed: speed.o libdes.a
\r $(CC) $(CFLAGS) -o speed speed.o libdes.a
\r\rdes: des.o libdes.a
\r $(CC) $(CFLAGS) -o des des.o libdes.a
\r\rtags:
\r ctags $(DES) $(TESTING) $(LIBDES)
\r\rtar_lit:
\r /bin/mv Makefile Makefile.tmp
\r /bin/cp Makefile.lit Makefile
\r tar chf libdes-l.tar $(LIBDES_LIT) $(HEADERS_LIT) \
\r $(GENERAL_LIT) $(TESTING_LIT)
\r /bin/rm -f Makefile
\r /bin/mv Makefile.tmp Makefile
\r\rtar:
\r tar chf libdes.tar $(ALL)
\r\rshar:
\r shar $(ALL) >libdes.shar
\r\rdepend:
\r makedepend $(LIBDES) $(DES) $(TESTING)
\r\rclean:
\r /bin/rm -f *.o tags core rpw destest des speed $(DLIB) .nfs* *.old \
\r *.bak destest rpw des_opts asm/*.o
\r\rdclean:
\r sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
\r mv -f Makefile.new Makefile
\r\r# Eric is probably going to choke when he next looks at this --tjh
\rinstall: $(DLIB) des
\r if test $(INSTALLTOP); then \
\r echo SSL style install; \
\r cp $(DLIB) $(INSTALLTOP)/lib; \
\r if test -s /bin/ranlib; then \
\r /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
\r else \
\r if test -s /usr/bin/ranlib; then \
\r /usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
\r fi; fi; \
\r chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
\r cp des.h $(INSTALLTOP)/include; \
\r chmod 644 $(INSTALLTOP)/include/des.h; \
\r cp des $(INSTALLTOP)/bin; \
\r chmod 755 $(INSTALLTOP)/bin/des; \
\r else \
\r echo Standalone install; \
\r cp $(DLIB) $(LIBDIR)/$(DLIB); \
\r if test -s /bin/ranlib; then \
\r /bin/ranlib $(LIBDIR)/$(DLIB); \
\r else \
\r if test -s /usr/bin/ranlib; then \
\r /usr/bin/ranlib $(LIBDIR)/$(DLIB); \
\r fi; \
\r fi; \
\r chmod 644 $(LIBDIR)/$(DLIB); \
\r cp des $(BINDIR)/des; \
\r chmod 711 $(BINDIR)/des; \
\r cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
\r chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
\r cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
\r chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
\r cp des.h $(INCDIR)/des.h; \
\r chmod 644 $(INCDIR)/des.h; \
\r fi
\r# DO NOT DELETE THIS LINE -- make depend depends on it.
\r