Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # Makefile for Zip, ZipCloak, ZipNote and ZipSplit for
  2. # THEOS ANSI C
  3. # To use, do "make -f theos/makefile"
  4. # This make file uses cl, a C compiler and linker driver written by
  5. # Jean-Michel Dubois. Send a mail to jmdubois@ibcfrance.fr to get it for free.
  6. # MAINWA_BUG Workaround argument expansion failure
  7. # LOCATE_BUG Workaround stat, fopen and open failure on relative paths to
  8. # root dir.
  9. CC=cl
  10. CFLAGS=-Zi -W3 -DDYN_ALLOC -DCRYPT -DMAINWA_BUG -DLOCATE_BUG
  11. LD=cl -o
  12. LDFLAGS=-m -Zi
  13. AS=cc
  14. ASFLAGS=
  15. UTILFLAGS=-DUTIL $(CFLAGS) -Fo
  16. # variables
  17. # object file lists
  18. OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
  19. theos.o crc32.o _fprintf.o _stat.o _chmod.o _isatty.o \
  20. _setargv.o _rename.o
  21. OBJI = deflate.o trees.o
  22. OBJA =
  23. OBJU = zipfile_.o fileio_.o util_.o globals.o theos_.o _rename.o _stat.o \
  24. _chmod.o _fprintf.o
  25. OBJN = zipnote.o $(OBJU)
  26. OBJC = zipcloak.o $(OBJU) crc32_.o crypt_.o ttyio.o
  27. OBJS = zipsplit.o $(OBJU)
  28. OSDEP_H = theos/osdep.h
  29. ZIP_H = zip.h ziperr.h tailor.h $(OSDEP_H)
  30. ZIPS = zip.command zipnote.command zipsplit.command zipcloak.command
  31. zips: $(ZIPS)
  32. zip.o: zip.c $(ZIP_H) crc32.h crypt.h ttyio.h revision.h
  33. $(CC) -c $(CFLAGS) $*.c
  34. zipfile.o: zipfile.c $(ZIP_H) crc32.h
  35. $(CC) -c $(CFLAGS) $*.c
  36. zipup.o: zipup.c $(ZIP_H) revision.h crc32.h crypt.h
  37. $(CC) -c $(CFLAGS) $*.c
  38. fileio.o: fileio.c $(ZIP_H) crc32.h
  39. $(CC) -c $(CFLAGS) $*.c
  40. util.o: util.c $(ZIP_H) theos/charconv.h
  41. $(CC) -c $(CFLAGS) $*.c
  42. globals.o: globals.c $(ZIP_H)
  43. $(CC) -c $(CFLAGS) $*.c
  44. crc32.o: crc32.c $(ZIP_H) crc32.h
  45. $(CC) -c $(CFLAGS) $*.c
  46. deflate.o: deflate.c $(ZIP_H)
  47. $(CC) -c $(CFLAGS) $*.c
  48. trees.o: trees.c $(ZIP_H)
  49. $(CC) -c $(CFLAGS) $*.c
  50. crypt.o: crypt.c $(ZIP_H) crc32.h crypt.h
  51. $(CC) -c $(CFLAGS) $*.c
  52. theos.o: theos/theos.c $(ZIP_H)
  53. $(CC) -c $(CFLAGS) -Fo$@ theos/theos.c
  54. _fprintf.o: theos/_fprintf.c
  55. $(CC) -c $(CFLAGS) -Fo$@ theos/_fprintf.c
  56. _stat.o: theos/_stat.c
  57. $(CC) -c $(CFLAGS) -Fo$@ theos/_stat.c
  58. _chmod.o: theos/_chmod.c
  59. $(CC) -c $(CFLAGS) -Fo$@ theos/_chmod.c
  60. _isatty.o: theos/_isatty.c
  61. $(CC) -c $(CFLAGS) -Fo$@ theos/_isatty.c
  62. _rename.o: theos/_rename.c
  63. $(CC) -c $(CFLAGS) -Fo$@ theos/_rename.c
  64. _setargv.o: theos/_setargv.c
  65. $(CC) -c $(CFLAGS) -Fo$@ theos/_setargv.c
  66. ttyio.o: $(ZIP_H) ttyio.h ttyio.c
  67. $(CC) -c $(CFLAGS) $*.c
  68. zipcloak.o: zipcloak.c $(ZIP_H) crc32.h crypt.h ttyio.h revision.h
  69. $(CC) -c $(CFLAGS) $*.c
  70. zipnote.o: zipnote.c $(ZIP_H) revision.h
  71. $(CC) -c $(CFLAGS) $*.c
  72. zipsplit.o: $(ZIP_H) revision.h
  73. $(CC) -c $(CFLAGS) $*.c
  74. zipfile_.o: zipfile.c $(ZIP_H) crc32.h
  75. $(CC) -c $(UTILFLAGS)$@ zipfile.c
  76. fileio_.o: fileio.c $(ZIP_H) crc32.h
  77. $(CC) -c $(UTILFLAGS)$@ fileio.c
  78. theos_.o: theos/theos.c $(ZIP_H)
  79. $(CC) -c $(UTILFLAGS)$@ theos/theos.c
  80. util_.o: util.c $(ZIP_H)
  81. $(CC) -c $(UTILFLAGS)$@ util.c
  82. crc32_.o: crc32.c $(ZIP_H) crc32.h
  83. $(CC) -c $(UTILFLAGS)$@ $*.c
  84. crypt_.o: crypt.c $(ZIP_H) crc32.h crypt.h
  85. $(CC) -c $(UTILFLAGS)$@ crypt.c
  86. zip.command: $(OBJZ) $(OBJI)
  87. $(LD) $@ $(OBJZ) $(OBJI) $(LDFLAGS)
  88. zipcloak.command: $(OBJC)
  89. $(LD) $@ $(OBJC) $(LDFLAGS)
  90. zipnote.command: $(OBJN)
  91. $(LD) $@ $(OBJN) $(LDFLAGS)
  92. zipsplit.command: $(OBJS)
  93. $(LD) $@ $(OBJS) $(LDFLAGS)
  94. install: $(ZIPS)
  95. copy *.command /system.cmd32.=(rep noq not
  96. clean:
  97. erase *.o(noq not
  98. erase *.command(noq not