home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip22.zip / msdos / makefile.dj2 < prev    next >
Makefile  |  1997-08-27  |  3KB  |  132 lines

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