home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / msdos / makefile.dj2 < prev    next >
Makefile  |  1996-04-15  |  3KB  |  114 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. # variables
  14.  
  15. #set CRC32 to crc_gcc.o or crc32.o, depending on whether ASM_CRC is defined:
  16. CRC32 = crc_gcc.o
  17.  
  18. OBJZ = zip.o crypt.o ttyio.o zipfile.o zipup.o fileio.o util.o \
  19.     $(CRC32) crctab.o globals.o
  20. OBJI = deflate.o trees.o bits.o match.o msdos.o
  21. OBJU = zipfile_.o fileio_.o util_.o globals.o
  22. OBJN = zipnote.o $(OBJU)
  23. OBJC = zipcloak.o crctab.o crypt_.o ttyio.o $(OBJU)
  24. OBJS = zipsplit.o $(OBJU)
  25.  
  26. ZIP_H = zip.h ziperr.h tailor.h msdos/osdep.h
  27.  
  28. # rules
  29.  
  30. .SUFFIXES:    # Delete make's default suffix list
  31. .SUFFIXES:    .exe .out .a .ln .o .c .cc .C .p .f .F .y .l .s .S .h
  32.  
  33. .c.o:
  34.     $(CC) -c $(CFLAGS) $< -o $@
  35.  
  36. zips:    zip.exe zipnote.exe zipsplit.exe zipcloak.exe
  37.  
  38. zip.o:          zip.c $(ZIP_H) revision.h crypt.h ttyio.h
  39.  
  40. zipfile.o:    zipfile.c $(ZIP_H)
  41.  
  42. zipup.o:      zipup.c $(ZIP_H) revision.h crypt.h msdos/zipup.h
  43.  
  44. fileio.o:     fileio.c $(ZIP_H)
  45.  
  46. util.o:       util.c $(ZIP_H)
  47.  
  48. globals.o:    globals.c $(ZIP_H)
  49.  
  50. deflate.o:    deflate.c $(ZIP_H)
  51.  
  52. trees.o:      trees.c $(ZIP_H)
  53.  
  54. bits.o:       bits.c $(ZIP_H) crypt.h
  55.  
  56. crc_gcc.o:    crc_i386.S
  57.     $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
  58.  
  59. crc32.o:      crc32.c $(ZIP_H)
  60.  
  61. crctab.o:     crctab.c $(ZIP_H)
  62.  
  63. crypt.o:      crypt.c $(ZIP_H) crypt.h ttyio.h
  64.  
  65. ttyio.o:      ttyio.c $(ZIP_H) crypt.h ttyio.h
  66.  
  67. msdos.o:      msdos/msdos.c $(ZIP_H)
  68.  
  69. zipcloak.o:   zipcloak.c $(ZIP_H) revision.h crypt.h ttyio.h
  70.  
  71. zipnote.o:    zipnote.c $(ZIP_H) revision.h
  72.  
  73. zipsplit.o:   zipsplit.c $(ZIP_H) revision.h
  74.  
  75. zipfile_.o:   zipfile.c $(ZIP_H)
  76.     $(CC) $(UTILFLAGS) $@ zipfile.c
  77.  
  78. fileio_.o:    fileio.c $(ZIP_H)
  79.     $(CC) $(UTILFLAGS) $@ fileio.c
  80.  
  81. util_.o:      util.c $(ZIP_H)
  82.     $(CC) $(UTILFLAGS) $@ util.c
  83.  
  84. crypt_.o:     crypt.c $(ZIP_H) crypt.h ttyio.h
  85.     $(CC) $(UTILFLAGS) $@ crypt.c
  86.  
  87. match.o:      match.S
  88.     $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ match.S
  89.  
  90. zip.exe: $(OBJZ) $(OBJI)
  91.     $(LD) $(LDFLAGS) $(OBJZ) $(OBJI) -o $@
  92. #    stubedit $@ dpmi=cwsdpmi.exe
  93.  
  94. zipcloak.exe: $(OBJC)
  95.     $(LD) $(LDFLAGS) $(OBJC) -o $@
  96. #    stubedit $@ dpmi=cwsdpmi.exe
  97.  
  98. zipnote.exe: $(OBJN)
  99.     $(LD) $(LDFLAGS) $(OBJN) -o $@
  100. #    stubedit $@ dpmi=cwsdpmi.exe
  101.  
  102. zipsplit.exe: $(OBJS)
  103.     $(LD) $(LDFLAGS) $(OBJS) -o $@
  104. #    stubedit $@ dpmi=cwsdpmi.exe
  105.  
  106. # These stand alone executables require dpmi services to run.  When
  107. # running in a DOS window under windows 3.1 or later, the dpmi server
  108. # is automatically present.  Under DOS, if a dpmi server is not installed,
  109. # by default the program will look for "cwsdpmi.exe." If found, it will
  110. # be loaded for the duration of the program.
  111. # cwsdpmi is a "free" dpmi server written by Charles W. Sandmann
  112. # (sandman@clio.rice.edu).  It may be found, among other sites, on SimTel
  113. # and its mirrors in the .../vendors/djgpp/v2misc directory.
  114.