xref: /titanic_41/usr/src/cmd/troff/troff.d/Makefile (revision bbb1277b6ec1b0daad4e3ed1a2b891d3e2ece2eb)
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#
47# For message catalog
48#
49POFILES= $(TROFFOBJS:%.o=%.po) $(COMMONOBJS:%.o=../%.po)
50POFILE= troff.d.po
51
52# conditional assignments
53
54all :=		TARGET= all
55install :=	TARGET= install
56clean :=	TARGET= clean
57clobber :=	TARGET= clobber
58lint :=		TARGET= lint
59strip :=	TARGET= strip
60
61troff:=		POBJS=	$(COMMONOBJS) $(TROFFOBJS)
62ta:=		POBJS=	$(TAOBJS)
63makedev:=	POBJS=	$(MAKEDEVOBJS)
64
65ta:=		LDLIBS += -lm
66troff:=		LDLIBS += -lmapmalloc
67
68# build rule for common source above
69%.o: ../%.c
70		$(COMPILE.c) $<
71
72.KEEP_STATE:
73
74.PARALLEL: $(COMMONOBJS) $(TROFFOBJS) $(TAOBJS) $(MAKEDEVOBJS)
75
76all :		$(PROG) $(TXTS) $(SUBDIRS)
77
78$(PROG) :	$$(POBJS)
79		$(LINK.c) -o $@ $(POBJS) $(LDLIBS)
80		$(POST_PROCESS)
81
82install:	$(PROG) $(ROOTPROG) $(SUBDIRS)
83
84clean:		$(SUBDIRS)
85		$(RM) $(TAOBJS) $(MAKEDEVOBJS) $(TROFFOBJS) $(COMMONOBJS)
86
87catalog:        $(POFILE)
88
89$(POFILE):      $(POFILES)
90	$(RM)	$@
91	cat     $(POFILES)      > $@
92
93
94strip :
95		$(STRIP $(PROG)
96
97lint :		lint_SRCS
98
99include		../../Makefile.targ
100
101# additional dependency for clobber which is defined in Makefile.targ
102clobber:	$(SUBDIRS)
103
104$(SUBDIRS) :	FRC
105		@cd $@; pwd; $(MAKE) $(TARGET)
106
107FRC:
108