xref: /illumos-gate/usr/src/cmd/lp/cmd/Makefile (revision e2738c5e21a9e5d9a6525e48af4738deda3df455)
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#
23#
24# ident	"%Z%%M%	%I%	%E% SMI"
25#
26# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27# Use is subject to license terms.
28#
29# cmd/lp/cmd/Makefile
30#
31
32include 	../Makefile.lp
33
34OWNER = root
35
36SUBDIRS =	lptest lpadmin lpsched adaptor scripts
37
38LOCALPROG =	lpshut
39
40SBINPROG =	lpfilter lpforms lpusers
41
42LIBLINKS =	$(SBINPROG)
43
44PROG =		$(LOCALPROG) $(SBINPROG)
45
46OBJS=	$(SBINPROG:=.o)
47
48SRCS=          $(OBJS:.o=.c)
49
50POFILE=		lp_cmd.po
51POFILES=	$(SRCS:%.c=%.po) lpschedlpshut.po
52
53ROOTLIBLPLOCLPROG=	$(LOCALPROG:%=$(ROOTLIBLPLOCL)/%)
54ROOTSBINPROG=	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
55ROOTSYMLINKS=	$(LIBLINKS:%=$(ROOTLIB)/%)
56
57
58CPPFLAGS =	-I$(LPINC) $(CPPFLAGS.master)
59
60# conditional assignments
61#
62lpfilter:=	LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \
63			-lgen -z lazyload -lsecdb -z nolazyload
64lpforms:=	LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \
65			$(LIBACC) $(LIBLP) \
66			-z lazyload -lsecdb -z nolazyload
67lpshut:=	LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP)
68lpusers:=	LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP)
69
70.KEEP_STATE:
71
72all:		$(PROG) $(SUBDIRS)
73
74install:	$(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \
75		$(ROOTSYMLINKS) $(SUBDIRS)
76
77catalog:	$(SUBDIRS) $(POFILE)
78		$(CP) $(POFILE) ..
79
80clean:		$(SUBDIRS)
81		$(RM) $(OBJS)
82
83clobber:	$(SUBDIRS) local_clobber
84
85local_clobber:
86		$(RM) $(OBJS) $(PROG) $(CLOBBERFILES)
87
88strip:		$(SUBDIRS)
89		$(STRIP) $(PROG)
90
91lint:
92		$(LINT.c) $(SRCS) $(LDLIBS)
93
94$(ROOTSYMLINKS):
95		$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
96
97$(SUBDIRS):	FRC
98		@cd $@; pwd; $(MAKE) $(TARGET)
99
100include		../Makefile.lp.msg
101
102FRC:
103