xref: /onnv-gate/usr/src/cmd/print/bsd-sysv-commands/Makefile (revision 10207:87c40ea3fc4b)
12264Sjacobs#
22264Sjacobs# CDDL HEADER START
32264Sjacobs#
42264Sjacobs# The contents of this file are subject to the terms of the
52264Sjacobs# Common Development and Distribution License (the "License").
62264Sjacobs# You may not use this file except in compliance with the License.
72264Sjacobs#
82264Sjacobs# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
92264Sjacobs# or http://www.opensolaris.org/os/licensing.
102264Sjacobs# See the License for the specific language governing permissions
112264Sjacobs# and limitations under the License.
122264Sjacobs#
132264Sjacobs# When distributing Covered Code, include this CDDL HEADER in each
142264Sjacobs# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152264Sjacobs# If applicable, add the following below this CDDL HEADER, with the
162264Sjacobs# fields enclosed by brackets "[]" replaced with your own identifying
172264Sjacobs# information: Portions Copyright [yyyy] [name of copyright owner]
182264Sjacobs#
192264Sjacobs# CDDL HEADER END
202264Sjacobs#
212264Sjacobs#
22*9669SGowtham.Thommandra@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
232264Sjacobs# Use is subject to license terms.
242264Sjacobs#
252264Sjacobs#
262264Sjacobs
273125Sjacobsinclude		../Makefile.sp
283125Sjacobs
292264SjacobsUCBPROGS =	lpr lpq lprm lpc
302264SjacobsBINPROGS =	lp lpstat cancel enable disable $(UCBPROGS)
316237SjacobsSBINPROGS =	accept reject lpmove
322264Sjacobs
333125SjacobsLIBPRINTPROGS =	in.lpd
342264Sjacobs
356237SjacobsLIBLPPROGS = $(BINPROGS) $(SBINPROGS)
366237Sjacobs
372264Sjacobs
383125SjacobsOBJS =	$(BINPROGS:=.o) $(SBINPROGS:=.o) $(LIBPRINTPROGS:=.o) common.o
392264Sjacobs
406237SjacobsROOTLIBLPBIN=$(ROOTLIBLP)/bin
416237Sjacobs
422264SjacobsROOTBINPROGS =		$(BINPROGS:%=$(ROOTBIN)/%)
432264SjacobsROOTUSRSBINPROGS =	$(SBINPROGS:%=$(ROOTUSRSBIN)/%)
443125SjacobsROOTLIBPRINTPROGS =	$(LIBPRINTPROGS:%=$(ROOTLIBPRINT)/%)
456237SjacobsROOTLIBLPPROGS =	$(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
462264Sjacobs
472264Sjacobs
482264SjacobsFILEMODE =	0555
492264Sjacobs
502264Sjacobsinclude ../../Makefile.cmd
512264Sjacobs
523125SjacobsMANIFEST=	rfc1179.xml
533125SjacobsROOTMANIFESTDIR=	$(ROOTSVCAPPLICATIONPRINT)
543125Sjacobs$(ROOTMANIFEST)		:= FILEMODE= 444
553125Sjacobs
56*9669SGowtham.Thommandra@Sun.COMLPLIB	=	$(SRC)/cmd/lp/lib
57*9669SGowtham.Thommandra@Sun.COMLIBLP	=	$(LPLIB)/lp/liblp.a
582264SjacobsCFLAGS +=	$(CCVERBOSE)
592264SjacobsCPPFLAGS +=	-I.
602264SjacobsCPPFLAGS +=	-I../../../lib/print/libpapi-common/common
613125SjacobsCPPFLAGS +=	-I$(ROOT)/usr/include
62*9669SGowtham.Thommandra@Sun.COMCPPFLAGS +=	-I../../lp/include
63*9669SGowtham.Thommandra@Sun.COMLDLIBS +=	$(LIBLP) -lpapi -lc
643125Sjacobsin.lpd:=	CFLAGS +=	-DSOLARIS_PRIVATE_POST_0_9
653125Sjacobsin.lpd:=	LDLIBS +=	-lnsl -lsocket
662264Sjacobs
676237Sjacobsall:	$(BINPROGS) $(SBINPROGS)
686237Sjacobs
692264Sjacobs#	each program needs common.o as well
703125Sjacobs$(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS):	$(BINPROGS:%=%.c) $(SBINPROGS:%=%.c)  $(LIBPRINTPROGS:%=%.c) common.o
712264Sjacobs	$(LINK.c) -o $@ $@.c common.o $(LDLIBS)
722264Sjacobs	$(POST_PROCESS)
732264Sjacobs
742264Sjacobs#	ucb links (lptest is handled in usr/src/cmd/lp/cmd/Makefile)
752264SjacobsROOTUSRUCB =		$(ROOT)/usr/ucb
762264SjacobsROOTUCBSYMLINKS =	$(UCBPROGS:%=$(ROOTUSRUCB)/%)
772264Sjacobs$(ROOTUSRUCB)/%:	$(ROOTUSRUCB) %
782264Sjacobs
796237Sjacobs$(ROOTLIBLPBIN)/%:	%
806237Sjacobs	$(INS.file)
816237Sjacobs
822264Sjacobs$(ROOTUCBSYMLINKS):
832264Sjacobs	$(RM) $@; $(SYMLINK) ../bin/$(@F) $@
842264Sjacobs
852264Sjacobs#	usr/lib links
862264SjacobsROOTUSRLIBSYMLINKS =	$(SBINPROGS:%=$(ROOTLIB)/%)
872264Sjacobs$(ROOTLIB)/%:	$(ROOTLIB) %
882264Sjacobs
892264Sjacobs$(ROOTUSRLIBSYMLINKS):
902264Sjacobs	$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
912264Sjacobs
922264Sjacobs.KEEP_STATE:
932264Sjacobs
946237Sjacobsinstall:	$(ROOTLIBLPPROGS) \
953125Sjacobs		$(ROOTLIBPRINT) $(ROOTLIBPRINTPROGS) $(ROOTMANIFEST) \
962264Sjacobs		$(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS)
972264Sjacobs
983125Sjacobscheck:	$(CHKMANIFEST)
993125Sjacobs
1002264Sjacobsclean:
1012264Sjacobs	$(RM) $(OBJS)
1022264Sjacobs
1033125SjacobsCLOBBERFILES += $(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS)
1042264Sjacobs
1052264Sjacobslint:
1062264Sjacobs
1072264Sjacobsinclude ../../Makefile.targ
108