Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

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