makefile.dj2 3.8 KB

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