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