home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / os2pgp.zip / makefile.pgp < prev    next >
Makefile  |  1995-10-17  |  8KB  |  179 lines

  1. # makefile for PGP (IBM Visual Age C++)
  2. #
  3. #
  4. # PGP 2.6 can be compiled to use either the modular exponentiation
  5. # routines that come with RSAREF or those that are built into the
  6. # multiprecision library (mpilib) that comes with PGP.  For UNIX machines
  7. # (and probably VAX/VMS, too), we recommend using the RSAREF routines.
  8. # For MSDOS, we recommend using the mpilib routines (there are assembly
  9. # language routines that mpilib can call under MSDOS making it much faster
  10. # than the C code in RSAREF).  By default we have configured both RSAREF
  11. # and PGP 2.6 to use miplib. If you want to use pure RSAREF you should:
  12. #       (1) make sure you have the version of RSAREF that comes with
  13. #           the PGP 2.6 distribution,
  14. #       (2) in this makefile, remove the compiler switch -DUSEMPILIB from
  15. #           CFLAGS for your system below,
  16. #       (3) in the RSAREF makefile, remove the compiler switch
  17. #           -DUSEMPILIB from CFLAGS before building RSAREF.
  18. # Note: when you build RSAREF with -DUSEMPILIB, rdemo and dhdemo will
  19. # fail to link, because they will be unable to find the modular
  20. # exponentiation routines.  This is OK.
  21. #
  22. # Alternatively, to build PGP 2.6.1 with the RSAREF exponentiation routines,
  23. #       (1) you can use any version of the March 16, 1994 distribution
  24. #           of RSAREF,
  25. #       (2) you need not modify this makefile,
  26. #       (3) you need not modify the RSAREF makefile.
  27. #
  28. #
  29. # CFLAGS options:
  30. #
  31. # -DDEBUG     to include debugging information
  32. # -DDYN_ALLOC if your compiler does not support large static arrays
  33. # -DSMALL_MEM if your machine has a small memory (required for MSDOS)
  34. #
  35. # Define one of:
  36. # -DMERRITT    Merritt's modmult (fast on risc machines)
  37. # -DPEASANT    Russian peasant modulo multiply algorithm
  38. # -DUPTON      use Upton's modmult algorithm
  39. # -DSMITH      use Smith's modmult
  40. # See also the file platform.h for system defaults
  41. #
  42. # If you don't have a working FIONREAD ioctl you must use one of these:
  43. # -DUSE_SELECT to use select() system call
  44. # -DUSE_NBIO   to use non-blocking read()
  45.  
  46. DEFINES  = -DPORTABLE -DDYN_ALLOC -DOS2  -DIDEA32 -I..\rsaref\source -I..\rsaref\test
  47. ADEFINES = -DDYN_ALLOC -DSS_NEQ_DS
  48.  
  49. CC      = icc -Ss
  50. OPT     = -O -Oc
  51. CFLAGS  = -c    $(OPT) $(DEFINES)
  52. LD      = ilink /nofree         # Link command
  53. LDFLAGS = /NOD /NOI /M /STACK:24576 /optf /exepack:2
  54.  
  55. ASM     = masm          # Assembler command
  56. AFLAGS  = -ml $(ADEFINES)
  57. # For MASM 6.0, use the following
  58. #ASM    = ml -nologo
  59. #AFLAGS = -Zm -Cp -c $(ADEFINES)
  60.  
  61. #OBJS_EXT= 8086.obj zmatch.obj   # ASM obj. files
  62. LIBS_EXT=                       # Libararies
  63. LIBS_EXT=  cppos30   os2386
  64.  
  65. PROJ    = pgp
  66. EXT     =.exe
  67.  
  68. .c.obj:
  69.         $(CC) $(CFLAGS) $(DEBUG) $*.c
  70.  
  71. all:    $(PROJ)$(EXT)
  72.  
  73. clean:
  74.         del $(PROJ)$(EXT)
  75.         del *.obj
  76.  
  77. scratch: clean all
  78.  
  79. new:     clean all
  80.  
  81. # For a non-RSA version, uncomment the following line
  82. # RSAOBJS = rsaglue1.obj
  83.  
  84. # For an RSAREF version, uncomment the following lines
  85. RSAOBJS = rsaglue2.obj
  86. RSALIBS = ..\rsaref\test\rsaref.lib
  87.  
  88.  
  89. # Assembly-language subroutine dependencies
  90.  
  91. #8086.obj: 8086.asm
  92. #        $(ASM) $(AFLAGS) 8086.asm
  93.  
  94. #zmatch.obj: zmatch.asm
  95. #        $(ASM) $(AFLAGS) $(ADEFINES) zmatch.asm
  96.  
  97. ZIPOBJS= zbits.obj zdeflate.obj zfile_io.obj zglobals.obj \
  98.         zinflate.obj zip.obj zipup.obj ztrees.obj zunzip.obj
  99.  
  100. OBJ1    = pgp.obj crypto.obj keymgmt.obj fileio.obj mdfile.obj more.obj
  101. OBJ2    = armor.obj mpilib.obj mpiio.obj genprime.obj rsagen.obj random.obj
  102. OBJ3    = idea.obj passwd.obj md5.obj system.obj language.obj getopt.obj
  103. OBJ4    = keyadd.obj config.obj keymaint.obj charset.obj randpool.obj noise.obj
  104. OBJ5    = $(OBJS_EXT) $(RSAOBJS) sleep.obj
  105.  
  106. $(PROJ)$(EXT):  $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(ZIPOBJS)
  107.         echo $(OBJ1)+ >pgp.rsp
  108.         echo $(OBJ2)+ >>pgp.rsp
  109.         echo $(OBJ3)+ >>pgp.rsp
  110.         echo $(OBJ4)+ >>pgp.rsp
  111.         echo $(OBJ5)+ >>pgp.rsp
  112.         echo $(ZIPOBJS) >>pgp.rsp
  113.         echo $(PROJ)$(EXT) >>pgp.rsp
  114.         echo PGP.MAP >>pgp.rsp
  115.         echo $(LIBS_EXT) $(RSALIBS); >>pgp.rsp
  116.         @echo libs = $(LIB)
  117.         $(LD) $(LDFLAGS) @pgp.rsp
  118.  
  119. ## Dependencies ##
  120. armor.obj: armor.c mpilib.h usuals.h platform.h fileio.h mpiio.h language.h
  121. armor.obj: pgp.h more.h armor.h crypto.h
  122. charset.obj: charset.c usuals.h language.h charset.h system.h
  123. config.obj: config.c usuals.h fileio.h pgp.h more.h armor.h config.h charset.h
  124. crypto.obj: crypto.c mpilib.h usuals.h platform.h mpiio.h random.h idea.h
  125. crypto.obj: crypto.h keymgmt.h keymaint.h pgp.h more.h armor.h mdfile.h md5.h
  126. crypto.obj: fileio.h charset.h language.h exitpgp.h zipup.h rsaglue.h
  127. fileio.obj: fileio.c random.h usuals.h mpilib.h platform.h mpiio.h fileio.h
  128. fileio.obj: language.h pgp.h more.h armor.h exitpgp.h charset.h system.h
  129. genprime.obj: genprime.c mpilib.h usuals.h platform.h genprime.h random.h
  130. getopt.obj: getopt.c getopt.h
  131. idea.obj: idea.c idea.h usuals.h randpool.h
  132. keyadd.obj: keyadd.c mpilib.h usuals.h platform.h crypto.h fileio.h keymgmt.h
  133. keyadd.obj: charset.h language.h pgp.h more.h armor.h exitpgp.h keyadd.h
  134. keyadd.obj: keymaint.h keymaint.c mpilib.h usuals.h platform.h random.h
  135. keymaint.obj: crypto.h fileio.h keymgmt.h keymaint.h pgp.h more.h armor.h
  136. keymaint.obj: mpiio.h charset.h language.h
  137. keymgmt.obj: keymgmt.c system.h mpilib.h usuals.h platform.h idea.h random.h
  138. keymgmt.obj: crypto.h fileio.h keymgmt.h rsagen.h mpiio.h language.h pgp.h
  139. keymgmt.obj: more.h armor.h md5.h charset.h keymaint.h
  140. language.obj: language.c usuals.h fileio.h language.h pgp.h more.h armor.h
  141. language.obj: charset.h
  142. md5.obj: md5.c md5.h
  143. mdfile.obj: mdfile.c mpilib.h usuals.h platform.h mdfile.h md5.h fileio.h
  144. mdfile.obj: language.h pgp.h more.h armor.h
  145. more.obj: more.c mpilib.h usuals.h platform.h language.h fileio.h pgp.h more.h
  146. more.obj: armor.h charset.h
  147. mpiio.obj: mpiio.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h armor.h
  148. mpilib.obj: mpilib.c mpilib.h usuals.h platform.h
  149. noise.obj: noise.c usuals.h randpool.h noise.h
  150. passwd.obj: passwd.c random.h usuals.h md5.h language.h pgp.h more.h armor.h
  151. pgp.obj: pgp.c system.h mpilib.h usuals.h platform.h random.h crypto.h fileio.h
  152. pgp.obj: keymgmt.h language.h pgp.h more.h armor.h exitpgp.h charset.h getopt.h
  153. pgp.obj: config.h keymaint.h keyadd.h rsaglue.h
  154. r3000.obj: r3000.c mpilib.h usuals.h platform.h lmul.h
  155. random.obj: random.c system.h idea.h usuals.h md5.h noise.h language.h random.h
  156. random.obj: fileio.h pgp.h more.h armor.h randpool.h
  157. randpool.obj: randpool.c randpool.h usuals.h md5.h
  158. rsagen.obj: rsagen.c mpilib.h usuals.h platform.h genprime.h rsagen.h random.h
  159. rsagen.obj: rsaglue.h
  160. rsaglue1.obj: rsaglue1.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h
  161. rsaglue1.obj: armor.h rsaglue.h random.h
  162. rsaglue2.obj: rsaglue2.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h
  163. rsaglue2.obj: armor.h rsaglue.h random.h ../rsaref/test/global.h
  164. rsaglue2.obj: ../rsaref/source/rsaref.h ../rsaref/source/md2.h
  165. rsaglue2.obj: ../rsaref/source/md5.h ../rsaref/source/des.h
  166. rsaglue2.obj: ../rsaref/source/rsa.h
  167. sleep.obj: sleep.c
  168. system.obj: system.c exitpgp.h system.h usuals.h
  169. zbits.obj: zbits.c zip.h ztailor.h ziperr.h
  170. zdeflate.obj: zdeflate.c zunzip.h usuals.h system.h zip.h ztailor.h ziperr.h
  171. zfile_io.obj: zfile_io.c zunzip.h usuals.h system.h
  172. zglobals.obj: zglobals.c zip.h ztailor.h ziperr.h
  173. zinflate.obj: zinflate.c zunzip.h usuals.h system.h exitpgp.h
  174. zip.obj: zip.c usuals.h fileio.h language.h pgp.h more.h armor.h exitpgp.h
  175. zip.obj: ziperr.h
  176. zipup.obj: zipup.c zip.h ztailor.h ziperr.h zrevisio.h
  177. ztrees.obj: ztrees.c zip.h ztailor.h ziperr.h
  178. zunzip.obj: zunzip.c zunzip.h usuals.h system.h
  179.