xref: /titanic_44/usr/src/cmd/eqn/neqn.d/Makefile (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
1#
2# ident	"%Z%%M%	%I%	%E% SMI"
3#
4# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
5# Use is subject to license terms.
6#
7# cmd/eqn/neqn.d/Makefile
8#
9
10include		../../Makefile.cmd
11
12PROG =		neqn
13
14CSRCS =		diacrit.c eqnbox.c font.c fromto.c funny.c	\
15		glob.c integral.c io.c lex.c lookup.c		\
16		mark.c matrix.c move.c over.c paren.c		\
17		pile.c shift.c size.c sqrt.c text.c
18
19SRCS =		$(CSRCS:%=../%)
20
21YACCSRC =	e.y
22
23COBJS =		$(CSRCS:%.c=%.o)
24OBJS =		$(YACCSRC:%.y=%.o) $(COBJS)
25
26
27CLEANFILES =	y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
28
29YFLAGS =	-d
30CPPFLAGS =	-DNEQN -I. -I.. $(CPPFLAGS.master)
31LDFLAGS +=	$(MAPFILE.NGB:%=-M%)
32
33#
34# for message catalog
35#
36POFILE= neqn.d.po
37POFILES= e.po
38
39.KEEP_STATE:
40
41all :		$(PROG)
42
43$(PROG) :	$(OBJS) $(MAPFILE.NGB)
44		$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
45		$(POST_PROCESS)
46
47catalog:        $(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
62install :	all $(ROOTPROG)
63
64clean:
65		$(RM) $(OBJS) $(CLEANFILES)
66
67lint:		lint_SRCS
68
69strip :
70		$(STRIP) $(PROG)
71
72include		../../Makefile.targ
73