makebz2.dj2 4.2 KB

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