xref: /titanic_50/usr/src/cmd/refer/Makefile (revision f808c858fa61e7769218966759510a8b1190dfcf)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# Makefile for cmd/refer
29#
30
31include		../Makefile.cmd
32
33PROG1 =		refer addbib lookbib sortbib
34PROG2 =		roffbib indxbib
35PROG3 =		mkey inv hunt
36PROG =		$(PROG1) $(PROG2)
37
38OBJS =		addbib.o deliv2.o glue1.o glue2.o glue3.o glue4.o	\
39		glue5.o hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
40		hunt7.o hunt8.o inv1.o inv2.o inv3.o		\
41		inv5.o inv6.o lookbib.o mkey1.o mkey2.o mkey3.o		\
42		refer..o refer0.o refer1.o refer2.o refer3.o refer4.o	\
43		refer5.o refer6.o refer7.o refer8.o shell.o sortbib.o	\
44		tick.o types.o
45
46#
47# for messaging catalog
48#
49POFILES= $(OBJS:%.o=%.po)
50POFILE= refer.po
51
52addbib.po :=	XGETFLAGS += -a -x addbib.xcl
53
54
55OTXTS =		tmac.bib
56
57REFDIR =	$(ROOTLIB)/refer
58TMACDIR =	$(ROOTSHLIB)/tmac
59#Don't re-install dir already installed by Targetdirs
60#ROOTDIRS =	$(REFDIR) $(TMACDIR)
61ROOTDIRS =     $(REFDIR)
62
63SUBDIRS =	papers
64
65REFDIRPROG =	$(PROG3:%=$(REFDIR)/%)
66IOTXTS =	$(OTXTS:%=$(TMACDIR)/%)
67
68$(IOTXTS):=	FILEMODE = 0644
69
70all:=		TARGET=	all
71install:=	TARGET=	install
72clean:=		TARGET=	clean
73clobber:=	TARGET=	clobber
74
75mkey:=		POBJS=  mkey1.o mkey2.o mkey3.o deliv2.o
76inv:=		POBJS= inv1.o inv2.o inv3.o inv5.o inv6.o deliv2.o
77hunt:=		POBJS= hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
78			hunt7.o glue5.o refer3.o shell.o	\
79			deliv2.o hunt8.o glue4.o tick.o
80refer:=		POBJS= glue1.o refer1.o refer2.o refer4.o refer5.o	\
81			refer6.o mkey3.o refer7.o refer8.o hunt2.o	\
82			hunt3.o deliv2.o hunt5.o hunt6.o hunt8.o	\
83			glue3.o hunt7.o glue2.o glue4.o		\
84			glue5.o refer0.o shell.o
85addbib:=	POBJS= addbib.o
86lookbib:=	POBJS= lookbib.o
87sortbib:=	POBJS= sortbib.o
88
89.KEEP_STATE :
90
91.PARALLEL: $(OBJS)
92
93all:		$(PROG) $(PROG3) $(OTXTS) $(SUBDIRS)
94
95$(PROG1) $(PROG3): $$(POBJS)
96		$(LINK.c) -o $@ $(POBJS) $(LDFLAGS) $(LDLIBS)
97		$(POST_PROCESS)
98
99$(POFILE):      $(POFILES)
100	$(RM)	$@
101	cat     $(POFILES)      > $@
102
103types.po:
104	touch types.po
105
106
107install:	all .WAIT $(ROOTDIRS) \
108		$(ROOTPROG) $(REFDIRPROG) $(IOTXTS) $(SUBDIRS)
109
110$(REFDIR)/% :	%
111		$(INS.file)
112
113$(TMACDIR)/% :	%
114		$(INS.file)
115
116clean :		$(SUBDIRS)
117		$(RM) $(OBJS)
118
119clobber :	$(SUBDIRS) local_clobber
120
121lint:
122	$(LINT.c) mkey1.c mkey2.c mkey3.c deliv2.c $(LDLIBS)
123	$(LINT.c) inv1.c inv2.c inv3.c inv5.c inv6.c deliv2.c $(LDLIBS)
124	$(LINT.c) hunt1.c hunt2.c hunt3.c hunt5.c hunt6.c	\
125		hunt7.c glue5.c refer3.c shell.c	\
126		deliv2.c hunt8.c glue4.c tick.c $(LDLIBS)
127	$(LINT.c) glue1.c refer1.c refer2.c refer4.c refer5.c	\
128		refer6.c mkey3.c refer7.c refer8.c hunt2.c	\
129		hunt3.c deliv2.c hunt5.c hunt6.c hunt8.c	\
130		glue3.c hunt7.c glue2.c glue4.c		\
131		glue5.c refer0.c shell.c $(LDLIBS)
132	$(LINT.c) addbib.c $(LDLIBS)
133	$(LINT.c) lookbib.c $(LDLIBS)
134	$(LINT.c) sortbib.c $(LDLIBS)
135
136local_clobber:
137		$(RM) $(PROG) $(OBJS) $(CLOBBERFILES)
138
139strip:
140
141$(SUBDIRS):	FRC
142		@cd $@; pwd; $(MAKE) $(TARGET)
143
144$(ROOTDIRS) :
145		$(INS.dir)
146
147FRC:
148
149include ../Makefile.targ
150