xref: /illumos-gate/usr/src/cmd/troff/troff.d/Makefile (revision f20211217f12ce291fd518e61065cd273f23e4ea)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# cmd/troff/troff.d/Makefile
26#
27
28include 	../../Makefile.cmd
29
30PROG =		troff ta makedev
31
32SUBDIRS =	tmac.d
33
34TAOBJS =	draw.o ta.o
35MAKEDEVOBJS =	makedev.o
36TROFFOBJS =	t10.o t6.o
37COMMONOBJS =	hytab.o n1.o n2.o n3.o n4.o n5.o		\
38		n7.o n8.o n9.o ni.o nii.o suftab.o
39
40SRCS =		$(TAOBJS:%.o=%.c) $(MAKEDEVOBJS:%.o=%.c)	\
41		$(TROFFOBJS:%.o=%.c) $(COMMONOBJS:%.o=../%.c)
42
43TXTS =		README maketables troff.sh
44
45CPPFLAGS =	-DUSG -DINCORE -I. -I.. $(CPPFLAGS.master)
46
47CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
48CERRWARN +=	-_gcc=-Wno-unused-variable
49CERRWARN +=	-_gcc=-Wno-parentheses
50CERRWARN +=	-_gcc=-Wno-uninitialized
51CERRWARN +=	-_gcc=-Wno-extra
52
53#
54# For message catalog
55#
56POFILES= $(TROFFOBJS:%.o=%.po) $(COMMONOBJS:%.o=../%.po)
57POFILE= troff.d.po
58
59# conditional assignments
60
61all :=		TARGET= all
62install :=	TARGET= install
63clean :=	TARGET= clean
64clobber :=	TARGET= clobber
65lint :=		TARGET= lint
66strip :=	TARGET= strip
67
68troff:=		POBJS=	$(COMMONOBJS) $(TROFFOBJS)
69ta:=		POBJS=	$(TAOBJS)
70makedev:=	POBJS=	$(MAKEDEVOBJS)
71
72ta:=		LDLIBS += -lm
73troff:=		LDLIBS += -lmapmalloc
74
75# build rule for common source above
76%.o: ../%.c
77		$(COMPILE.c) $<
78
79.KEEP_STATE:
80
81.PARALLEL: $(COMMONOBJS) $(TROFFOBJS) $(TAOBJS) $(MAKEDEVOBJS)
82
83all :		$(PROG) $(TXTS) $(SUBDIRS)
84
85$(PROG) :	$$(POBJS)
86		$(LINK.c) -o $@ $(POBJS) $(LDLIBS)
87		$(POST_PROCESS)
88
89install:	$(PROG) $(ROOTPROG) $(SUBDIRS)
90
91clean:		$(SUBDIRS)
92		$(RM) $(TAOBJS) $(MAKEDEVOBJS) $(TROFFOBJS) $(COMMONOBJS)
93
94catalog:        $(POFILE)
95
96$(POFILE):      $(POFILES)
97	$(RM)	$@
98	cat     $(POFILES)      > $@
99
100
101strip :
102		$(STRIP $(PROG)
103
104lint :		lint_SRCS
105
106include		../../Makefile.targ
107
108# additional dependency for clobber which is defined in Makefile.targ
109clobber:	$(SUBDIRS)
110
111$(SUBDIRS) :	FRC
112		@cd $@; pwd; $(MAKE) $(TARGET)
113
114FRC:
115