makefile.wat 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.53 and later Mark Wright and others
  3. # Version: Watcom C 31 Mar 07
  4. #------------------------------------------------------------------------------
  5. # WARNING: this is a hacked-up version of an ancient (1993) makefile. It will
  6. # not work without modifications to the UnZip 5.3 sources. This makefile is
  7. # (for now) included only for completeness and as a starting point for a real
  8. # Novell Netware NLM port. (This makefile was intended for Netware 3.11.)
  9. # Commands to execute before making any target
  10. # Set environment variables for compiler
  11. .BEFORE
  12. @set inc386=\watcom\novh
  13. @set wcg386=\watcom\binp\wcl386.exe
  14. # Macro definitions
  15. NLMNAME = unzip
  16. DESCRIPTION = unzip utility
  17. VERSION = 5.5.3
  18. COPYRIGHT = Copyright 1990-2007 Info-ZIP (www.info-zip.org).
  19. SCREENNAME = Info-ZIP's UnZip Utility
  20. CLIBIMP = \watcom\novi\clib.imp
  21. OBJFILE = $NLMNAME.obj
  22. PRELUDE = \watcom\novi\prelude.obj
  23. # Compile switches
  24. # d2 include full symbolic debugging information
  25. # 5s generate 586 instructions, use stack-based argument-passing conventions
  26. # zdp allows DS register to "peg" it to DGROUP
  27. # zq "quiet" mode
  28. # NLM produce Netware Loadable Module
  29. # DEBUG include debug info
  30. CC = wcc386
  31. # COMPILE = wcc386 -zq -d2 -3s -zdp -w4 -DNLM
  32. # COMPILE = wcc386 -zq -d2 -5s -zdp -w4 -DNLM $(LOCAL_UNZIP)
  33. COMPILE = $(CC) -zq -olax -5s -zp1 -ei -ez -ri -w4 -DNLM -DN_PLAT_NLM -U_WIN32 $(LOCAL_UNZIP)
  34. LINK = wlink
  35. DESTDIR = target
  36. # All .obj files implicitly depend on .c files
  37. .c.obj :
  38. @echo Compiling $[*.c
  39. @$COMPILE $[*.c
  40. UNZIP_H = unzip.h unzpriv.h globals.h netware/nlmcfg.h
  41. crc32.obj: crc32.c $(UNZIP_H) zip.h crc32.h
  42. crypt.obj: crypt.c $(UNZIP_H) crc32.h crypt.h ttyio.h zip.h
  43. envargs.obj: envargs.c $(UNZIP_H)
  44. explode.obj: explode.c $(UNZIP_H)
  45. extract.obj: extract.c $(UNZIP_H) crc32.h crypt.h
  46. fileio.obj: fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
  47. globals.obj: globals.c $(UNZIP_H)
  48. inflate.obj: inflate.c inflate.h $(UNZIP_H)
  49. list.obj: list.c $(UNZIP_H)
  50. match.obj: match.c $(UNZIP_H)
  51. process.obj: process.c $(UNZIP_H) crc32.h
  52. ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h
  53. unreduce.obj: unreduce.c $(UNZIP_H)
  54. unshrink.obj: unshrink.c $(UNZIP_H)
  55. unzip.obj: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
  56. zipinfo.obj: zipinfo.c $(UNZIP_H)
  57. # individual dependencies and action rules:
  58. #crc_i86.obj: msdos\crc_i86.asm
  59. # $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos\crc_i86.asm, $@;
  60. netware.obj: netware/netware.c $(UNZIP_H)
  61. $(CC) -c -A$(UNMODEL) $(CFLAGS) netware/netware.c
  62. OBJ01 = unzip.obj
  63. OBJ02 = crc32.obj
  64. OBJ03 = crypt.obj
  65. OBJ04 = envargs.obj
  66. OBJ05 = explode.obj
  67. OBJ06 = extract.obj
  68. OBJ07 = fileio.obj
  69. OBJ08 = globals.obj
  70. OBJ09 = inflate.obj
  71. OBJ10 = list.obj
  72. OBJ11 = match.obj
  73. OBJ12 = process.obj
  74. OBJ13 = ttyio.obj
  75. OBJ14 = unreduce.obj
  76. OBJ15 = unshrink.obj
  77. OBJ16 = zipinfo.obj
  78. OBJ17 = netware.obj
  79. #OBJ18 = $(ASMOBJS)
  80. OBJS = $OBJFILE $OBJ01 $OBJ02 $OBJ03 $OBJ04 $OBJ05 $OBJ06 $OBJ07 $OBJ08 \
  81. $OBJ09 $OBJ10 $OBJ11 $OBJ12 $OBJ13 $OBJ14 $OBJ15 $OBJ16 $OBJ17
  82. # if .obj or .lnk files are modified, link new .nlm and maybe copy to DESTDIR
  83. $NLMNAME.nlm : $OBJS
  84. @echo Linking...
  85. @$LINK @$NLMNAME
  86. # @echo Copying $[*.nlm to $DESTDIR
  87. # @copy $NLMNAME.nlm $DESTDIR
  88. # if makefile is modified, create new linker option file
  89. $NLMNAME.lnk : $NLMNAME.mak
  90. @echo FORMAT NOVELL NLM '$DESCRIPTION' >$NLMNAME.lnk
  91. @echo OPTION THREADNAME '$NLMNAME' >>$NLMNAME.lnk
  92. @echo OPTION SCREENNAME '$SCREENNAME' >>$NLMNAME.lnk
  93. @echo NAME $NLMNAME >>$NLMNAME.lnk
  94. @echo OPTION VERSION=$VERSION >>$NLMNAME.lnk
  95. @echo OPTION COPYRIGHT '$COPYRIGHT' >>$NLMNAME.lnk
  96. @echo DEBUG NOVELL >>$NLMNAME.lnk
  97. @echo DEBUG ALL >>$NLMNAME.lnk
  98. @echo OPTION NODEFAULTLIBS >>$NLMNAME.lnk
  99. @echo OPTION DOSSEG >>$NLMNAME.lnk
  100. @echo OPTION STACK=40000 >>$NLMNAME.lnk
  101. @echo OPTION CASEEXACT >>$NLMNAME.lnk
  102. @echo OPTION PSEUDOPREEMPTION >>$NLMNAME.lnk
  103. @echo OPTION MAP >>$NLMNAME.lnk
  104. @echo FILE $PRELUDE >>$NLMNAME.lnk
  105. @echo FILE $OBJFILE >>$NLMNAME.lnk
  106. @echo FILE $OBJ01 >>$NLMNAME.lnk
  107. @echo FILE $OBJ02 >>$NLMNAME.lnk
  108. @echo FILE $OBJ03 >>$NLMNAME.lnk
  109. @echo FILE $OBJ04 >>$NLMNAME.lnk
  110. @echo FILE $OBJ05 >>$NLMNAME.lnk
  111. @echo FILE $OBJ06 >>$NLMNAME.lnk
  112. @echo FILE $OBJ07 >>$NLMNAME.lnk
  113. @echo FILE $OBJ08 >>$NLMNAME.lnk
  114. @echo FILE $OBJ09 >>$NLMNAME.lnk
  115. @echo FILE $OBJ10 >>$NLMNAME.lnk
  116. @echo FILE $OBJ11 >>$NLMNAME.lnk
  117. @echo FILE $OBJ12 >>$NLMNAME.lnk
  118. @echo FILE $OBJ13 >>$NLMNAME.lnk
  119. @echo FILE $OBJ14 >>$NLMNAME.lnk
  120. @echo FILE $OBJ15 >>$NLMNAME.lnk
  121. @echo FILE $OBJ16 >>$NLMNAME.lnk
  122. @echo FILE $OBJ17 >>$NLMNAME.lnk
  123. @echo MODULE clib >>$NLMNAME.lnk
  124. @echo IMPORT @$CLIBIMP >>$NLMNAME.lnk