home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / crypt / Makefile < prev    next >
Encoding:
Makefile  |  1992-10-08  |  3.7 KB  |  147 lines

  1. #
  2. # UFC-crypt: ultra fast crypt(3) implementation
  3. # Copyright (C) 1991, 1992, Free Software Foundation, Inc.
  4. #
  5. # This library is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU Library General Public
  7. # License as published by the Free Software Foundation; either
  8. # version 2 of the License, or (at your option) any later version.
  9. #
  10. # This library is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. # Library General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Library General Public
  16. # License along with this library; if not, write to the Free
  17. # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. #
  19. # @(#)Makefile    2.27 10/08/92
  20. #
  21.  
  22. SHELL = /bin/sh
  23.  
  24. #
  25. # Select one of the following modules:
  26. #
  27. # You're advised to do a 'make clean' if
  28. # you change this to ensure you get the
  29. # proper routine linked into your program
  30. CRYPT = crypt.o
  31.  
  32. # portable C version:  crypt.o
  33. # SUN3 models:         crypt.sun3.o
  34. # HP series 300/400:   crypt.s300.o
  35. # SUN SPARC systems:   crypt.sparc.o
  36. # NeXT 68k systems:    crypt.next68.o
  37.  
  38. #
  39. # Which compiler & optimization flags to use
  40. #
  41. CC = cc
  42. OFLAGS = -O
  43.  
  44. # Edit & uncomment the following line if your friendly
  45. # vendor has placed crypt() elsewhere than in libc.
  46. #STDCRYPT = -lcrypt
  47. # Comment out the following line if your friendly
  48. # vendor doesn't think you need a crypt() at all
  49. SPEEDC = speedc
  50.  
  51.  
  52. #
  53. # End-of-configuration
  54. #
  55.  
  56. CFLAGS   = $(OFLAGS) $(FL)
  57. CRYPTOBJ = crypt_util.o $(CRYPT)
  58.  
  59. #
  60. # Sample programs for debugging/testing/benchmarking
  61. #
  62.  
  63. # Simple test for correct operation
  64. ufc: ufc.c libufc.a
  65.     $(CC) $(CFLAGS) ufc.c libufc.a -o ufc
  66.  
  67. all: ufc speedf $(SPEEDC) cert
  68.  
  69. tests: all
  70.     ./cert < ./cert.input
  71.     ./ufc 1
  72.     if [ -f ./speedc ] ; then ./speedc ; fi
  73.     ./speedf
  74.  
  75. # Benchmark UFC fcrypt the crypt(3) in libc.a
  76. speedf: libufc.a speeds.c
  77.     $(CC) $(CFLAGS) -DFCRYPT speeds.c libufc.a    -o speedf
  78. speedc: libufc.a speeds.c
  79.     $(CC) $(CFLAGS)          speeds.c $(STDCRYPT) -o speedc
  80.  
  81. # DES validation suite
  82. cert: libufc.a cert.c
  83.     $(CC) $(CFLAGS) cert.c libufc.a -o cert
  84.  
  85. #
  86.  
  87. libufc.a: $(CRYPTOBJ)
  88.     ar r libufc.a $(CRYPTOBJ)
  89.     @./do_ranlib
  90. #
  91. # Additional tagets making variants of libufc.a
  92. # using machine dependent assembly code. Intended
  93. # for possible future use by 'Crack'
  94. #
  95. libufc.sparc.a: $(CRYPTOBJ) crypt.sparc.o
  96.     make CRYPT=crypt.sparc.o libufc.a ufc
  97.     cp libufc.a libufc.sparc.a
  98.     ranlib libufc.sparc.a
  99. libufc.sun3.a: $(CRYPTOBJ) crypt.sun3.o
  100.     make CRYPT=crypt.sun3.o libufc.a ufc
  101.     cp libufc.a libufc.sun3.a
  102.     ranlib libufc.sun3.a
  103. libufc.s300.a: $(CRYPTOBJ) crypt.s300.o
  104.     make CRYPT=crypt.s300.o libufc.a ufc
  105.     cp libufc.a libufc.s300.a
  106. libufc.next68.a: $(CRYPTOBJ) crypt.next68.o
  107.     make CRYPT=crypt.next68.o libufc.a ufc
  108.     cp libufc.a libufc.next68.a
  109.     ranlib libufc.next68.a
  110.  
  111. crypt_util.o: crypt_util.c ufc-crypt.h
  112.  
  113. #
  114. # Crypt functions
  115. #
  116.  
  117. # Semiportable
  118. crypt.o: crypt.c ufc-crypt.h
  119.  
  120. # Sun3 
  121. crypt.sun3.o: crypt.sun3.S
  122.     ./S2o crypt.sun3.S crypt.sun3.o
  123.  
  124. # HP 9000 series 300
  125. crypt.s300.o: crypt.s300.S
  126.     ./S2o crypt.s300.S crypt.s300.o
  127.  
  128. # SUN SPARC architecture
  129. crypt.sparc.o: crypt.sparc.s
  130.     /bin/as crypt.sparc.s -o crypt.sparc.o
  131.  
  132. # NeXT 68k machines - thanks to korz.cs.columbia.edu (Fred Korz)
  133. crypt.next68.o: crypt.next68.S
  134.     ./S2o crypt.next68.S crypt.next68.o
  135. crypt.next68.S: crypt.sun3.S
  136.     sed -e '/\.proc/ d' crypt.sun3.S > crypt.next68.S
  137.  
  138. clean:
  139.     /bin/rm -f *.o core *~ ,* ufc libufc*.a speedf speedc tmp.s mon.out \
  140.       cert a.out Part* crypt.tar crypt.next68.S crypt.tar
  141.  
  142. kit:
  143.     makekit COPYING.LIB README Makefile GNUmakefile S2o crypt.c speeds.c \
  144.     crypt.s300.S crypt.sun3.S crypt.sparc.s \
  145.     crypt_util.c  ufc.c cert.c cert.input patchlevel.h     \
  146.     ufc-crypt.h do_ranlib ufc.args
  147.