|
root / base / usr / src / cmd / eqn / neqn.d / Makefile
Makefile Makefile 80 lines 1.6 KB
 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
79
#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.

include		../../Makefile.cmd

PROG =		neqn

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)


CLEANFILES =	y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)

YFLAGS =	-d
CPPFLAGS =	-DNEQN -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

#
# for message catalog
#
POFILE= neqn.d.po
POFILES= e.po

.KEEP_STATE:

all :		$(PROG)

$(PROG) :	$(OBJS) $(MAPFILE.NGB)
		$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
		$(POST_PROCESS)

catalog:        $(POFILE)

$(POFILE):      $(POFILES)
	 $(RM)	$@
	 cat     $(POFILES)      > $@


# 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