1355b4669Sjacobs# 2355b4669Sjacobs# CDDL HEADER START 3355b4669Sjacobs# 4355b4669Sjacobs# The contents of this file are subject to the terms of the 5355b4669Sjacobs# Common Development and Distribution License (the "License"). 6355b4669Sjacobs# You may not use this file except in compliance with the License. 7355b4669Sjacobs# 8355b4669Sjacobs# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9355b4669Sjacobs# or http://www.opensolaris.org/os/licensing. 10355b4669Sjacobs# See the License for the specific language governing permissions 11355b4669Sjacobs# and limitations under the License. 12355b4669Sjacobs# 13355b4669Sjacobs# When distributing Covered Code, include this CDDL HEADER in each 14355b4669Sjacobs# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15355b4669Sjacobs# If applicable, add the following below this CDDL HEADER, with the 16355b4669Sjacobs# fields enclosed by brackets "[]" replaced with your own identifying 17355b4669Sjacobs# information: Portions Copyright [yyyy] [name of copyright owner] 18355b4669Sjacobs# 19355b4669Sjacobs# CDDL HEADER END 20355b4669Sjacobs# 21355b4669Sjacobs# 22375b28ffSGowtham Thommandra# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23355b4669Sjacobs# Use is subject to license terms. 24355b4669Sjacobs# 25355b4669Sjacobs# 26355b4669Sjacobs 270a44ef6dSjacobsinclude ../Makefile.sp 280a44ef6dSjacobs 29355b4669SjacobsUCBPROGS = lpr lpq lprm lpc 30355b4669SjacobsBINPROGS = lp lpstat cancel enable disable $(UCBPROGS) 31355b4669SjacobsSBINPROGS = accept reject lpmove 329622934aSjacobs 330a44ef6dSjacobsLIBPRINTPROGS = in.lpd 34355b4669Sjacobs 359622934aSjacobsLIBLPPROGS = $(BINPROGS) $(SBINPROGS) 369622934aSjacobs 37355b4669Sjacobs 380a44ef6dSjacobsOBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) $(LIBPRINTPROGS:=.o) common.o 39355b4669Sjacobs 409622934aSjacobsROOTLIBLPBIN=$(ROOTLIBLP)/bin 419622934aSjacobs 42355b4669SjacobsROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%) 43355b4669SjacobsROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%) 440a44ef6dSjacobsROOTLIBPRINTPROGS = $(LIBPRINTPROGS:%=$(ROOTLIBPRINT)/%) 459622934aSjacobsROOTLIBLPPROGS = $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%) 46355b4669Sjacobs 47355b4669Sjacobs 48355b4669SjacobsFILEMODE = 0555 49355b4669Sjacobs 50355b4669Sjacobsinclude ../../Makefile.cmd 51355b4669Sjacobs 520a44ef6dSjacobsMANIFEST= rfc1179.xml 530a44ef6dSjacobsROOTMANIFESTDIR= $(ROOTSVCAPPLICATIONPRINT) 540a44ef6dSjacobs$(ROOTMANIFEST) := FILEMODE= 444 550a44ef6dSjacobs 56375b28ffSGowtham ThommandraLPLIB = $(SRC)/cmd/lp/lib 57375b28ffSGowtham ThommandraLIBLP = $(LPLIB)/lp/liblp.a 58355b4669SjacobsCFLAGS += $(CCVERBOSE) 59355b4669SjacobsCPPFLAGS += -I. 60355b4669SjacobsCPPFLAGS += -I../../../lib/print/libpapi-common/common 610a44ef6dSjacobsCPPFLAGS += -I$(ROOT)/usr/include 62375b28ffSGowtham ThommandraCPPFLAGS += -I../../lp/include 63375b28ffSGowtham ThommandraLDLIBS += $(LIBLP) -lpapi -lc 640a44ef6dSjacobsin.lpd:= CFLAGS += -DSOLARIS_PRIVATE_POST_0_9 650a44ef6dSjacobsin.lpd:= LDLIBS += -lnsl -lsocket 66355b4669Sjacobs 67*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 68*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 69*7014882cSRichard Lowe 709622934aSjacobsall: $(BINPROGS) $(SBINPROGS) 719622934aSjacobs 72355b4669Sjacobs# each program needs common.o as well 730a44ef6dSjacobs$(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) $(LIBPRINTPROGS:%=%.c) common.o 74355b4669Sjacobs $(LINK.c) -o $@ $@.c common.o $(LDLIBS) 75355b4669Sjacobs $(POST_PROCESS) 76355b4669Sjacobs 77355b4669Sjacobs# ucb links (lptest is handled in usr/src/cmd/lp/cmd/Makefile) 78355b4669SjacobsROOTUSRUCB = $(ROOT)/usr/ucb 79355b4669SjacobsROOTUCBSYMLINKS = $(UCBPROGS:%=$(ROOTUSRUCB)/%) 80355b4669Sjacobs$(ROOTUSRUCB)/%: $(ROOTUSRUCB) % 81355b4669Sjacobs 829622934aSjacobs$(ROOTLIBLPBIN)/%: % 839622934aSjacobs $(INS.file) 849622934aSjacobs 85355b4669Sjacobs$(ROOTUCBSYMLINKS): 86355b4669Sjacobs $(RM) $@; $(SYMLINK) ../bin/$(@F) $@ 87355b4669Sjacobs 88355b4669Sjacobs# usr/lib links 89355b4669SjacobsROOTUSRLIBSYMLINKS = $(SBINPROGS:%=$(ROOTLIB)/%) 90355b4669Sjacobs$(ROOTLIB)/%: $(ROOTLIB) % 91355b4669Sjacobs 92355b4669Sjacobs$(ROOTUSRLIBSYMLINKS): 93355b4669Sjacobs $(RM) $@; $(SYMLINK) ../sbin/$(@F) $@ 94355b4669Sjacobs 95355b4669Sjacobs.KEEP_STATE: 96355b4669Sjacobs 979622934aSjacobsinstall: $(ROOTLIBLPPROGS) \ 980a44ef6dSjacobs $(ROOTLIBPRINT) $(ROOTLIBPRINTPROGS) $(ROOTMANIFEST) \ 99355b4669Sjacobs $(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS) 100355b4669Sjacobs 1010a44ef6dSjacobscheck: $(CHKMANIFEST) 1020a44ef6dSjacobs 103355b4669Sjacobsclean: 104355b4669Sjacobs $(RM) $(OBJS) 105355b4669Sjacobs 1060a44ef6dSjacobsCLOBBERFILES += $(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS) 107355b4669Sjacobs 108355b4669Sjacobslint: 109355b4669Sjacobs 110355b4669Sjacobsinclude ../../Makefile.targ 111