home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / text / troff / dos / refer / djgpp.mak < prev   
Encoding:
Makefile  |  1992-04-17  |  5.3 KB  |  173 lines

  1. #Copyright (C) 1991 Free Software Foundation, Inc.
  2. #     Written by James Clark (jjc@jclark.uucp)
  3. #
  4. #This file is part of groff.
  5. #
  6. #groff is free software; you can redistribute it and/or modify it under
  7. #the terms of the GNU General Public License as published by the Free
  8. #Software Foundation; either version 1, or (at your option) any later
  9. #version.
  10. #
  11. #groff is distributed in the hope that it will be useful, but WITHOUT ANY
  12. #WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. #FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. #for more details.
  15. #
  16. #You should have received a copy of the GNU General Public License along
  17. #with groff; see the file LICENSE.  If not, write to the Free Software
  18. #Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # BINDIR says where to install the executables.
  21. BINDIR=/usr/local/bin
  22. # CC is the C++ compiler.
  23. CC=gcc -x c++
  24. # OLDCC is the C compiler.
  25. OLDCC=gcc -x c
  26. STRIP=strip
  27. AOUT2EXE=aout2exe
  28. # Suffix to be used for index files.
  29. INDEX_SUFFIX=.i
  30. # Directory containing the default index.
  31. DEFAULT_INDEX_DIR=/usr/dict/papers
  32. # The filename (without suffix) of the default index.
  33. DEFAULT_INDEX_NAME=Ind
  34. # COMMON_WORDS_FILE is a file containing a list of common words.
  35. # If your system provides /usr/lib/eign it will be copied onto this,
  36. # otherwise the supplied eign file will be used.
  37. COMMON_WORDS_FILE=/usr/local/lib/groff/eign
  38. # Uncomment this if the POSIX pathconf() function is missing.
  39. PATHCONF_MISSING=-DPATHCONF_MISSING
  40.  
  41. CFLAGS=-O2 -Wall #-DHAVE_MMAP -DHAVE_RENAME -DPATHCONF_MISSING
  42. LDFLAGS=-x none
  43. INCLUDES=-I../lib
  44. OLDCFLAGS=-O2
  45. LIBS=
  46. MLIBS=$(LIBS) -lm
  47. # YACC can be either yacc or bison -y
  48. YACC=bison -y
  49. YACCFLAGS=-v
  50. ETAGS=etags
  51. ETAGSFLAGS=-p
  52.  
  53. PROGS=refer.exe lookbib.exe indxbib.exe lkbib.exe
  54.  
  55. INDXBIB_OBJECTS=indxbib.o common.o dirnamem.o ../lib/libgroff.a
  56. LOOKBIB_OBJECTS=lookbib.o search.o linear.o index.o common.o \
  57.     ../lib/libgroff.a
  58. REFER_OBJECTS=refer.o ref.o token.o search.o linear.o index.o \
  59.     label_ta.o command.o common.o ../lib/libgroff.a
  60. LKBIB_OBJECTS=lkbib.o search.o linear.o index.o common.o ../lib/libgroff.a
  61.  
  62. .c.o:
  63.     $(CC) -c $(INCLUDES) $(CFLAGS) $<
  64.  
  65. all: $(PROGS)
  66.  
  67. refer.exe: refer
  68.     $(STRIP) $<
  69.     $(AOUT2EXE) $<
  70.  
  71. refer: $(REFER_OBJECTS)
  72.     $(CC) $(LDFLAGS) -o $@ $(REFER_OBJECTS) $(MLIBS)
  73.  
  74. indxbib.exe: indxbib
  75.     $(STRIP) $<
  76.     $(AOUT2EXE) $<
  77.  
  78. indxbib: $(INDXBIB_OBJECTS)
  79.     $(CC) $(LDFLAGS) -o $@ $(INDXBIB_OBJECTS) $(MLIBS)
  80.  
  81. lookbib.exe: lookbib
  82.     $(STRIP) $<
  83.     $(AOUT2EXE) $<
  84.  
  85. lookbib: $(LOOKBIB_OBJECTS)
  86.     $(CC) $(LDFLAGS) -o $@ $(LOOKBIB_OBJECTS) $(MLIBS)
  87.  
  88. lkbib.exe: lkbib
  89.     $(STRIP) $<
  90.     $(AOUT2EXE) $<
  91.  
  92. lkbib: $(LKBIB_OBJECTS)
  93.     $(CC) $(LDFLAGS) -o $@ $(LKBIB_OBJECTS) $(MLIBS)
  94.  
  95. label_ta.c: label.y
  96.     $(YACC) $(YACCFLAGS) label.y
  97.     mv y_tab.c label_ta.c
  98.  
  99. dirnamem.o: dirnamem.c
  100.     $(OLDCC) $(OLDCFLAGS) -c -DHAVE_LIMITS_H -DHAVE_DIRENT_H $(PATHCONF_MISSING) dirnamem.c
  101.  
  102. #suffix.h: FORCE
  103. #    @$(SHELL) ../gendef $@ "INDEX_SUFFIX=\"$(INDEX_SUFFIX)\""
  104.  
  105. #path.h: FORCE
  106. #    @$(SHELL) ../gendef $@ \
  107. #    "COMMON_WORDS_FILE=\"$(COMMON_WORDS_FILE)\"" \
  108. #    "DEFAULT_INDEX_DIR=\"$(DEFAULT_INDEX_DIR)\"" \
  109. #    "DEFAULT_INDEX_NAME \"$(DEFAULT_INDEX_NAME)\""
  110.  
  111. index.o: refid.h search.h index.h suffix.h ../lib/lib.h ../lib/cset.h \
  112.     ../lib/cmap.h ../lib/errarg.h ../lib/error.h
  113. indxbib.o: refer.h path.h index.h suffix.h \
  114.     ../lib/errarg.h ../lib/error.h ../lib/cset.h ../lib/cmap.h \
  115.     ../lib/stringcl.h ../lib/lib.h
  116. linear.o: refid.h search.h ../lib/lib.h ../lib/errarg.h \
  117.     ../lib/error.h ../lib/cset.h ../lib/cmap.h
  118. lookbib.o: refid.h search.h ../lib/errarg.h ../lib/error.h \
  119.     ../lib/lib.h ../lib/cset.h
  120. ref.o: refer.h path.h refid.h ref.h token.h ../lib/errarg.h \
  121.     ../lib/error.h ../lib/lib.h ../lib/stringcl.h \
  122.     ../lib/cset.h ../lib/cmap.h
  123. refer.o: refer.h path.h refid.h ref.h token.h search.h command.h \
  124.     ../lib/errarg.h ../lib/error.h ../lib/lib.h \
  125.     ../lib/stringcl.h ../lib/cset.h ../lib/cmap.h
  126. command.o: refer.h path.h command.h refid.h search.h ../lib/lib.h \
  127.     ../lib/cset.h ../lib/cmap.h ../lib/errarg.h ../lib/error.h
  128. search.o: refid.h search.h ../lib/lib.h ../lib/errarg.h \
  129.     ../lib/error.h
  130. token.o: refer.h path.h token.h ../lib/errarg.h ../lib/error.h \
  131.     ../lib/lib.h ../lib/stringcl.h ../lib/cset.h \
  132.     ../lib/cmap.h
  133. label_ta.o: refer.h path.h refid.h ref.h token.h \
  134.     ../lib/errarg.h ../lib/error.h ../lib/lib.h \
  135.     ../lib/stringcl.h ../lib/cset.h ../lib/cmap.h
  136. lkbib.o: refer.h path.h refid.h search.h ../lib/errarg.h ../lib/error.h \
  137.     ../lib/lib.h ../lib/cset.h ../lib/cmap.h \
  138.     ../lib/stringcl.h 
  139.  
  140. clean:
  141.     -rm -f *.o $(PROGS) core a.out *.n gmon.out path.h suffix.h y.output
  142.  
  143. distclean: clean
  144.     -rm -f TAGS
  145.  
  146. realclean: distclean
  147.     -rm -f label_ta.c
  148.     
  149. #install.bin: $(PROGS)
  150. #    -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  151. #    -rm -f $(BINDIR)/grefer
  152. #    cp refer $(BINDIR)/grefer
  153. #    -rm -f $(BINDIR)/gindxbib
  154. #    cp indxbib $(BINDIR)/gindxbib
  155. #    -rm -f $(BINDIR)/glookbib
  156. #    cp lookbib $(BINDIR)/glookbib
  157. #    -rm -f $(BINDIR)/lkbib
  158. #    cp lkbib $(BINDIR)/lkbib
  159.  
  160.  
  161. install.nobin:
  162. #    @if [ -f /usr/lib/eign ]; \
  163. #    then echo cp /usr/lib/eign $(COMMON_WORDS_FILE); \
  164. #    rm -f $(COMMON_WORDS_FILE); \
  165. #    cp /usr/lib/eign $(COMMON_WORDS_FILE); \
  166. #    else echo cp eign $(COMMON_WORDS_FILE); \
  167. #    rm -f $(COMMON_WORDS_FILE); \
  168. #    cp eign $(COMMON_WORDS_FILE); fi
  169.  
  170. install: install.bin install.nobin
  171.  
  172. #FORCE:
  173.