--- pgp/src/makefile.msc 2018/04/24 16:39:26 1.1.1.3 +++ pgp/src/makefile.msc 2018/04/24 16:45:37 1.1.1.8 @@ -1,167 +1,178 @@ -# makefile for PGP (Microsoft C) - -DEFINES = -DDYN_ALLOC -DSMALL_MEM -ADEFINES = -DDYN_ALLOC=1 -DSS_NEQ_DS=1 - -PROJ =PGP - -CC =cl -nologo -AL # Compile command -OPT = -Oilt # Optimization and Testing flags -CFLAGS =-c -Gt $(OPT) $(DEFINES) # Flags for compiler - -LD =link # Link command -LFLAGS =/M /STACK:24576 # Flags for linker -LIBS_EXT= # Libraries - -# for MASM 5.x and below -ASM =masm # Assembler command -ASMFLAGS= -ml # Flags for assembler -# for MASM 6.0 use the following instead -#ASM =ml -nologo # Assembler command -#ASMFLAGS=-Zm -Cp -c # Flags for assembler - -#OBJS_EXT=8086.obj # ASM obj. files -OBJS_EXT=8086.obj zmatch.obj # ASM obj. files - -EXT =.EXE # Whatever extension execuatables have - -.c.obj: - $(CC) $(CFLAGS) $(DEBUG) $*.c - -all: $(PROJ)$(EXT) - -os2: - $(MAKE) -f makefile.msc $(PROJ)2$(EXT) \ - DEFINES="-DDYN_ALLOC -DSMALL_MEM -DOS2" ADEFINES="-DDYN_ALLOC=1" \ - LFLAGS="-Lp -F 3000" - -clean: - del $(PROJ)$(EXT) - del *.OBJ - -scratch: clean all - -new: clean all - - -8086.obj : 8086.asm - $(ASM) $(ASMFLAGS) 8086.asm ; - -zmatch.obj : zmatch.asm - $(ASM) $(ASMFLAGS) $(ADEFINES) zmatch.asm ; - -ZIPOBJS= zbits.obj zdeflate.obj zfile_io.obj zglobals.obj \ - zinflate.obj zip.obj zipup.obj ztrees.obj zunzip.obj - -OBJ1 = pgp.obj crypto.obj keymgmt.obj fileio.obj \ - mdfile.obj more.obj armor.obj mpilib.obj mpiio.obj -OBJ2 = genprime.obj rsagen.obj random.obj idea.obj passwd.obj \ - md5.obj system.obj language.obj getopt.obj -OBJ3 = keyadd.obj config.obj keymaint.obj charset.obj $(OBJS_EXT) - -$(PROJ)$(EXT): $(OBJ1) $(OBJ2) $(OBJ3) $(ZIPOBJS) - echo $(OBJ1)+ >pgp.rsp - echo $(OBJ2)+ >>pgp.rsp - echo $(OBJ3)+ >>pgp.rsp - echo $(ZIPOBJS); >>pgp.rsp - $(LD) $(LFLAGS) @pgp.rsp - del pgp.rsp - -$(PROJ)2$(EXT): $(OBJ1) $(OBJ2) $(OBJ3) $(ZIPOBJS) pgp.def - $(CC) $(OBJ1) $(OBJ2) $(OBJ3) $(ZIPOBJS) pgp.def -o $@ $(LFLAGS) - bind -nologo $@ - -# $(LD) @<< -#$(LFLAGS) $(OBJ1) + -#$(OBJ2) + -#$(ZIPOBJS) -#$(PROJ)$(EXT) , NUL , $(LIBS_EXT) ; -#<< - -# The following is for the IDEA test program... - -ideatst: IDEATST$(EXT) - -IDEATST$(EXT): ideatst.obj - $(LD) $(LFLAGS) IDEATST.OBJ, IDEATST$(EXT), NUL, $(LIBS_EXT); - -# $(LD) @<< -#$(LFLAGS) IDEATST.OBJ , IDEATST$(EXT), NUL , $(LIBS_EXT) ; -#<< - - -# The following is for the DSS test program... - -dss.obj: dss.c mpilib.h genprime.h random.h dss.h - $(CC) $(CFLAGS) $*.c - -DSSOBJS = dss.obj mpilib.obj genprime.obj mpiio.obj random.obj 8086.obj -dss.exe : $(DSSOBJS) - link /M /STACK:8192 $(DSSOBJS) ; - - dss - -DSSSTUFF1 = dss.c mpilib.c genprime.c mpiio.c random.c 8086.asm makefile -DSSSTUFF2 = dss.h mpilib.h genprime.h mpiio.h random.h 8086.obj usuals.h -dss.zip : $(DSSSTUFF1) $(DSSSTUFF2) - - del dss.zip - pkzip dss.zip $(DSSSTUFF1) - pkzip dss.zip $(DSSSTUFF2) - -rsatst.obj: rsatst.c mpilib.h mpiio.h genprime.h rsagen.h random.h - -RSATSTOBJS = rsatst.obj mpilib.obj genprime.obj rsagen.obj mpiio.obj 8086.obj random.obj -rsatst.exe : $(RSATSTOBJS) - link /M /STACK:8192 $(RSATSTOBJS) ; - - rsatst -i - - -## Dependencies ## -armor.obj : armor.c mpilib.h usuals.h platform.h fileio.h mpiio.h language.h \ - pgp.h more.h armor.h crypto.h -charset.obj : charset.c usuals.h language.h charset.h system.h -config.obj : config.c usuals.h fileio.h pgp.h more.h armor.h config.h \ - charset.h -crypto.obj : crypto.c mpilib.h usuals.h platform.h mpiio.h random.h idea.h \ - crypto.h keymgmt.h keymaint.h mdfile.h md5.h fileio.h charset.h language.h \ - pgp.h more.h armor.h exitpgp.h zipup.h -fileio.obj : fileio.c random.h usuals.h mpilib.h platform.h mpiio.h fileio.h \ - language.h pgp.h more.h armor.h exitpgp.h charset.h system.h -genprime.obj : genprime.c mpilib.h usuals.h platform.h genprime.h random.h -getopt.obj : getopt.c getopt.h -idea.obj : idea.c idea.h usuals.h -keyadd.obj : keyadd.c mpilib.h usuals.h platform.h crypto.h fileio.h \ - keymgmt.h charset.h language.h pgp.h more.h armor.h exitpgp.h keyadd.h \ - keymaint.h -keymaint.obj : keymaint.c mpilib.h usuals.h platform.h random.h crypto.h \ - fileio.h keymgmt.h keymaint.h mpiio.h charset.h language.h pgp.h more.h \ - armor.h -keymgmt.obj : keymgmt.c system.h mpilib.h usuals.h platform.h idea.h random.h \ - crypto.h fileio.h keymgmt.h rsagen.h mpiio.h language.h pgp.h more.h \ - armor.h md5.h charset.h keymaint.h -language.obj : language.c usuals.h fileio.h language.h pgp.h more.h armor.h \ - charset.h -md5.obj : md5.c md5.h -mdfile.obj : mdfile.c mpilib.h usuals.h platform.h mdfile.h md5.h fileio.h \ - language.h pgp.h more.h armor.h -more.obj : more.c system.h mpilib.h usuals.h platform.h language.h fileio.h \ - pgp.h more.h armor.h charset.h -mpiio.obj : mpiio.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h armor.h -mpilib.obj : mpilib.c mpilib.h usuals.h platform.h -passwd.obj : passwd.c random.h usuals.h md5.h language.h pgp.h more.h armor.h -pgp.obj : pgp.c system.h mpilib.h usuals.h platform.h random.h crypto.h \ - fileio.h keymgmt.h language.h pgp.h more.h armor.h exitpgp.h charset.h \ - getopt.h config.h keymaint.h keyadd.h -random.obj : random.c system.h random.h usuals.h language.h -rsagen.obj : rsagen.c mpilib.h usuals.h platform.h genprime.h rsagen.h \ - random.h -system.obj : system.c exitpgp.h system.h charset.h -zbits.obj : zbits.c zip.h ztailor.h ziperr.h -zdeflate.obj : zdeflate.c zunzip.h usuals.h system.h zip.h ztailor.h ziperr.h -zfile_io.obj : zfile_io.c zunzip.h usuals.h system.h -zglobals.obj : zglobals.c zip.h ztailor.h ziperr.h -zinflate.obj : zinflate.c zunzip.h usuals.h system.h exitpgp.h -zip.obj : zip.c usuals.h fileio.h language.h pgp.h more.h armor.h exitpgp.h -zipup.obj : zipup.c zip.h ztailor.h ziperr.h zrevisio.h -ztrees.obj : ztrees.c zip.h ztailor.h ziperr.h -zunzip.obj : zunzip.c zunzip.h usuals.h system.h -r3000.obj : r3000.c mpilib.h usuals.h platform.h lmul.h +# Makefile for PGP (Microsoft C) +# +# +# This makefile is intended for PGP 2.6.3i. PGP 2.6.3i is based on MIT's +# PGP 2.6.2, but has been modified so that it: +# +# (1) does not use RSAREF +# (2) allows you to disable the "legal kludge" +# (3) corrects a number of bugs present in PGP 2.6.2 +# (4) adds a number of new features without breaking compatibility +# with older versions +# +# PGP 2.6.3i is probably illegal to use within the USA, so if you're +# physically inside the US, you should do the following: +# +# (1) Obtain and build a copy of the RSAREF 1.0 library (included with +# MIT PGP 2.6 and later) +# (2) Add the -DUSA compiler switch to CFLAGS for your system below +# (3) Comment out the lines for MPILIB (rsaglue1.o) and uncomment the +# lines for RSAREF (rsaglue2.o) below +# +# This will give you a version of PGP called 2.6.3, which is identical +# to 2.6.3i, except that it uses RSAREF and the "legal kludge" cannot +# be disabled. +# +# +# CFLAGS options: +# +# -DUSA to get a version that is legal to use within the US +# -DDEBUG to include debugging information +# -DDYN_ALLOC if your compiler does not support large static arrays +# -DSMALL_MEM if your machine has a small memory (required for MSDOS) +# +# Define one of: +# -DMERRITT Merritt's modmult (fast on risc machines) +# -DPEASANT Russian peasant modulo multiply algorithm +# -DUPTON use Upton's modmult algorithm +# -DSMITH use Smith's modmult +# See also the file platform.h for system defaults +# +# If you don't have a working FIONREAD ioctl you must use one of these: +# -DUSE_SELECT to use select() system call +# -DUSE_NBIO to use non-blocking read() + +# For an MPILIB version, uncomment the following line +RSAOBJS = rsaglue1.obj + +# For an RSAREF version, uncomment the following lines +#RSADIR = ..\rsaref +#RSAOPTS = -I$(RSADIR)\source -I$(RSADIR)\install -DUSEMPILIB +#RSALIBS = $(RSADIR)\install\rsaref.lib +#RSAOBJS = rsaglue2.obj + +DEFINES = -DMSDOS -DDYN_ALLOC -DSMALL_MEM $(RSAOPTS) +ADEFINES = -DDYN_ALLOC -DSS_NEQ_DS + +CC = cl -nologo -AL +OPT = -Oilt +CFLAGS = -c -Gt $(OPT) $(DEFINES) +LD = link # Link command +LDFLAGS = /M /STACK:24064 + +ASM = masm # Assembler command +AFLAGS = -ml $(ADEFINES) +# For MASM 6.0, use the following +#ASM = ml -nologo +#AFLAGS = -Zm -Cp -c $(ADEFINES) + +OBJS_EXT= 8086.obj zmatch.obj # ASM obj. files +LIBS_EXT= # Libararies + +PROJ =pgp +EXT =.exe + +.c.obj: + $(CC) $(CFLAGS) $(DEBUG) $*.c + +all: $(PROJ)$(EXT) + +clean: + del $(PROJ)$(EXT) + del *.obj + +scratch: clean all + +new: clean all + + +# Assembly-language subroutine dependencies + +8086.obj: 8086.asm + $(ASM) $(AFLAGS) 8086.asm + +zmatch.obj: zmatch.asm + $(ASM) $(AFLAGS) $(ADEFINES) zmatch.asm + +ZIPOBJS= zbits.obj zdeflate.obj zfile_io.obj zglobals.obj \ + zinflate.obj zip.obj zipup.obj ztrees.obj zunzip.obj + +OBJ1 = pgp.obj crypto.obj keymgmt.obj fileio.obj mdfile.obj more.obj +OBJ2 = armor.obj mpilib.obj mpiio.obj genprime.obj rsagen.obj random.obj +OBJ3 = idea.obj passwd.obj md5.obj system.obj language.obj getopt.obj +OBJ4 = keyadd.obj config.obj keymaint.obj charset.obj randpool.obj noise.obj +OBJ5 = $(OBJS_EXT) $(RSAOBJS) sleep.obj + +$(PROJ)$(EXT): $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(ZIPOBJS) + echo $(OBJ1)+ >pgp.rsp + echo $(OBJ2)+ >>pgp.rsp + echo $(OBJ3)+ >>pgp.rsp + echo $(OBJ4)+ >>pgp.rsp + echo $(OBJ5)+ >>pgp.rsp + echo $(ZIPOBJS) >>pgp.rsp + echo $(PROJ)$(EXT) >>pgp.rsp + echo NUL.MAP >>pgp.rsp + echo $(LIBS_EXT) $(RSALIBS); >>pgp.rsp + $(LD) $(LDFLAGS) @pgp.rsp + +## Dependencies ## +armor.obj: armor.c mpilib.h usuals.h platform.h fileio.h mpiio.h language.h +armor.obj: pgp.h more.h armor.h crypto.h charset.h +charset.obj: charset.c usuals.h language.h charset.h system.h +config.obj: config.c usuals.h fileio.h pgp.h more.h armor.h config.h charset.h +crypto.obj: crypto.c mpilib.h usuals.h platform.h mpiio.h random.h idea.h +crypto.obj: crypto.h keymgmt.h keymaint.h pgp.h more.h armor.h mdfile.h md5.h +crypto.obj: fileio.h charset.h language.h exitpgp.h zipup.h rsaglue.h +fileio.obj: fileio.c random.h usuals.h mpilib.h platform.h mpiio.h fileio.h +fileio.obj: language.h pgp.h more.h armor.h exitpgp.h charset.h system.h idea.h +genprime.obj: genprime.c mpilib.h usuals.h platform.h genprime.h random.h idea.h +getopt.obj: getopt.c getopt.h +idea.obj: idea.c idea.h usuals.h randpool.h +keyadd.obj: keyadd.c mpilib.h usuals.h platform.h crypto.h fileio.h keymgmt.h +keyadd.obj: charset.h language.h pgp.h more.h armor.h exitpgp.h keyadd.h +keyadd.obj: keymaint.h keymaint.c mpilib.h usuals.h platform.h random.h idea.h +keymaint.obj: crypto.h fileio.h keymgmt.h keymaint.h pgp.h more.h armor.h +keymaint.obj: mpiio.h charset.h language.h mpilib.h +keymgmt.obj: keymgmt.c system.h mpilib.h usuals.h platform.h idea.h random.h +keymgmt.obj: crypto.h fileio.h keymgmt.h rsagen.h mpiio.h language.h pgp.h +keymgmt.obj: more.h armor.h md5.h charset.h keymaint.h +language.obj: language.c usuals.h fileio.h language.h pgp.h more.h armor.h +language.obj: charset.h +md5.obj: md5.c md5.h +mdfile.obj: mdfile.c mpilib.h usuals.h platform.h mdfile.h md5.h fileio.h +mdfile.obj: language.h pgp.h more.h armor.h +more.obj: more.c mpilib.h usuals.h platform.h language.h fileio.h pgp.h more.h +more.obj: armor.h charset.h +mpiio.obj: mpiio.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h armor.h +mpilib.obj: mpilib.c mpilib.h usuals.h platform.h +noise.obj: noise.c usuals.h randpool.h noise.h +passwd.obj: passwd.c random.h idea.h usuals.h md5.h language.h pgp.h more.h +passwd.obj: armor.h +pgp.obj: pgp.c system.h mpilib.h usuals.h platform.h random.h crypto.h fileio.h +pgp.obj: keymgmt.h language.h pgp.h more.h armor.h exitpgp.h charset.h getopt.h +pgp.obj: config.h keymaint.h keyadd.h rsaglue.h idea.h +r3000.obj: r3000.c mpilib.h usuals.h platform.h lmul.h +random.obj: random.c system.h idea.h usuals.h md5.h noise.h language.h random.h +random.obj: fileio.h pgp.h more.h armor.h randpool.h +randpool.obj: randpool.c randpool.h usuals.h md5.h +rsagen.obj: rsagen.c mpilib.h usuals.h platform.h genprime.h rsagen.h random.h +rsagen.obj: rsaglue.h idea.h +rsaglue1.obj: rsaglue1.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h +rsaglue1.obj: armor.h rsaglue.h random.h idea.h +rsaglue2.obj: rsaglue2.c mpilib.h usuals.h platform.h mpiio.h pgp.h more.h +rsaglue2.obj: armor.h rsaglue.h random.h idea.h ../rsaref/install/global.h +rsaglue2.obj: ../rsaref/source/rsaref.h ../rsaref/source/md2.h +rsaglue2.obj: ../rsaref/source/md5.h ../rsaref/source/des.h +rsaglue2.obj: ../rsaref/source/rsa.h +sleep.obj: sleep.c +system.obj: system.c exitpgp.h system.h usuals.h mpilib.h +zbits.obj: zbits.c zip.h ztailor.h ziperr.h +zdeflate.obj: zdeflate.c zunzip.h usuals.h system.h zip.h ztailor.h ziperr.h +zfile_io.obj: zfile_io.c zunzip.h usuals.h system.h +zglobals.obj: zglobals.c zip.h ztailor.h ziperr.h +zinflate.obj: zinflate.c zunzip.h usuals.h system.h exitpgp.h +zip.obj: zip.c zip.h usuals.h fileio.h language.h pgp.h more.h armor.h +zip.obj: exitpgp.h ziperr.h +zipup.obj: zipup.c zip.h ztailor.h ziperr.h zrevisio.h +ztrees.obj: ztrees.c zip.h ztailor.h ziperr.h +zunzip.obj: zunzip.c zunzip.h usuals.h system.h language.h