Makefile revision 355b4669e025ff377602b6fc7caaf30dbc218371
369N/A#
369N/A# CDDL HEADER START
369N/A#
369N/A# The contents of this file are subject to the terms of the
369N/A# Common Development and Distribution License (the "License").
369N/A# You may not use this file except in compliance with the License.
369N/A#
369N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
369N/A# or http://www.opensolaris.org/os/licensing.
369N/A# See the License for the specific language governing permissions
369N/A# and limitations under the License.
369N/A#
369N/A# When distributing Covered Code, include this CDDL HEADER in each
369N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
369N/A# If applicable, add the following below this CDDL HEADER, with the
369N/A# fields enclosed by brackets "[]" replaced with your own identifying
369N/A# information: Portions Copyright [yyyy] [name of copyright owner]
369N/A#
369N/A# CDDL HEADER END
369N/A#
5680N/A#
5680N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5622N/A# Use is subject to license terms.
369N/A#
5680N/A# ident "%Z%%M% %I% %E% SMI"
5680N/A#
369N/A
369N/AUCBPROGS = lpr lpq lprm lpc
369N/ABINPROGS = lp lpstat cancel enable disable $(UCBPROGS)
844N/A
844N/ASBINPROGS = accept reject lpmove
369N/A
5622N/A
369N/AOBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) common.o
5680N/A
369N/AROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%)
5680N/AROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%)
369N/A
369N/A
369N/AFILEMODE = 0555
369N/AOWNER = root
369N/A
include ../../Makefile.cmd
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I.
CPPFLAGS += -I../../../lib/print/libpapi-common/common
LDLIBS += -lpapi -lc
# each program needs common.o as well
$(BINPROGS) $(SBINPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) common.o
$(LINK.c) -o $@ $@.c common.o $(LDLIBS)
$(POST_PROCESS)
# ucb links (lptest is handled in usr/src/cmd/lp/cmd/Makefile)
ROOTUSRUCB = $(ROOT)/usr/ucb
ROOTUCBSYMLINKS = $(UCBPROGS:%=$(ROOTUSRUCB)/%)
$(ROOTUSRUCB)/%: $(ROOTUSRUCB) %
$(ROOTUCBSYMLINKS):
$(RM) $@; $(SYMLINK) ../bin/$(@F) $@
# usr/lib links
ROOTUSRLIBSYMLINKS = $(SBINPROGS:%=$(ROOTLIB)/%)
$(ROOTLIB)/%: $(ROOTLIB) %
$(ROOTUSRLIBSYMLINKS):
$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
.KEEP_STATE:
all: $(BINPROGS) $(SBINPROGS)
install: $(BINPROGS) $(SBINPROGS) $(ROOTBINPROGS) $(ROOTUSRSBINPROGS) \
$(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS)
clean:
$(RM) $(OBJS)
CLOBBERFILES += $(BINPROGS) $(SBINPROGS)
lint:
include ../../Makefile.targ