1# Makefile for PGP (Microsoft C) 2# 3# 4# This makefile is intended for PGP 2.6.3i. PGP 2.6.3i is based on MIT's 5# PGP 2.6.2, but has been modified so that it: 6# 7# (1) does not use RSAREF 8# (2) allows you to disable the "legal kludge" 9# (3) corrects a number of bugs present in PGP 2.6.2 10# (4) adds a number of new features without breaking compatibility 11# with older versions 12# 13# PGP 2.6.3i is probably illegal to use within the USA, so if you're 14# physically inside the US, you should do the following: 15# 16# (1) Obtain and build a copy of the RSAREF 1.0 library (included with 17# MIT PGP 2.6 and later) 18# (2) Add the -DUSA compiler switch to CFLAGS for your system below 19# (3) Comment out the lines for MPILIB (rsaglue1.o) and uncomment the 20# lines for RSAREF (rsaglue2.o) below 21# 22# This will give you a version of PGP called 2.6.3, which is identical 23# to 2.6.3i, except that it uses RSAREF and the "legal kludge" cannot 24# be disabled. 25# 26# 27# CFLAGS options: 28# 29# -DUSA to get a version that is legal to use within the US 30# -DDEBUG to include debugging information 31# -DDYN_ALLOC if your compiler does not support large static arrays 32# -DSMALL_MEM if your machine has a small memory (required for MSDOS) 33# 34# Define one of: 35# -DMERRITT Merritt's modmult (fast on risc machines) 36# -DPEASANT Russian peasant modulo multiply algorithm 37# -DUPTON use Upton's modmult algorithm 38# -DSMITH use Smith's modmult 39# See also the file platform.h for system defaults 40# 41# If you don't have a working FIONREAD ioctl you must use one of these: 42# -DUSE_SELECT to use select() system call 43# -DUSE_NBIO to use non-blocking read() 44 45# For an MPILIB version, uncomment the following line 46RSAOBJS = rsaglue1.obj 47 48# For an RSAREF version, uncomment the following lines 49#RSADIR = ..\rsaref 50#RSAOPTS = -I$(RSADIR)\source -I$(RSADIR)\install -DUSEMPILIB 51#RSALIBS = $(RSADIR)\install\rsaref.lib 52#RSAOBJS = rsaglue2.obj 53 54DEFINES = -DMSDOS -DDYN_ALLOC -DSMALL_MEM $(RSAOPTS) 55ADEFINES = -DDYN_ALLOC -DSS_NEQ_DS 56 57CC = cl -nologo -AL 58OPT = -Oilt 59CFLAGS = -c -Gt $(OPT) $(DEFINES) 60LD = link # Link command 61LDFLAGS = /M /STACK:24064 62 63ASM = masm # Assembler command 64AFLAGS = -ml $(ADEFINES) 65# For MASM 6.0, use the following 66#ASM = ml -nologo 67#AFLAGS = -Zm -Cp -c $(ADEFINES) 68 69OBJS_EXT= 8086.obj zmatch.obj # ASM obj. files 70LIBS_EXT= # Libararies 71 72PROJ =pgp 73EXT =.exe 74 75.c.obj: 76 $(CC) $(CFLAGS) $(DEBUG) $*.c 77 78all: $(PROJ)$(EXT) 79 80clean: 81 del $(PROJ)$(EXT) 82 del *.obj 83 84scratch: clean all 85 86new: clean all 87 88 89# Assembly-language subroutine dependencies 90 918086.obj: 8086.asm 92 $(ASM) $(AFLAGS) 8086.asm 93 94zmatch.obj: zmatch.asm 95 $(ASM) $(AFLAGS) $(ADEFINES) zmatch.asm 96 97ZIPOBJS= zbits.obj zdeflate.obj zfile_io.obj zglobals.obj \ 98 zinflate.obj zip.obj zipup.obj ztrees.obj zunzip.obj 99 100OBJ1 = pgp.obj crypto.obj keymgmt.obj fileio.obj mdfile.obj more.obj 101OBJ2 = armor.obj mpilib.obj mpiio.obj genprime.obj rsagen.obj random.obj 102OBJ3 = idea.obj passwd.obj md5.obj system.obj language.obj getopt.obj 103OBJ4 = keyadd.obj config.obj keymaint.obj charset.obj randpool.obj noise.obj 104OBJ5 = $(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 NUL.MAP >>pgp.rsp 115 echo $(LIBS_EXT) $(RSALIBS); >>pgp.rsp 116 $(LD) $(LDFLAGS) @pgp.rsp 117 118## Dependencies ## 119armor.obj: armor.c mpilib.h usuals.h platform.h fileio.h mpiio.h language.h 120armor.obj: pgp.h more.h armor.h crypto.h charset.h 121charset.obj: charset.c usuals.h language.h charset.h system.h 122config.obj: config.c usuals.h fileio.h pgp.h more.h armor.h config.h charset.h 123crypto.obj: crypto.c mpilib.h usuals.h platform.h mpiio.h random.h idea.h 124crypto.obj: crypto.h keymgmt.h keymaint.h pgp.h more.h armor.h mdfile.h md5.h 125crypto.obj: fileio.h charset.h language.h exitpgp.h zipup.h rsaglue.h 126fileio.obj: fileio.c random.h usuals.h mpilib.h platform.h mpiio.h fileio.h 127fileio.obj: language.h pgp.h more.h armor.h exitpgp.h charset.h system.h idea.h 128genprime.obj: genprime.c mpilib.h usuals.h platform.h genprime.h random.h idea.h 129getopt.obj: getopt.c getopt.h 130idea.obj: idea.c idea.h usuals.h randpool.h 131keyadd.obj: keyadd.c mpilib.h usuals.h platform.h crypto.h fileio.h keymgmt.h 132keyadd.obj: charset.h language.h pgp.h more.h armor.h exitpgp.h keyadd.h 133keyadd.obj: keymaint.h keymaint.c mpilib.h usuals.h platform.h random.h idea.h 134keymaint.obj: crypto.h fileio.h keymgmt.h keymaint.h pgp.h more.h armor.h 135keymaint.obj: mpiio.h charset.h language.h mpilib.h 136keymgmt.obj: keymgmt.c system.h mpilib.h usuals.h platform.h idea.h random.h 137keymgmt.obj: crypto.h fileio.h keymgmt.h rsagen.h mpiio.h language.h pgp.h 138keymgmt.obj: more.h armor.h md5.h charset.h keymaint.h 139language.obj: language.c usuals.h fileio.h language.h pgp.h more.h armor.h 140language.obj: charset.h 141md5.obj: md5.c md5.h 142mdfile.obj: mdfile.c mpilib.h usuals.h platform.h mdfile.h md5.h fileio.h 143mdfile.obj: language.h pgp.h more.h armor.h 144more.obj: more.c mpilib.h usuals.h platform.h language.h fileio.h pgp.h more.h 145more.obj: armor.h charset.h 146mpiio.obj: mpiio.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h armor.h 147mpilib.obj: mpilib.c mpilib.h usuals.h platform.h 148noise.obj: noise.c usuals.h randpool.h noise.h 149passwd.obj: passwd.c random.h idea.h usuals.h md5.h language.h pgp.h more.h 150passwd.obj: armor.h 151pgp.obj: pgp.c system.h mpilib.h usuals.h platform.h random.h crypto.h fileio.h 152pgp.obj: keymgmt.h language.h pgp.h more.h armor.h exitpgp.h charset.h getopt.h 153pgp.obj: config.h keymaint.h keyadd.h rsaglue.h idea.h 154r3000.obj: r3000.c mpilib.h usuals.h platform.h lmul.h 155random.obj: random.c system.h idea.h usuals.h md5.h noise.h language.h random.h 156random.obj: fileio.h pgp.h more.h armor.h randpool.h 157randpool.obj: randpool.c randpool.h usuals.h md5.h 158rsagen.obj: rsagen.c mpilib.h usuals.h platform.h genprime.h rsagen.h random.h 159rsagen.obj: rsaglue.h idea.h 160rsaglue1.obj: rsaglue1.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h 161rsaglue1.obj: armor.h rsaglue.h random.h idea.h 162rsaglue2.obj: rsaglue2.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h 163rsaglue2.obj: armor.h rsaglue.h random.h idea.h ../rsaref/install/global.h 164rsaglue2.obj: ../rsaref/source/rsaref.h ../rsaref/source/md2.h 165rsaglue2.obj: ../rsaref/source/md5.h ../rsaref/source/des.h 166rsaglue2.obj: ../rsaref/source/rsa.h 167sleep.obj: sleep.c 168system.obj: system.c exitpgp.h system.h usuals.h mpilib.h 169zbits.obj: zbits.c zip.h ztailor.h ziperr.h 170zdeflate.obj: zdeflate.c zunzip.h usuals.h system.h zip.h ztailor.h ziperr.h 171zfile_io.obj: zfile_io.c zunzip.h usuals.h system.h 172zglobals.obj: zglobals.c zip.h ztailor.h ziperr.h 173zinflate.obj: zinflate.c zunzip.h usuals.h system.h exitpgp.h 174zip.obj: zip.c zip.h usuals.h fileio.h language.h pgp.h more.h armor.h 175zip.obj: exitpgp.h ziperr.h 176zipup.obj: zipup.c zip.h ztailor.h ziperr.h zrevisio.h 177ztrees.obj: ztrees.c zip.h ztailor.h ziperr.h 178zunzip.obj: zunzip.c zunzip.h usuals.h system.h language.h 179