xref: /titanic_51/usr/src/cmd/refer/Makefile (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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
27include		../Makefile.cmd
28
29PROG1 =		refer addbib lookbib sortbib
30PROG2 =		roffbib indxbib
31PROG3 =		mkey inv hunt
32PROG =		$(PROG1) $(PROG2)
33
34OBJS =		addbib.o deliv2.o glue1.o glue2.o glue3.o glue4.o	\
35		glue5.o hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
36		hunt7.o hunt8.o inv1.o inv2.o inv3.o		\
37		inv5.o inv6.o lookbib.o mkey1.o mkey2.o mkey3.o		\
38		refer..o refer0.o refer1.o refer2.o refer3.o refer4.o	\
39		refer5.o refer6.o refer7.o refer8.o shell.o sortbib.o	\
40		tick.o types.o
41
42#
43# for messaging catalog
44#
45POFILES= $(OBJS:%.o=%.po)
46POFILE= refer.po
47
48CERRWARN += -_gcc=-Wno-implicit-function-declaration
49CERRWARN += -_gcc=-Wno-parentheses
50CERRWARN += -_gcc=-Wno-unused-variable
51CERRWARN += -_gcc=-Wno-uninitialized
52
53addbib.po :=	XGETFLAGS += -a -x addbib.xcl
54
55
56OTXTS =		tmac.bib
57
58REFDIR =	$(ROOTLIB)/refer
59TMACDIR =	$(ROOTSHLIB)/tmac
60#Don't re-install dir already installed by Targetdirs
61#ROOTDIRS =	$(REFDIR) $(TMACDIR)
62ROOTDIRS =     $(REFDIR)
63
64SUBDIRS =	papers
65
66REFDIRPROG =	$(PROG3:%=$(REFDIR)/%)
67IOTXTS =	$(OTXTS:%=$(TMACDIR)/%)
68
69$(IOTXTS):=	FILEMODE = 0644
70
71all:=		TARGET=	all
72install:=	TARGET=	install
73clean:=		TARGET=	clean
74clobber:=	TARGET=	clobber
75
76mkey:=		POBJS=  mkey1.o mkey2.o mkey3.o deliv2.o
77inv:=		POBJS= inv1.o inv2.o inv3.o inv5.o inv6.o deliv2.o
78hunt:=		POBJS= hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
79			hunt7.o glue5.o refer3.o shell.o	\
80			deliv2.o hunt8.o glue4.o tick.o
81refer:=		POBJS= glue1.o refer1.o refer2.o refer4.o refer5.o	\
82			refer6.o mkey3.o refer7.o refer8.o hunt2.o	\
83			hunt3.o deliv2.o hunt5.o hunt6.o hunt8.o	\
84			glue3.o hunt7.o glue2.o glue4.o		\
85			glue5.o refer0.o shell.o
86addbib:=	POBJS= addbib.o
87lookbib:=	POBJS= lookbib.o
88sortbib:=	POBJS= sortbib.o
89
90.KEEP_STATE :
91
92.PARALLEL: $(OBJS)
93
94all:		$(PROG) $(PROG3) $(OTXTS) $(SUBDIRS)
95
96$(PROG1) $(PROG3): $$(POBJS)
97		$(LINK.c) -o $@ $(POBJS) $(LDFLAGS) $(LDLIBS)
98		$(POST_PROCESS)
99
100$(POFILE):      $(POFILES)
101	$(RM)	$@
102	cat     $(POFILES)      > $@
103
104types.po:
105	touch types.po
106
107
108install:	all .WAIT $(ROOTDIRS) \
109		$(ROOTPROG) $(REFDIRPROG) $(IOTXTS) $(SUBDIRS)
110
111$(REFDIR)/% :	%
112		$(INS.file)
113
114$(TMACDIR)/% :	%
115		$(INS.file)
116
117clean :		$(SUBDIRS)
118		$(RM) $(OBJS)
119
120clobber :	$(SUBDIRS) local_clobber
121
122lint:
123	$(LINT.c) mkey1.c mkey2.c mkey3.c deliv2.c $(LDLIBS)
124	$(LINT.c) inv1.c inv2.c inv3.c inv5.c inv6.c deliv2.c $(LDLIBS)
125	$(LINT.c) hunt1.c hunt2.c hunt3.c hunt5.c hunt6.c	\
126		hunt7.c glue5.c refer3.c shell.c	\
127		deliv2.c hunt8.c glue4.c tick.c $(LDLIBS)
128	$(LINT.c) glue1.c refer1.c refer2.c refer4.c refer5.c	\
129		refer6.c mkey3.c refer7.c refer8.c hunt2.c	\
130		hunt3.c deliv2.c hunt5.c hunt6.c hunt8.c	\
131		glue3.c hunt7.c glue2.c glue4.c		\
132		glue5.c refer0.c shell.c $(LDLIBS)
133	$(LINT.c) addbib.c $(LDLIBS)
134	$(LINT.c) lookbib.c $(LDLIBS)
135	$(LINT.c) sortbib.c $(LDLIBS)
136
137local_clobber:
138		$(RM) $(PROG) $(OBJS) $(CLOBBERFILES)
139
140strip:
141
142$(SUBDIRS):	FRC
143		@cd $@; pwd; $(MAKE) $(TARGET)
144
145$(ROOTDIRS) :
146		$(INS.dir)
147
148FRC:
149
150include ../Makefile.targ
151