home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / nroff-driver / Makefile < prev    next >
Encoding:
Makefile  |  1988-01-31  |  2.0 KB  |  84 lines

  1. ###############################################################################
  2. #
  3. #    table (version 2.0) - a utility for creating nroff driver tables.
  4. #
  5. #    Makefile for nroff driver tables under USG UNIX.
  6. #    Written by Bruce Townsend Oct, 1987.
  7. #
  8. #    Copyright (c) 1987 by Bruce Townsend and Bell-Northern Research.
  9. #    Permission is granted to use and distribute, except for profit,
  10. #    providing this copyright notice and the author's name is included.
  11. #    No warranty of any kind is expressed or implied, and no liability of
  12. #    any kind is assumed by either the author or Bell-Northern Research.
  13. #
  14. ###############################################################################
  15.  
  16. ###############################################################################
  17. #    User-Configurable Section
  18. #
  19. SOURCES =    tabljet.c
  20.  
  21. DESTDIR =    /usr/lib/term
  22. # Include the KANJI flag if your nroff supports Kanji characters
  23. # CFLAGS =    -O -DKANJI
  24. CFLAGS =    -O
  25. LDFLAGS =    -s
  26. #
  27. #    End of User-Configurable Section
  28. ###############################################################################
  29.  
  30. TABFILES =    $(SOURCES:.c=.tab)
  31. TABS =        $(SOURCES:.c=)
  32. LINTSRC =    tabXXX.c
  33. SHELL =        /bin/sh
  34.  
  35. .SUFFIXES:    .tab
  36.  
  37. .o.tab:
  38.     cc $(LDFLAGS) table.o $*.o
  39.     ./a.out $@
  40.  
  41. .c.tab:
  42.     cc -c $(CFLAGS) $<
  43.     cc $(LDFLAGS) table.o $*.o
  44.     ./a.out $@
  45.  
  46.  
  47. all:        $(TABFILES)
  48.  
  49. table:        $(TABFILES)
  50.  
  51. $(TABFILES):    table.o
  52.  
  53. $(TABS):    $(TABFILES)
  54.         cp $@.tab $@
  55.  
  56. table.o:    table.c table.h
  57.         cc -c $(CFLAGS) table.c
  58.  
  59. install:    $(TABS)
  60.         cp $(TABS) $(DESTDIR)
  61.         rm $(TABS)
  62.  
  63. lint:        table.c elbat.c structure.c table.h
  64.         lint $(LFLAGS) table.c $(LINTSRC)
  65.         lint $(LFLAGS) elbat.c structure.c
  66.  
  67. elbat:        elbat.o structure.o
  68.             cc $(LDFLAGS) -o elbat elbat.o structure.o
  69.  
  70. structure.c:    table.h
  71.         echo 'char    *structure = "\' > structure.c
  72.         sed -n -e '1,/zzz/s/$$/\\n\\/p' table.h >> structure.c
  73.         echo '";' >> structure.c
  74.  
  75. shar:
  76.         shar -a README Makefile table.5 elbat.c table.c table.h \
  77.             $(SOURCES) > TABLE.shar
  78.  
  79. clean:
  80.         rm -f a.out *.o core structure.c
  81.  
  82. realclean:    clean
  83.         rm -f $(TABFILES) $(TABS) elbat
  84.