home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / detex27.zip / makefile.os2 < prev    next >
Makefile  |  2002-01-12  |  2KB  |  97 lines

  1. # Makefile for "detex" (tested with dmake 3.8)                 22 July 1993
  2. #
  3. # - for GNU gcc (emx 0.8g kit) under OS/2 (32-bit)
  4. # - for Microsoft C 6.00 under OS/2 or MSDOS (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 Enter "$(MAKE) -f makefile.os2 emxbnd"
  12.     @echo    or "$(MAKE) -f makefile.os2 msc"
  13.     @echo    or "$(MAKE) -f makefile.os2 mscbnd"
  14.  
  15. # See the original Makefile for a complete list of options.
  16. #
  17. # Add -DMAXPATHLEN=<length> if it is not defined in /usr/include/sys/param.h
  18. #
  19. #MAXPATHLEN = -DMAXPATHLEN=1024
  20. #
  21. # Add -DNO_MALLOC_DECL if your system does not like the malloc() declaration
  22. # in detex.l (reported by pinard@iro.umontreal.ca)
  23. #
  24. NO_MALLOC_DECL = -DNO_MALLOC_DECL
  25. #
  26.  
  27. emx:
  28.     $(MAKE) -f makefile.os2 all \
  29.     CC="gcc -Zomf -Zmtd" O=".obj" \
  30.     CF="" \
  31.     LDFLAGS="" \
  32.     LDFLAGS2="" \
  33.     DEF="detex-32.def"
  34.  
  35. emxbnd:
  36.     $(MAKE) -f makefile.os2 all \
  37.     CC="gcc" O=".o" \
  38.     CF="" \
  39.     LDFLAGS="" \
  40.     LDFLAGS2="" \
  41.     DEF="detex-32.def"
  42.  
  43. msc:
  44.     $(MAKE) -f makefile.os2 all \
  45.     CC="cl -AS " O=".obj" \
  46.     CF="-D__STDC__ -DMAXPATHLEN=1024" \
  47.     LDFLAGS="-Lp" \
  48.     LDFLAGS2="setargv.obj -link /NOE" \
  49.     DEF="detex.def"
  50.  
  51. mscbnd:
  52.     $(MAKE) -f makefile.os2 all \
  53.     CC="cl -AS " O=".obj" \
  54.     CF="-D__STDC__ -DMAXPATHLEN=1024" \
  55.     LDFLAGS="-Lp -Fb" \
  56.     LDFLAGS2="setargv.obj -link /NOE" \
  57.     DEF="detex.def"
  58.  
  59.  
  60. CFLAGS = $(CF) -DOS2 -DHAVE_STRING_H $(NO_MALLOC_DECL) -DNOFILE=99
  61.  
  62. .c$O :
  63.     $(CC) $(CFLAGS) -c $<
  64.  
  65. all : detex.exe
  66.  
  67. detex.exe : detex$O $(DEF)
  68.         $(CC) $(LDFLAGS) -o $@ $< $(LDFLAGS2)
  69.  
  70.  
  71. # Use your favorite lexical scanner
  72. #
  73. # flex buffered input causes problems--see flexdoc.man.
  74. LEX    = lex
  75. LEX_YY = lex.yy
  76. #LEX    = flex
  77. #LEX_YY = lexyy
  78.  
  79. #LFLAGS    = -8 -C
  80.  
  81. CP = cp
  82. FMT_CMD = groff -man
  83.  
  84. # lexout.c obtained from lex output on sparc. 
  85.  
  86. #detex.c:
  87. #    sed -f states.sed detex.l | ${LEX} ${LFLAGS}
  88. #    mv $(LEX_YY).c detex.c
  89.  
  90. detex.c : lexout.c
  91.     $(CP) $< $@
  92.  
  93. man-page:
  94.     $(FMT_CMD) detex.1l
  95.  
  96. detex$O : detex.h
  97.