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