home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / cbase103 / cbddl / makefile < prev    next >
Encoding:
Makefile  |  1991-09-23  |  1.3 KB  |  64 lines

  1. #    Copyright (c) 1989 Citadel
  2. #       All Rights Reserved
  3.  
  4. # makefile    1.6 - 91/09/23
  5.  
  6. # cbase utility makefile
  7.  
  8. CC    = cc#        # C compiler
  9. CFLAGS    = -O -Dhuge=#    # C compiler options (-Dhuge= removes DOS huge keyword)
  10. LEX    = lex#        # lex compiler
  11. LFLAGS    = -cn#        # lex options
  12. YACC    = yacc#        # yacc compiler
  13. YFLAGS    = -d#        # yacc options
  14. BINDIR    = /usr/bin#    # directory to install compiled cbase utilities
  15. LIBS    = -ly -ll#    # libraries
  16. LINT    = lint -b -p#    # lint command and options
  17. MAN    = cbddlp.man#    # manual file    
  18.  
  19. FILES =    makefile   cbddlp.y   cbddlpl.l  cvtss.c
  20. SRCS  =    cbddlp.y   cbddlpl.l  cvtss.c
  21. CSRCS =    cbddlp.c   cbddlpl.c  cvtss.c
  22. OBJS  =    $(CSRCS:.c=.o)
  23. MANS  =    cbddlp.y
  24.  
  25. # suffix rules
  26. .SUFFIXES:      .ddl .h .i
  27.  
  28. .ddl.h:
  29.     cbddlp $<
  30.  
  31. .ddl.i:
  32.     cbddlp $<
  33.  
  34. # explicit rules
  35. cbddlp:    $(OBJS)
  36.     cc $(CFLAGS) $(OBJS) $(LIBS) -o cbddlp
  37.  
  38. cbddlp.o:    cbddlp.h
  39.  
  40. cbddlpl.o:    cbddlp.h y.tab.h
  41.  
  42. install:
  43.     @if test -s $(BINDIR)/cbddlp = 0;            \
  44.     then                            \
  45.         echo $(BINDIR)/cbddlp exists\.;            \
  46.         echo -n "Do you wish to copy over it? ";    \
  47.         read response;                    \
  48.         case $$response in                \
  49.         y | Y | yes | YES | Yes)    ;;        \
  50.         *) exit 1            ;;        \
  51.         esac                        \
  52.     fi;                            \
  53.     cp cbddlp $(BINDIR)
  54.     @echo cbddlp installed.
  55.  
  56. lint:
  57.     make $(CSRCS)
  58.     $(LINT) $(CSRCS)
  59.  
  60. man:    $(MAN)
  61.  
  62. $(MAN):    $(MANS)
  63.     cat $(MANS) | manx > $@
  64.