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