home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / cawf407.zip / src / makefile.os2 < prev    next >
Makefile  |  1993-12-28  |  2KB  |  79 lines

  1. # Makefile for cawf
  2. #
  3. # - for GNU gcc (emx 0.8g kit) [executables for OS/2 2.x or DOS (32-bit)]
  4. # - for Microsoft C 6.00A      [executables for OS/2 or MSDOS (16-bit)]
  5.  
  6. # To use, enter "make -f Makefile.os2" (this makefile depends on its
  7. # name being "Makefile.os2").
  8. #
  9. # Tested with dmake 3.8 and GNU make 3.68 under OS/2
  10.  
  11. default:
  12.     @echo "Enter $(MAKE) -f Makefile.os2 target                      "
  13.     @echo " where 'target' is chosen from                          " 
  14.     @echo "   msc      OS/2 exe [Microsoft C 6.00a]                "
  15.     @echo "   mscbnd   OS/2 and DOS exe [Microsoft C 6.00a]        "
  16.     @echo "   emx      OS/2 32-bit exe [EMX/gcc; uses emxlibc.dll] "
  17.     @echo "   emxbnd   OS/2 and DOS 32-bit exe [EMX/gcc]           "
  18.  
  19.  
  20. msc: 
  21.     $(MAKE) -f Makefile.os2 all \
  22.     CC="cl -nologo -AS" O=".obj" \
  23.     CFLAGS="-Za" \
  24.     OBJ2="getopt.obj" \
  25.     LFLAGS="-Lp setargv.obj -link /NOE" \
  26.     BIT=""
  27.  
  28. mscbnd: 
  29.     $(MAKE) -f Makefile.os2 all \
  30.     CC="cl -nologo -AS" O=".obj" \
  31.     CFLAGS="-Za" \
  32.     OBJ2="getopt.obj" \
  33.     LFLAGS="-Lp -Fb setargv.obj -link /NOE" \
  34.     BIT=""
  35.  
  36. emx:  
  37.     $(MAKE) -f Makefile.os2 all \
  38.     CC="gcc -Zomf -Zmtd" O=".obj" \
  39.     CFLAGS="-O" \
  40.     OBJ2="" \
  41.     LFLAGS="-s" \
  42.     BIT="32"
  43.     
  44. emxbnd:  
  45.     $(MAKE) -f Makefile.os2 all \
  46.     CC="gcc" O=".o" \
  47.     CFLAGS="-O" \
  48.     OBJ2="" \
  49.     LFLAGS="-s" \
  50.     BIT="32"
  51.  
  52.  
  53. DEFS = -DSTDLIB -DCAWFLIB=\"c:/bin/cawf\"
  54.  
  55. .c$O: 
  56.     $(CC) $(CFLAGS) $(DEFS) -c $<
  57.  
  58. HDR = ansi.h cawf.h cawflib.h proto.h regexp.h regmagic.h
  59.  
  60. SRC = cawf.c device.c error.c expand.c expr.c getopt.c macsup.c nreq.c \
  61.       output.c pass2.c pass3.c  regerror.c regexp.c store.c string.c
  62.  
  63. OBJ = cawf$O device$O error$O expand$O expr$O macsup$O nreq$O \
  64.       output$O pass2$O pass3$O  regerror$O regexp$O store$O string$O $(OBJ2)
  65.  
  66. all:    bsfilt.exe cawf.exe
  67.  
  68. bsfilt.exe : bsfilt$O bsfilt$(BIT).def
  69.     ${CC} -o $@ bsfilt$O bsfilt$(BIT).def $(LFLAGS)
  70.  
  71. cawf.exe: ${OBJ} cawf$(BIT).def
  72.     ${CC} -o $@ ${OBJ} cawf$(BIT).def $(LFLAGS)
  73.  
  74. clean:
  75.     rm -f *.o *.obj a.out core *errs bsfilt.exe cawf.exe
  76.  
  77. ${OBJ}:    ${HDR}
  78.  
  79.