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