home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / UNZP50P1.ZIP / OS2 / makefile.os2 < prev    next >
Makefile  |  1993-01-23  |  4KB  |  143 lines

  1. # Makefile for UnZip, ZipInfo and Ship                       12 August 1992
  2. #
  3. # - for Microsoft C 6.00 under OS/2 1.x (16-bit)
  4. # - for IBM C Set/2 under OS/2 2.0 (32-bit)
  5. # - for Watcom C/386 9.0 under OS/2 2.0 (32-bit)
  6. # - for GNU gcc (emx kit) under OS/2 2.0 (32-bit)
  7.  
  8. # To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
  9. # name being "makefile.os2").
  10.  
  11. # Notes on Microsoft C 6.00 compilation:
  12. #   The resulting programs can be used under OS/2 1.x or 2.x
  13. #   protected mode only, not under DOS.  A larger stack has to
  14. #   be used for OS/2 because system calls use more stack than
  15. #   under DOS; 8k is recommended by Microsoft.
  16.  
  17. # Notes on IBM C Set/2, Watcom C/386 or gcc compilation:
  18. #   The resulting programs can be used under OS/2 protected
  19. #   mode of OS/2 2.0 only, not under 1.x and not under DOS.
  20.  
  21. CRYPTF =
  22. CRYPTO =
  23. # *** For decryption version, remove the # at the front of next 2 lines ***
  24. # CRYPTF = -DCRYPT
  25. # CRYPTO = crypt$(OBJ)
  26.  
  27. default:
  28.     @echo Enter "$(MAKE) -f makefile.os2 msc"
  29.     @echo    or "$(MAKE) -f makefile.os2 ibm"
  30.     @echo    or "$(MAKE) -f makefile.os2 watcom"
  31.     @echo    or "$(MAKE) -f makefile.os2 gcc"
  32.  
  33. mscdos:
  34.     $(MAKE) -f makefile.os2 unzips \
  35.     CC="cl -nologo -AC -Oaict -Gs" \
  36.     CFLAGS="-Zp1 $(CRYPTF)" \
  37.     LDFLAGS="-Lr -F 1000 -Fe" \
  38.     LDFLAGS2="" \
  39.     OUT="-Fo" \
  40.     OBJ=".obj" \
  41.     OBJO=""
  42.  
  43. msc:
  44.     $(MAKE) -f makefile.os2 unzips \
  45.     CC="cl -nologo -AC -Ocegit -Gs" \
  46.     CFLAGS="-G2 -Zp1 $(CRYPTF) -DOS2 -DMSC" \
  47.     LDFLAGS="-Lp -F 2000 -Fe" \
  48.     LDFLAGS2="" \
  49.     OUT="-Fo" \
  50.     OBJ=".obj" \
  51.     DEF=unzip.def DEFI=zipinfo.def DEFS=ship.def
  52.  
  53. ibm:
  54.     $(MAKE) -f makefile.os2 unzips \
  55.     CC="icc -Q -O -Gs" \
  56.     CFLAGS="-Sm -Sp1 $(CRYPTF) -DOS2" \
  57.     LDFLAGS="-B/ST:131072 -Fe" \
  58.     LDFLAGS2="" \
  59.     OUT="-Fo" \
  60.     OBJ=".obj" \
  61.     DEF=unzip.def DEFI=zipinfo.def DEFS=ship.def
  62.  
  63. watcom:
  64.     $(MAKE) -f makefile.os2 unzips \
  65.     CC="wcl386 -zq -Ox -s" \
  66.     CFLAGS="-Zp1 $(CRYPTF) -DOS2" \
  67.     LDFLAGS="-k131072 -x -Fe=" \
  68.     LDFLAGS2="" \
  69.     OUT="-Fo" \
  70.     OBJ=".obj"
  71.  
  72. gcc:
  73.     $(MAKE) -f makefile.os2 unzips \
  74.     CC="gcc -O -s" \
  75.     CFLAGS="$(CRYPTF) -DOS2 -Uunix" \
  76.     LDFLAGS="-o " \
  77.     LDFLAGS2="-los2" \
  78.     OUT="-o" \
  79.     OBJ=".o"
  80.  
  81. # variables
  82. OBJ1 = unzip$(OBJ) envargs$(OBJ) extract$(OBJ) misc$(OBJ) $(CRYPTO)
  83. OBJ2 = file_io$(OBJ) mapname$(OBJ) match$(OBJ)
  84. OBJ3 = inflate$(OBJ) explode$(OBJ) unreduce$(OBJ) unshrink$(OBJ)
  85. OBJO = os2unzip$(OBJ)
  86. OBJI = zipinfo$(OBJ) envargs$(OBJ) match$(OBJ) misc_$(OBJ) os2zinfo$(OBJ)
  87.  
  88. unzips:    unzip.exe zipinfo.exe
  89.  
  90. crypt$(OBJ):    crypt.c unzip.h zip.h
  91.     $(CC) -c $(CFLAGS) $*.c
  92.  
  93. envargs$(OBJ):    envargs.c unzip.h
  94.     $(CC) -c $(CFLAGS) $*.c
  95.  
  96. explode$(OBJ):    explode.c unzip.h
  97.     $(CC) -c $(CFLAGS) $*.c
  98.  
  99. extract$(OBJ):    extract.c unzip.h
  100.     $(CC) -c $(CFLAGS) $*.c
  101.  
  102. file_io$(OBJ):    file_io.c unzip.h
  103.     $(CC) -c $(CFLAGS) $*.c
  104.  
  105. inflate$(OBJ):    inflate.c unzip.h
  106.     $(CC) -c $(CFLAGS) $*.c
  107.  
  108. mapname$(OBJ):    mapname.c unzip.h
  109.     $(CC) -c $(CFLAGS) $*.c
  110.  
  111. match$(OBJ):    match.c unzip.h
  112.     $(CC) -c $(CFLAGS) $*.c
  113.  
  114. misc$(OBJ):    misc.c unzip.h
  115.     $(CC) -c $(CFLAGS) $*.c
  116.  
  117. misc_$(OBJ):    misc.c unzip.h
  118.     $(CC) -c $(CFLAGS) -DZIPINFO $(OUT)$@ misc.c
  119.  
  120. os2unzip$(OBJ): os2unzip.c unzip.h
  121.     $(CC) -c $(CFLAGS) $*.c
  122.  
  123. os2zinfo$(OBJ):    os2unzip.c unzip.h
  124.     $(CC) -c $(CFLAGS) -DZIPINFO $(OUT)$@ os2unzip.c
  125.  
  126. unreduce$(OBJ):    unreduce.c unzip.h
  127.     $(CC) -c $(CFLAGS) $*.c
  128.  
  129. unshrink$(OBJ):    unshrink.c unzip.h
  130.     $(CC) -c $(CFLAGS) $*.c
  131.  
  132. unzip$(OBJ):    unzip.c unzip.h
  133.     $(CC) -c $(CFLAGS) $*.c
  134.  
  135. zipinfo$(OBJ):    zipinfo.c unzip.h
  136.     $(CC) -c $(CFLAGS) $*.c
  137.  
  138. unzip.exe: $(OBJ1) $(OBJ2) $(OBJ3) $(OBJO) $(DEF)
  139.     $(CC) $(LDFLAGS)$@ $(DEF) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJO) $(LDFLAGS2)
  140.  
  141. zipinfo.exe: $(OBJI) $(DEFI)
  142.     $(CC) $(LDFLAGS)$@ $(DEFI) $(OBJI) $(LDFLAGS2)
  143.