home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / shar349.zip / os2 / makefile.os2 next >
Makefile  |  1993-05-11  |  1KB  |  61 lines

  1. # Makefile for shar 3.49 (tested with dmake 3.8)                   8 May 1993
  2. #
  3. # - for GNU gcc (emx kit) under OS/2 2.0 (32-bit)
  4. # - for Microsoft C 6.00 under OS/2 (16-bit)
  5.  
  6. # To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
  7. # name being "makefile.os2").
  8.  
  9. default:
  10.     @echo Enter "$(MAKE) -f makefile.os2 emx"
  11.     @echo    or "$(MAKE) -f makefile.os2 msc"
  12.  
  13. emx:
  14.     $(MAKE) -f makefile.os2 all \
  15.     CC="gcc -Zomf -Zmt" O=".obj" \
  16.     CFLAGS="-DUSE_GNU_GETOPT -DOS2 -DEMX" \
  17.     LDFLAGS="" \
  18.     LDFLAGS2="shar-emx.def" \
  19.     OBJS2="" 
  20.  
  21. msc:
  22.     $(MAKE) -f makefile.os2 all \
  23.     CC="cl -AS -W3" O=".obj" \
  24.     CFLAGS="-D__STDC__ -DUSE_GNU_GETOPT -DOS2 -DMSC -UMSDOS" \
  25.     LDFLAGS="-Lp -AS -F 4000" \
  26.     LDFLAGS2="setargv.obj shar.def -link /NOE" \
  27.     OBJS2="getopt.obj" \
  28.     OBJS3="director.obj" 
  29.  
  30. BINDIR = /bin
  31.  
  32. VERSION = 3.49
  33. INSTALL = cp -v
  34.  
  35. CMDS    = shar.exe unshar.exe
  36. SRCS    = uushar.c unshar.c shar.c
  37.  
  38. all: $(CMDS)
  39.  
  40. .c$O:
  41.     $(CC) $(CFLAGS) -c $<
  42.  
  43. # director.c from Stewartson's sh; needed for MSC version only
  44. director$O : director.c
  45.     $(CC) $(CFLAGS) -DMSDOS -c $<
  46.  
  47. unshar.exe : unshar$O $(OBJS2)
  48.     $(CC) $(LDFLAGS) -o $@ $< $(LDFLAGS2)
  49.  
  50. shar.exe : shar$O $(OBJS2) $(OBJS3)
  51.     $(CC) $(LDFLAGS) -o $@ $< $(LDFLAGS2)
  52.  
  53. install: $(CMDS)
  54.     $(INSTALL) $(CMDS) $(BINDIR)
  55.  
  56. tags: $(SRCS)
  57.     etags $^
  58.  
  59. clean:
  60.     rm -f *$O *.tar
  61.