Makefile.dj 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # Makefile for UnZip, fUnZip and UnZipSFX
  2. # for rsxntdj 1.6beta2 (with djgpp v2.3) under Windows 9x and Windows NT.
  3. # By E-Yen Tan. Last updated 25th December 2006.
  4. CC = gcc -Zwin32
  5. CFLAGS = -O2 -Wall -I. -DWIN32 -DASM_CRC $(LOCAL_UNZIP)
  6. AS = gcc
  7. ASFLAGS = -Di386
  8. LDFLAGS = -o ./
  9. LDFLAGS2 = -lalias -L. $(L_ADVAPI32)
  10. IMPLIBS = $(ADVAPI32LIB)
  11. ADVAPI32 = advapi32
  12. ADVAPI32LIB = lib$(ADVAPI32).a
  13. L_ADVAPI32 = -l$(ADVAPI32)
  14. OBJU1 = unzip.o crc_gcc.o crc32.o crypt.o envargs.o explode.o extract.o
  15. OBJU2 = fileio.o globals.o inflate.o list.o match.o process.o ttyio.o
  16. OBJU3 = ubz2err.o unreduce.o unshrink.o zipinfo.o win32.o nt.o
  17. OBJU = $(OBJU1) $(OBJU2) $(OBJU3)
  18. OBJX1 = unzipsf_.o crc_gcc.o crc32_.o crypt_.o extract_.o fileio_.o globals_.o
  19. OBJX2 = inflate_.o match_.o process_.o ttyio_.o ubz2err_.o win32_.o nt_.o
  20. OBJX = $(OBJX1) $(OBJX2)
  21. OBJF = funzip.o crc_gcc.o crc32f.o cryptf.o inflatef.o globalsf.o ttyiof.o \
  22. win32f.o
  23. UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
  24. # rules
  25. .SUFFIXES: .c .o
  26. .c.o:
  27. $(CC) -c $(CFLAGS) -o$@ $<
  28. .asm.o:
  29. $(AS) $(ASFLAGS) $<
  30. all: unzip.exe funzip.exe unzipsfx.exe
  31. unzip.exe: $(OBJU) $(IMPLIBS)
  32. $(CC) $(LDFLAGS)$@ $(OBJU) $(LDFLAGS2)
  33. funzip.exe: $(OBJF) $(IMPLIBS)
  34. $(CC) $(LDFLAGS)$@ $(OBJF) $(LDFLAGS2)
  35. unzipsfx.exe: $(OBJX) $(IMPLIBS)
  36. $(CC) $(LDFLAGS)$@ $(OBJX) $(LDFLAGS2)
  37. uzexampl.exe: uzexampl$(OBJ)
  38. $(CC) $(LDFLAGS)$@ uzexampl$(OBJ) -lversion $(LDFLAGS2)
  39. $(ADVAPI32LIB):
  40. makelib "$(windir)/system/advapi32.dll" -o ./$@
  41. crc32.o: crc32.c $(UNZIP_H) crc32.h
  42. envargs.o: envargs.c $(UNZIP_H)
  43. explode.o: explode.c $(UNZIP_H)
  44. extract.o: extract.c $(UNZIP_H) crypt.h
  45. fileio.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  46. globals.o: globals.c $(UNZIP_H)
  47. inflate.o: inflate.c $(UNZIP_H)
  48. list.o: list.c $(UNZIP_H)
  49. match.o: match.c $(UNZIP_H)
  50. process.o: process.c $(UNZIP_H)
  51. ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  52. ubz2err.o: ubz2err.c $(UNZIP_H)
  53. unreduce.o: unreduce.c $(UNZIP_H)
  54. unshrink.o: unshrink.c $(UNZIP_H)
  55. unzip.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
  56. zipinfo.o: zipinfo.c $(UNZIP_H)
  57. funzip.o: funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h
  58. $(CC) -c $(CFLAGS) -o$@ funzip.c
  59. uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h
  60. $(CC) -c $(CFLAGS) -o$@ windll/uzexampl.c
  61. win32.o: win32/win32.c $(UNZIP_H) win32/nt.h unzvers.h
  62. $(CC) -c $(CFLAGS) -o$@ win32/win32.c
  63. win32f.o: win32/win32.c $(UNZIP_H) win32/nt.h
  64. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ win32/win32.c
  65. win32_.o: win32/win32.c $(UNZIP_H) win32/nt.h
  66. $(CC) -c $(CFLAGS) -DSFX -o$@ win32/win32.c
  67. nt.o: win32/nt.c $(UNZIP_H) win32/nt.h
  68. $(CC) -c $(CFLAGS) -o$@ win32/nt.c
  69. nt_.o: win32/nt.c $(UNZIP_H) win32/nt.h
  70. $(CC) -c $(CFLAGS) -DSFX -o$@ win32/nt.c
  71. crc_gcc.o: crc_i386.S
  72. $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
  73. crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  74. $(CC) -c $(CFLAGS) -o$@ crypt.c
  75. cryptf.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  76. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ crypt.c
  77. crc32f.o: crc32.c $(UNZIP_H) zip.h crc32.h
  78. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ crc32.c
  79. globalsf.o: globals.c $(UNZIP_H)
  80. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ globals.c
  81. inflatef.o: inflate.c inflate.h $(UNZIP_H) crypt.h
  82. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ inflate.c
  83. ttyiof.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  84. $(CC) -c $(CFLAGS) -DFUNZIP -o$@ ttyio.c
  85. crc32_.o: crc32.c $(UNZIP_H) crc32.h
  86. $(CC) -c $(CFLAGS) -DSFX -o$@ crc32.c
  87. crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  88. $(CC) -c $(CFLAGS) -DSFX -o$@ crypt.c
  89. extract_.o: extract.c $(UNZIP_H) crypt.h
  90. $(CC) -c $(CFLAGS) -DSFX -o$@ extract.c
  91. fileio_.o: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  92. $(CC) -c $(CFLAGS) -DSFX -o$@ fileio.c
  93. globals_.o: globals.c $(UNZIP_H)
  94. $(CC) -c $(CFLAGS) -DSFX -o$@ globals.c
  95. inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h
  96. $(CC) -c $(CFLAGS) -DSFX -o$@ inflate.c
  97. match_.o: match.c $(UNZIP_H)
  98. $(CC) -c $(CFLAGS) -DSFX -o$@ match.c
  99. process_.o: process.c $(UNZIP_H)
  100. $(CC) -c $(CFLAGS) -DSFX -o$@ process.c
  101. ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  102. $(CC) -c $(CFLAGS) -DSFX -o$@ ttyio.c
  103. ubz2err_.o: ubz2err.c $(UNZIP_H)
  104. $(CC) -c $(CFLAGS) -DSFX -o$@ ubz2err.c
  105. unzipsf_.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
  106. $(CC) -c $(CFLAGS) -DSFX -o$@ unzip.c