home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / msdos / makefile.dj1 < prev    next >
Makefile  |  1996-04-01  |  3KB  |  125 lines

  1. # Makefile for Zip, ZipCloak, ZipNote and ZipSplit for
  2. # djgpp 1.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. STRIP=strip
  14.  
  15. # Change the STUBIFY definition to the upper version if you want to create
  16. # executables which can be used without any external extender file.
  17. # >>> NOTE: Either copy the go32 extender into your build directory, or
  18. # >>>       edit the STUBIFY macro and add the correct path to "go32.exe".
  19. #STUBIFY=coff2exe -s go32.exe
  20. STUBIFY=coff2exe
  21.  
  22. # variables
  23.  
  24. #set CRC32 to crc_gcc.o or crc32.o, depending on whether ASM_CRC is defined:
  25. CRC32 = crc_gcc.o
  26.  
  27. OBJZ = zip.o crypt.o ttyio.o zipfile.o zipup.o fileio.o util.o \
  28.     $(CRC32) crctab.o globals.o
  29. OBJI = deflate.o trees.o bits.o match.o msdos.o
  30. OBJU = zipfile_.o fileio_.o util_.o globals.o
  31. OBJN = zipnote.o $(OBJU)
  32. OBJC = zipcloak.o crctab.o crypt_.o ttyio.o $(OBJU)
  33. OBJS = zipsplit.o $(OBJU)
  34.  
  35. ZIP_H = zip.h ziperr.h tailor.h msdos/osdep.h
  36.  
  37. # rules
  38.  
  39. .SUFFIXES:    # Delete make's default suffix list
  40. .SUFFIXES:    .exe .out .a .ln .o .c .cc .C .p .f .F .y .l .s .S .h
  41.  
  42. .c.o:
  43.     $(CC) -c $(CFLAGS) $< -o $@
  44.  
  45. zips:    zip.exe zipnote.exe zipsplit.exe zipcloak.exe
  46.  
  47. zip.o:          zip.c $(ZIP_H) revision.h crypt.h ttyio.h
  48.  
  49. zipfile.o:    zipfile.c $(ZIP_H)
  50.  
  51. zipup.o:      zipup.c $(ZIP_H) revision.h crypt.h msdos/zipup.h
  52.  
  53. fileio.o:     fileio.c $(ZIP_H)
  54.  
  55. util.o:       util.c $(ZIP_H)
  56.  
  57. globals.o:    globals.c $(ZIP_H)
  58.  
  59. deflate.o:    deflate.c $(ZIP_H)
  60.  
  61. trees.o:      trees.c $(ZIP_H)
  62.  
  63. bits.o:       bits.c $(ZIP_H) crypt.h
  64.  
  65. crc_gcc.o:    crc_i386.S
  66.     $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
  67.  
  68. crc32.o:      crc32.c $(ZIP_H)
  69.  
  70. crctab.o:     crctab.c $(ZIP_H)
  71.  
  72. crypt.o:      crypt.c $(ZIP_H) crypt.h ttyio.h
  73.  
  74. ttyio.o:      ttyio.c $(ZIP_H) crypt.h ttyio.h
  75.  
  76. msdos.o:      msdos/msdos.c $(ZIP_H)
  77.  
  78. zipcloak.o:   zipcloak.c $(ZIP_H) revision.h crypt.h ttyio.h
  79.  
  80. zipnote.o:    zipnote.c $(ZIP_H) revision.h
  81.  
  82. zipsplit.o:   zipsplit.c $(ZIP_H) revision.h
  83.  
  84. zipfile_.o:   zipfile.c $(ZIP_H)
  85.     $(CC) $(UTILFLAGS) $@ zipfile.c
  86.  
  87. fileio_.o:    fileio.c $(ZIP_H)
  88.     $(CC) $(UTILFLAGS) $@ fileio.c
  89.  
  90. util_.o:      util.c $(ZIP_H)
  91.     $(CC) $(UTILFLAGS) $@ util.c
  92.  
  93. crypt_.o:     crypt.c $(ZIP_H) crypt.h ttyio.h
  94.     $(CC) $(UTILFLAGS) $@ crypt.c
  95.  
  96. match.o:      match.S
  97.     $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ match.S
  98.  
  99. zip.exe: $(OBJZ) $(OBJI)
  100.     echo $(OBJZ) > zip.rsp
  101.     echo $(OBJI) >> zip.rsp
  102.     $(LD) $(LDFLAGS) -o zip @zip.rsp
  103.     del zip.rsp
  104.     $(STRIP) zip
  105.     $(STUBIFY) zip
  106.     del zip
  107.  
  108. zipcloak.exe: $(OBJC)
  109.     $(LD) $(LDFLAGS) $(OBJC) -o zipcloak
  110.     $(STRIP) zipcloak
  111.     $(STUBIFY) zipcloak
  112.     del zipcloak
  113.  
  114. zipnote.exe: $(OBJN)
  115.     $(LD) $(LDFLAGS) $(OBJN) -o zipnote
  116.     $(STRIP) zipnote
  117.     $(STUBIFY) zipnote
  118.     del zipnote
  119.  
  120. zipsplit.exe: $(OBJS)
  121.     $(LD) $(LDFLAGS) $(OBJS) -o zipsplit
  122.     $(STRIP) zipsplit
  123.     $(STUBIFY) zipsplit
  124.     del zipsplit
  125.