1# Makefile for Zip, ZipCloak, ZipNote and ZipSplit for 2# djgpp 2.x 3VPATH=.;msdos 4# ------------- djgpp ------------- 5CPPFLAGS=-I. -DDOS -DASM_CRC $(LOCAL_ZIP) 6ASFLAGS=$(CPPFLAGS) 7CFLAGS=-Wall -O2 $(CPPFLAGS) 8UTILFLAGS=-c -DUTIL $(CFLAGS) -o 9CC=gcc 10LD=gcc 11LDFLAGS=-s 12 13# ------------- file packer -------- 14# Laszlo Molnar who wrote DJ Packer and Markus F. X. J. Oberhumer who wrote 15# the compression library used by the DJ Packer have collaborated on the 16# Ultimate Packer for eXecutables, which has recently been released. Look 17# for upx???d.zip at http://upx.sourceforge.net 18# As an alternative, look for "djp.exe", now two years old, in the archive 19# mlp107[b,s].zip, found in the same location as csdpmi?[b,s].zip (see below). 20# If you have got an executable packer in your PATH, you may reduce the 21# size of the disk image of the zip*.exe's by uncommenting the lines 22# containing $(DJP) below where the exe's are built. 23#DJP=djp -q 24DJP=upx -qq --best 25 26# variables 27 28#set CRC32 to crc_gcc.o or nothing, depending on whether ASM_CRC is defined: 29CRCA_O = crc_gcc.o 30 31OBJZ = zip.o crypt.o ttyio.o zipfile.o zipup.o fileio.o util.o \ 32 crc32.o $(CRCA_O) globals.o 33OBJI = deflate.o trees.o match.o msdos.o 34OBJU = zipfile_.o fileio_.o util_.o globals.o msdos_.o 35OBJN = zipnote.o $(OBJU) 36OBJC = zipcloak.o crc32_.o crypt_.o ttyio.o $(OBJU) 37OBJS = zipsplit.o $(OBJU) 38 39ZIP_H = zip.h ziperr.h tailor.h msdos/osdep.h 40 41# rules 42 43.SUFFIXES: # Delete make's default suffix list 44.SUFFIXES: .exe .out .a .ln .o .c .cc .C .p .f .F .y .l .s .S .h 45 46.c.o: 47 $(CC) -c $(CFLAGS) $< -o $@ 48 49zips: zip.exe zipnote.exe zipsplit.exe zipcloak.exe 50 51zip.o: zip.c $(ZIP_H) revision.h crc32.h crypt.h ttyio.h 52 53zipfile.o: zipfile.c $(ZIP_H) crc32.h 54 55zipup.o: zipup.c $(ZIP_H) revision.h crc32.h crypt.h msdos/zipup.h 56 57fileio.o: fileio.c $(ZIP_H) crc32.h 58 59util.o: util.c $(ZIP_H) 60 61globals.o: globals.c $(ZIP_H) 62 63deflate.o: deflate.c $(ZIP_H) 64 65trees.o: trees.c $(ZIP_H) 66 67crc_gcc.o: crc_i386.S 68 $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S 69 70crc32.o: crc32.c $(ZIP_H) crc32.h 71 72crypt.o: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h 73 74ttyio.o: ttyio.c $(ZIP_H) crypt.h ttyio.h 75 76msdos.o: msdos/msdos.c $(ZIP_H) 77 78zipcloak.o: zipcloak.c $(ZIP_H) revision.h crc32.h crypt.h ttyio.h 79 80zipnote.o: zipnote.c $(ZIP_H) revision.h 81 82zipsplit.o: zipsplit.c $(ZIP_H) revision.h 83 84zipfile_.o: zipfile.c $(ZIP_H) crc32.h 85 $(CC) $(UTILFLAGS) $@ zipfile.c 86 87fileio_.o: fileio.c $(ZIP_H) crc32.h 88 $(CC) $(UTILFLAGS) $@ fileio.c 89 90util_.o: util.c $(ZIP_H) 91 $(CC) $(UTILFLAGS) $@ util.c 92 93crc32_.o: crc32.c $(ZIP_H) crc32.h 94 $(CC) $(UTILFLAGS) $@ crc32.c 95 96crypt_.o: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h 97 $(CC) $(UTILFLAGS) $@ crypt.c 98 99msdos_.o: msdos/msdos.c $(ZIP_H) 100 $(CC) $(UTILFLAGS) $@ msdos/msdos.c 101 102 103match.o: match.S 104 $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ match.S 105 106zip.exe: $(OBJZ) $(OBJI) 107 echo $(OBJZ) > zip.rsp 108 echo $(OBJI) >> zip.rsp 109 $(LD) $(LDFLAGS) -o $@ @zip.rsp 110 del zip.rsp 111# stubedit $@ dpmi=cwsdpmi.exe 112# $(DJP) $@ 113 114zipcloak.exe: $(OBJC) 115 $(LD) $(LDFLAGS) $(OBJC) -o $@ 116# stubedit $@ dpmi=cwsdpmi.exe 117# $(DJP) $@ 118 119zipnote.exe: $(OBJN) 120 $(LD) $(LDFLAGS) $(OBJN) -o $@ 121# stubedit $@ dpmi=cwsdpmi.exe 122# $(DJP) $@ 123 124zipsplit.exe: $(OBJS) 125 $(LD) $(LDFLAGS) $(OBJS) -o $@ 126# stubedit $@ dpmi=cwsdpmi.exe 127# $(DJP) $@ 128 129# These stand alone executables require dpmi services to run. When 130# running in a DOS window under windows 3.1 or later, the dpmi server 131# is automatically present. Under DOS, if a dpmi server is not installed, 132# by default the program will look for "cwsdpmi.exe." If found, it will 133# be loaded for the duration of the program. 134# cwsdpmi is a "free" dpmi server written by Charles W. Sandmann 135# (sandman@clio.rice.edu). It may be found, among other sites, on SimTel 136# and its mirrors in the .../vendors/djgpp/v2misc directory. 137