Makefile revision 9622934a862fa39a8e90c816c4136e293d75629d
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER START
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews#
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# or http://www.opensolaris.org/os/licensing.
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence# See the License for the specific language governing permissions
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence# and limitations under the License.
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence#
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater# When distributing Covered Code, include this CDDL HEADER in each
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4fd3e3482c7e4ce01e2cf28f13e0152c8e50d746Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
05f90cac85760b4edef2962209df49ea019c180fMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
05f90cac85760b4edef2962209df49ea019c180fMark Andrews#
c38b92000c0f1a95daaad5468777e165b8047de9Mark Andrews# CDDL HEADER END
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# Use is subject to license terms.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#
4fd3e3482c7e4ce01e2cf28f13e0152c8e50d746Mark Andrews# ident "%Z%%M% %I% %E% SMI"
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews#
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrenceinclude ../Makefile.sp
UCBPROGS = lpr lpq lprm lpc
BINPROGS = lp lpstat cancel enable disable $(UCBPROGS)
SBINPROGS = accept reject lpmove
LIBPRINTPROGS = in.lpd
LIBLPPROGS = $(BINPROGS) $(SBINPROGS)
OBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) $(LIBPRINTPROGS:=.o) common.o
ROOTLIBLPBIN=$(ROOTLIBLP)/bin
ROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%)
ROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%)
ROOTLIBPRINTPROGS = $(LIBPRINTPROGS:%=$(ROOTLIBPRINT)/%)
ROOTLIBLPPROGS = $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
FILEMODE = 0555
OWNER = root
include ../../Makefile.cmd
MANIFEST= rfc1179.xml
ROOTMANIFESTDIR= $(ROOTSVCAPPLICATIONPRINT)
$(ROOTMANIFEST) := FILEMODE= 444
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I.
CPPFLAGS += -I../../../lib/print/libpapi-common/common
CPPFLAGS += -I$(ROOT)/usr/include
LDLIBS += -lpapi -lc
in.lpd:= CFLAGS += -DSOLARIS_PRIVATE_POST_0_9
in.lpd:= LDLIBS += -lnsl -lsocket
all: $(BINPROGS) $(SBINPROGS)
# each program needs common.o as well
$(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) $(LIBPRINTPROGS:%=%.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) %
$(ROOTLIBLPBIN)/%: %
$(INS.file)
$(ROOTUCBSYMLINKS):
$(RM) $@; $(SYMLINK) ../bin/$(@F) $@
# usr/lib links
ROOTUSRLIBSYMLINKS = $(SBINPROGS:%=$(ROOTLIB)/%)
$(ROOTLIB)/%: $(ROOTLIB) %
$(ROOTUSRLIBSYMLINKS):
$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
.KEEP_STATE:
install: $(ROOTLIBLPPROGS) \
$(ROOTLIBPRINT) $(ROOTLIBPRINTPROGS) $(ROOTMANIFEST) \
$(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS)
check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS)
CLOBBERFILES += $(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS)
lint:
include ../../Makefile.targ