1*355b4669Sjacobs# 2*355b4669Sjacobs# CDDL HEADER START 3*355b4669Sjacobs# 4*355b4669Sjacobs# The contents of this file are subject to the terms of the 5*355b4669Sjacobs# Common Development and Distribution License (the "License"). 6*355b4669Sjacobs# You may not use this file except in compliance with the License. 7*355b4669Sjacobs# 8*355b4669Sjacobs# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*355b4669Sjacobs# or http://www.opensolaris.org/os/licensing. 10*355b4669Sjacobs# See the License for the specific language governing permissions 11*355b4669Sjacobs# and limitations under the License. 12*355b4669Sjacobs# 13*355b4669Sjacobs# When distributing Covered Code, include this CDDL HEADER in each 14*355b4669Sjacobs# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*355b4669Sjacobs# If applicable, add the following below this CDDL HEADER, with the 16*355b4669Sjacobs# fields enclosed by brackets "[]" replaced with your own identifying 17*355b4669Sjacobs# information: Portions Copyright [yyyy] [name of copyright owner] 18*355b4669Sjacobs# 19*355b4669Sjacobs# CDDL HEADER END 20*355b4669Sjacobs# 21*355b4669Sjacobs# 22*355b4669Sjacobs# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*355b4669Sjacobs# Use is subject to license terms. 24*355b4669Sjacobs# 25*355b4669Sjacobs# ident "%Z%%M% %I% %E% SMI" 26*355b4669Sjacobs# 27*355b4669Sjacobs 28*355b4669SjacobsUCBPROGS = lpr lpq lprm lpc 29*355b4669SjacobsBINPROGS = lp lpstat cancel enable disable $(UCBPROGS) 30*355b4669Sjacobs 31*355b4669SjacobsSBINPROGS = accept reject lpmove 32*355b4669Sjacobs 33*355b4669Sjacobs 34*355b4669SjacobsOBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) common.o 35*355b4669Sjacobs 36*355b4669SjacobsROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%) 37*355b4669SjacobsROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%) 38*355b4669Sjacobs 39*355b4669Sjacobs 40*355b4669SjacobsFILEMODE = 0555 41*355b4669SjacobsOWNER = root 42*355b4669Sjacobs 43*355b4669Sjacobsinclude ../../Makefile.cmd 44*355b4669Sjacobs 45*355b4669SjacobsCFLAGS += $(CCVERBOSE) 46*355b4669SjacobsCPPFLAGS += -I. 47*355b4669SjacobsCPPFLAGS += -I../../../lib/print/libpapi-common/common 48*355b4669SjacobsLDLIBS += -lpapi -lc 49*355b4669Sjacobs 50*355b4669Sjacobs# each program needs common.o as well 51*355b4669Sjacobs$(BINPROGS) $(SBINPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) common.o 52*355b4669Sjacobs $(LINK.c) -o $@ $@.c common.o $(LDLIBS) 53*355b4669Sjacobs $(POST_PROCESS) 54*355b4669Sjacobs 55*355b4669Sjacobs# ucb links (lptest is handled in usr/src/cmd/lp/cmd/Makefile) 56*355b4669SjacobsROOTUSRUCB = $(ROOT)/usr/ucb 57*355b4669SjacobsROOTUCBSYMLINKS = $(UCBPROGS:%=$(ROOTUSRUCB)/%) 58*355b4669Sjacobs$(ROOTUSRUCB)/%: $(ROOTUSRUCB) % 59*355b4669Sjacobs 60*355b4669Sjacobs$(ROOTUCBSYMLINKS): 61*355b4669Sjacobs $(RM) $@; $(SYMLINK) ../bin/$(@F) $@ 62*355b4669Sjacobs 63*355b4669Sjacobs# usr/lib links 64*355b4669SjacobsROOTUSRLIBSYMLINKS = $(SBINPROGS:%=$(ROOTLIB)/%) 65*355b4669Sjacobs$(ROOTLIB)/%: $(ROOTLIB) % 66*355b4669Sjacobs 67*355b4669Sjacobs$(ROOTUSRLIBSYMLINKS): 68*355b4669Sjacobs $(RM) $@; $(SYMLINK) ../sbin/$(@F) $@ 69*355b4669Sjacobs 70*355b4669Sjacobs.KEEP_STATE: 71*355b4669Sjacobs 72*355b4669Sjacobsall: $(BINPROGS) $(SBINPROGS) 73*355b4669Sjacobs 74*355b4669Sjacobsinstall: $(BINPROGS) $(SBINPROGS) $(ROOTBINPROGS) $(ROOTUSRSBINPROGS) \ 75*355b4669Sjacobs $(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS) 76*355b4669Sjacobs 77*355b4669Sjacobsclean: 78*355b4669Sjacobs $(RM) $(OBJS) 79*355b4669Sjacobs 80*355b4669SjacobsCLOBBERFILES += $(BINPROGS) $(SBINPROGS) 81*355b4669Sjacobs 82*355b4669Sjacobslint: 83*355b4669Sjacobs 84*355b4669Sjacobsinclude ../../Makefile.targ 85