1 #
   2 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #
   5 
   6 include         ../../Makefile.cmd
   7 
   8 PROG =          neqn
   9 
  10 CSRCS =         diacrit.c eqnbox.c font.c fromto.c funny.c      \
  11                 glob.c integral.c io.c lex.c lookup.c           \
  12                 mark.c matrix.c move.c over.c paren.c           \
  13                 pile.c shift.c size.c sqrt.c text.c
  14 
  15 SRCS =          $(CSRCS:%=../%)
  16 
  17 YACCSRC =       e.y
  18 
  19 COBJS =         $(CSRCS:%.c=%.o)
  20 OBJS =          $(YACCSRC:%.y=%.o) $(COBJS)
  21 
  22 
  23 CLEANFILES =    y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
  24 
  25 YFLAGS =        -d
  26 CPPFLAGS =      -DNEQN -I. -I.. $(CPPFLAGS.master)
  27 LDFLAGS +=      $(MAPFILE.NGB:%=-M%)
  28 
  29 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  30 CERRWARN +=     -_gcc=-Wno-uninitialized
  31 CERRWARN +=     -_gcc=-Wno-unused-label
  32 
  33 #
  34 # for message catalog
  35 #
  36 POFILE= neqn.d.po
  37 POFILES= e.po
  38 
  39 .KEEP_STATE:
  40 
  41 all :           $(PROG)
  42 
  43 $(PROG) :       $(OBJS) $(MAPFILE.NGB)
  44                 $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
  45                 $(POST_PROCESS)
  46 
  47 catalog:        $(POFILE)
  48 
  49 $(POFILE):      $(POFILES)
  50          $(RM)  $@
  51          cat     $(POFILES)      > $@
  52 
  53 
  54 $(YACCSRC:%.y=%.c) + $(YACCSRC:%.y=%.def) : ../$(YACCSRC)
  55                 $(YACC.y) ../$(YACCSRC)
  56                 $(MV) y.tab.c $(YACCSRC:%.y=%.c)
  57                 $(MV) y.tab.h $(YACCSRC:%.y=%.def)
  58 
  59 $(COBJS) :      $$(@:%.o=../%.c)
  60                 $(COMPILE.c) ../$(@:%.o=%.c)
  61 
  62 install :       all $(ROOTPROG)
  63 
  64 clean:
  65                 $(RM) $(OBJS) $(CLEANFILES)
  66 
  67 lint:           lint_SRCS
  68 
  69 strip :
  70                 $(STRIP) $(PROG)
  71 
  72 include         ../../Makefile.targ