xref: /illumos-gate/usr/src/cmd/lp/cmd/Makefile (revision 355b4669e025ff377602b6fc7caaf30dbc218371)
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 =	lpsystem 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) lpsystem.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)
68lpsystem:=	LDLIBS += $(LIBSYS) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \
69			-lnsl -z lazyload -lsecdb -z nolazyload
70lpusers:=	LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP)
71
72.KEEP_STATE:
73
74all:		$(PROG) $(SUBDIRS)
75
76install:	$(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \
77		$(ROOTSYMLINKS) $(SUBDIRS)
78
79catalog:	$(SUBDIRS) $(POFILE)
80		$(CP) $(POFILE) ..
81
82clean:		$(SUBDIRS)
83		$(RM) $(OBJS)
84
85clobber:	$(SUBDIRS) local_clobber
86
87local_clobber:
88		$(RM) $(OBJS) $(PROG) lpsystem.o $(CLOBBERFILES)
89
90strip:		$(SUBDIRS)
91		$(STRIP) $(PROG)
92
93lint:
94		$(LINT.c) $(SRCS) $(LDLIBS)
95
96$(ROOTSYMLINKS):
97		$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
98
99$(SUBDIRS):	FRC
100		@cd $@; pwd; $(MAKE) $(TARGET)
101
102include		../Makefile.lp.msg
103
104FRC:
105