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