xref: /illumos-gate/usr/src/cmd/lp/cmd/Makefile (revision 67e3a03ed4a2813074d36330f062ed6e593a4937)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
545916cd2Sjpk# Common Development and Distribution License (the "License").
645916cd2Sjpk# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
2045916cd2Sjpk
2145916cd2Sjpk
227c478bd9Sstevel@tonic-gate#
23*67e3a03eSrie# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
260a44ef6dSjacobs
270a44ef6dSjacobs#
280a44ef6dSjacobs# ident	"%Z%%M%	%I%	%E% SMI"
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude 	../Makefile.lp
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateOWNER = root
347c478bd9Sstevel@tonic-gate
350a44ef6dSjacobsSUBDIRS =	lptest lpadmin lpsched scripts
367c478bd9Sstevel@tonic-gate
37e2738c5eSjacobsLOCALPROG =	lpshut
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateSBINPROG =	lpfilter lpforms lpusers
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateLIBLINKS =	$(SBINPROG)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gatePROG =		$(LOCALPROG) $(SBINPROG)
447c478bd9Sstevel@tonic-gate
45355b4669SjacobsOBJS=	$(SBINPROG:=.o)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateSRCS=          $(OBJS:.o=.c)
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gatePOFILE=		lp_cmd.po
50e2738c5eSjacobsPOFILES=	$(SRCS:%.c=%.po) lpschedlpshut.po
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gateROOTLIBLPLOCLPROG=	$(LOCALPROG:%=$(ROOTLIBLPLOCL)/%)
537c478bd9Sstevel@tonic-gateROOTSBINPROG=	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
547c478bd9Sstevel@tonic-gateROOTSYMLINKS=	$(LIBLINKS:%=$(ROOTLIB)/%)
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateCPPFLAGS =	-I$(LPINC) $(CPPFLAGS.master)
5824da5b34SrieLDFLAGS +=	$(MAPFILE.NGB:%=-M%)
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate# conditional assignments
617c478bd9Sstevel@tonic-gate#
627c478bd9Sstevel@tonic-gatelpfilter:=	LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \
63*67e3a03eSrie			-lgen -lsecdb
647c478bd9Sstevel@tonic-gatelpforms:=	LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \
65*67e3a03eSrie			$(LIBACC) $(LIBLP) -lsecdb
667c478bd9Sstevel@tonic-gatelpshut:=	LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP)
677c478bd9Sstevel@tonic-gatelpusers:=	LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP)
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate.KEEP_STATE:
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateall:		$(PROG) $(SUBDIRS)
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateinstall:	$(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \
74355b4669Sjacobs		$(ROOTSYMLINKS) $(SUBDIRS)
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gatecatalog:	$(SUBDIRS) $(POFILE)
777c478bd9Sstevel@tonic-gate		$(CP) $(POFILE) ..
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateclean:		$(SUBDIRS)
807c478bd9Sstevel@tonic-gate		$(RM) $(OBJS)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateclobber:	$(SUBDIRS) local_clobber
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatelocal_clobber:
85e2738c5eSjacobs		$(RM) $(OBJS) $(PROG) $(CLOBBERFILES)
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gatestrip:		$(SUBDIRS)
887c478bd9Sstevel@tonic-gate		$(STRIP) $(PROG)
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gatelint:
917c478bd9Sstevel@tonic-gate		$(LINT.c) $(SRCS) $(LDLIBS)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS):
947c478bd9Sstevel@tonic-gate		$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate$(SUBDIRS):	FRC
977c478bd9Sstevel@tonic-gate		@cd $@; pwd; $(MAKE) $(TARGET)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateinclude		../Makefile.lp.msg
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gateFRC:
102