xref: /titanic_52/usr/src/cmd/lp/model/Makefile (revision b6c3f7863936abeae522e48a13887dddeb691a45)
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# ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# cmd/lp/model/Makefile
28#
29
30include			../Makefile.lp
31
32SUBDIRS =		netpr
33
34PROG =			lp.set		\
35			lp.cat		\
36			lp.tell		\
37			lp.tsol_separator	\
38			drain.output
39
40SRCS =			$(PROG:%=%.c)
41
42OBJS =			$(PROG:%=%.o)
43
44MODELS =		standard	\
45			netstandard	\
46			tsol_standard	\
47			tsol_netstandard	\
48			tsol_standard_foomatic	\
49			tsol_netstandard_foomatic	\
50			uri
51
52MISC =			alert.proto
53
54
55ROOTLIBLPMODEL=		$(ROOTLIBLP)/model
56ROOTLIBLPBIN =		$(ROOTLIBLP)/bin
57
58ROOTMISC =		$(MISC:%=$(ROOTLIBLPBIN)/%)
59ROOTLPPROG =		$(PROG:%=$(ROOTLIBLPBIN)/%)
60ROOTMODELS =		$(MODELS:%=$(ROOTLIBLPMODEL)/%)
61
62CPPFLAGS =		-I$(LPINC) $(CPPFLAGS.master)
63
64# conditional assignments
65lp.tell :=			LDLIBS += $(LIBMSG) $(LIBLP)
66lp.set drain.output lp.cat :=	LDLIBS += $(LIBLP) -lcurses
67lp.tsol_separator :=		LDLIBS += -ltsol
68
69$(ROOTMISC) :=		FILEMODE = 0444
70
71POFILE=			lp_model.po
72POFILES=		$(SRCS:%.c=%.po)
73
74.KEEP_STATE:
75
76all:			$(PROG) $(MODELS) $(MISC) $(SUBDIRS)
77
78install:		all .WAIT $(ROOTLPPROG) $(ROOTMODELS) $(ROOTMISC) \
79			$(SUBDIRS)
80
81$(ROOTLIBLPMODEL)/% $(ROOTLIBLPBIN)/%:	%
82			$(INS.file)
83
84catalog:		$(SUBDIRS) $(POFILE)
85			$(CP) $(POFILE) ..
86
87clean:			$(SUBDIRS)
88			$(RM) $(OBJS)
89
90clobber:		$(SUBDIRS) clean
91			-$(RM) $(PROG) $(CLOBBERFILES)
92
93strip:
94			$(STRIP) $(PROG)
95
96lint:
97			$(LINT.c) $(SRCS) $(LDLIBS)
98
99$(SUBDIRS) :	FRC
100		@cd $@; pwd; $(MAKE) $(TARGET)
101
102include		../Makefile.lp.msg
103
104FRC:
105