xref: /illumos-gate/usr/src/cmd/eqn/neqn.d/Makefile (revision 28b6fd27d5ff75fe6fdeb119a21575b0652a7e70)
1#
2# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5
6include		../../Makefile.cmd
7
8PROG =		neqn
9
10CSRCS =		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
15SRCS =		$(CSRCS:%=../%)
16
17YACCSRC =	e.y
18
19COBJS =		$(CSRCS:%.c=%.o)
20OBJS =		$(YACCSRC:%.y=%.o) $(COBJS)
21
22
23CLEANFILES =	y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
24
25YFLAGS =	-d
26CPPFLAGS =	-DNEQN -I. -I.. $(CPPFLAGS.master)
27LDFLAGS +=	$(MAPFILE.NGB:%=-M%)
28
29CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
30CERRWARN +=	-_gcc=-Wno-uninitialized
31CERRWARN +=	-_gcc=-Wno-unused-label
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