Makefile revision 0a44ef6d9afbfe052a7e975f55ea0d2954b62a82
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use is subject to license terms.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../Makefile.sp
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweUCBPROGS = lpr lpq lprm lpc
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweBINPROGS = lp lpstat cancel enable disable $(UCBPROGS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweSBINPROGS = accept reject lpmove
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLIBPRINTPROGS = in.lpd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweOBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) $(LIBPRINTPROGS:=.o) common.o
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTLIBPRINTPROGS = $(LIBPRINTPROGS:%=$(ROOTLIBPRINT)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweFILEMODE = 0555
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweOWNER = root
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../Makefile.cmd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMANIFEST= rfc1179.xml
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTMANIFESTDIR= $(ROOTSVCAPPLICATIONPRINT)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTMANIFEST) := FILEMODE= 444
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCFLAGS += $(CCVERBOSE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += -I.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += -I../../../lib/print/libpapi-common/common
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += -I$(ROOT)/usr/include
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLDLIBS += -lpapi -lc
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowein.lpd:= CFLAGS += -DSOLARIS_PRIVATE_POST_0_9
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowein.lpd:= LDLIBS += -lnsl -lsocket
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# each program needs common.o as well
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) $(LIBPRINTPROGS:%=%.c) common.o
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(LINK.c) -o $@ $@.c common.o $(LDLIBS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(POST_PROCESS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ucb links (lptest is handled in usr/src/cmd/lp/cmd/Makefile)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTUSRUCB = $(ROOT)/usr/ucb
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTUCBSYMLINKS = $(UCBPROGS:%=$(ROOTUSRUCB)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTUSRUCB)/%: $(ROOTUSRUCB) %
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTUCBSYMLINKS):
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@; $(SYMLINK) ../bin/$(@F) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# usr/lib links
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTUSRLIBSYMLINKS = $(SBINPROGS:%=$(ROOTLIB)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTLIB)/%: $(ROOTLIB) %
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTUSRLIBSYMLINKS):
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
.KEEP_STATE:
all: $(BINPROGS) $(SBINPROGS)
install: $(BINPROGS) $(SBINPROGS) $(ROOTBINPROGS) $(ROOTUSRSBINPROGS) \
$(ROOTLIBPRINT) $(ROOTLIBPRINTPROGS) $(ROOTMANIFEST) \
$(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS)
check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS)
CLOBBERFILES += $(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS)
lint:
include ../../Makefile.targ