1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
#
include ../../Makefile.cmd
PROG = eqn
CSRCS = diacrit.c eqnbox.c font.c fromto.c funny.c \
glob.c integral.c io.c lex.c lookup.c \
mark.c matrix.c move.c over.c paren.c \
pile.c shift.c size.c sqrt.c text.c
SRCS = $(CSRCS:%=../%)
YACCSRC = e.y
COBJS = $(CSRCS:%.c=%.o)
OBJS = $(YACCSRC:%.y=%.o) $(COBJS)
#
# for message catalog
#
POFILE= eqn.d.po
POFILES= $(SRCS:%.c=%.po) e.po
CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
YFLAGS = -d
CPPFLAGS = -I. -I.. $(CPPFLAGS.master)
LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -Wno-implicit-function-declaration
CERRWARN += $(CNOWARN_UNINIT)
# Hammerhead: Suppress pointer/int cast warnings in legacy eqn code
CERRWARN += -Wno-pointer-to-int-cast
CERRWARN += -Wno-int-to-pointer-cast
# because of labels from yacc
e.o : CERRWARN += -Wno-unused-label
# not linted
SMATCH=off
.KEEP_STATE:
all : $(PROG)
catalog: $(POFILE)
$(POFILE): e.def $(POFILES)
$(RM) $@
cat $(POFILES) > $@
$(PROG) : $(OBJS) $(MAPFILE.NGB)
$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
$(POST_PROCESS)
# Hammerhead: GNU Make grouped target (was dmake +)
$(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def) &: ../$(YACCSRC)
$(YACC.y) ../$(YACCSRC)
$(MV) y.tab.c $(YACCSRC:%.y=%.c)
$(MV) y.tab.h $(YACCSRC:%.y=%.def)
# Hammerhead: Use static pattern rule for GNU Make compatibility
$(COBJS): %.o: ../%.c
$(COMPILE.c) -o $@ $<
install : all $(ROOTPROG)
clean:
$(RM) $(OBJS) $(CLEANFILES)
include ../../Makefile.targ
|