xref: /illumos-gate/usr/src/cmd/eqn/eqn.d/Makefile (revision 3d393ee6c37fa10ac512ed6d36109ad616dc7c1a)
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/eqn.d/Makefile
8#
9
10include		../../Makefile.cmd
11
12PROG =		eqn
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#
27# for message catalog
28#
29POFILE= eqn.d.po
30POFILES= $(SRCS:%.c=%.po) e.po
31
32CLEANFILES =	y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
33
34YFLAGS =	-d
35CPPFLAGS =	-I. -I.. $(CPPFLAGS.master)
36LDFLAGS +=	$(MAPFILE.NGB:%=-M%)
37
38.KEEP_STATE:
39
40all :		$(PROG)
41
42catalog:        $(POFILE)
43
44$(POFILE):      e.def $(POFILES)
45	$(RM)	$@
46	cat     $(POFILES)      > $@
47
48$(PROG) :	$(OBJS) $(MAPFILE.NGB)
49		$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
50		$(POST_PROCESS)
51
52$(YACCSRC:%.y=%.c) + $(YACCSRC:%.y=%.def) : ../$(YACCSRC)
53		$(YACC.y) ../$(YACCSRC)
54		$(MV) y.tab.c $(YACCSRC:%.y=%.c)
55		$(MV) y.tab.h $(YACCSRC:%.y=%.def)
56
57$(COBJS) :	$$(@:%.o=../%.c)
58		$(COMPILE.c) ../$(@:%.o=%.c)
59
60install :	all $(ROOTPROG)
61
62clean:
63		$(RM) $(OBJS) $(CLEANFILES)
64
65lint:		lint_SRCS
66
67strip :
68		$(STRIP) $(PROG)
69
70include		../../Makefile.targ
71