xref: /titanic_50/usr/src/lib/print/libpapi-lpd/Makefile.com (revision f6acbf7c6543dc0aab58cae1df419f0147c46d77)
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#
22*f6acbf7cSrie# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23355b4669Sjacobs# Use is subject to license terms.
24355b4669Sjacobs#
25355b4669Sjacobs# ident	"%Z%%M%	%I%	%E% SMI"
26355b4669Sjacobs#
27355b4669Sjacobs
28355b4669SjacobsLIBRARY =		psm-lpd.a
29355b4669SjacobsVERS =			.1
30355b4669SjacobsCOMMON_OBJS = lpd-misc.o
31355b4669SjacobsOBJECTS = job.o library.o lpd-cancel.o lpd-job.o lpd-query.o printer.o \
32355b4669Sjacobs	service.o $(COMMON_OBJS)
33355b4669Sjacobs
34355b4669Sjacobsinclude ../../../Makefile.lib
35355b4669Sjacobsinclude ../../../Makefile.rootfs
36355b4669Sjacobs
37f808c858SrafSRCDIR =	../common
38f808c858Sraf
39355b4669SjacobsROOTLIBDIR=	$(ROOT)/usr/lib/print
40355b4669SjacobsROOTLIBDIR64=	$(ROOT)/usr/lib/print/$(MACH)
41355b4669Sjacobs
42355b4669SjacobsEXTRALINKS=	$(ROOTLIBDIR)/psm-rfc-1179.so
43355b4669Sjacobs$(EXTRALINKS):	$(ROOTLINKS)
44355b4669Sjacobs	$(RM) $@; $(SYMLINK) $(LIBLINKS) $@
45355b4669Sjacobs
46355b4669SjacobsLIBS =			$(DYNLIB)
47355b4669Sjacobs
48355b4669Sjacobs$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
49355b4669Sjacobs
50355b4669SjacobsCFLAGS +=	$(CCVERBOSE)
51355b4669SjacobsCPPFLAGS +=	-I$(SRCDIR)
52355b4669SjacobsCPPFLAGS +=	-I../../libpapi-common/common
53f808c858Sraf
54f808c858SrafMAPFILES =	$(SRCDIR)/mapfile
55f808c858Sraf
56355b4669SjacobsLDLIBS +=	-lc
57355b4669Sjacobs
58355b4669Sjacobs.KEEP_STATE:
59355b4669Sjacobs
60355b4669Sjacobsall:	$(LIBS) $(PROG)
61355b4669Sjacobs
62355b4669Sjacobslint:	lintcheck
63355b4669Sjacobs
64355b4669Sjacobsinclude ../../../Makefile.targ
65355b4669Sjacobs
66355b4669Sjacobs#
67355b4669Sjacobs#	NEEDED to build lpd-port
68355b4669Sjacobs#
69355b4669SjacobsPROG =	lpd-port
70355b4669SjacobsLPD_PORT_OBJS = lpd-port.o $(COMMON_OBJS)
71355b4669Sjacobs
7210144ea8Sjacobs$(PROG) :=	LDLIBS += -lsocket -lnsl -lsendfile
73355b4669Sjacobs
74355b4669SjacobsPROG_OBJS = $(LPD_PORT_OBJS:%=pics/%)
75355b4669SjacobsOBJS += $(PROG_OBJS)
76355b4669Sjacobs
77355b4669SjacobsLDFLAGS.cmd = \
78*f6acbf7cSrie        $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) $(BDIRECT) \
7924da5b34Srie        $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
80355b4669Sjacobs
81355b4669Sjacobs$(PROG):	$(PROG_OBJS)
82355b4669Sjacobs	$(LINK.c) -o $@ $(PROG_OBJS) $(LDFLAGS.cmd) $(LDLIBS)
83355b4669Sjacobs	$(POST_PROCESS)
84355b4669Sjacobs
85355b4669Sjacobs# needed for the 'install' phase
86355b4669SjacobsROOTLIBPRINTPROG =	$(PROG:%=$(ROOTLIBDIR)/%)
87355b4669Sjacobs$(ROOTLIBPRINTPROG) :=	FILEMODE = 04511
88355b4669Sjacobs$(ROOTLIBPRINTPROG) :=	OWNER = root
89355b4669Sjacobs
90355b4669Sjacobs$(ROOTLIBDIR)/%:	$(ROOTLIBDIR) %
91355b4669Sjacobs	$(INS.file)
92355b4669Sjacobs$(ROOTLIBDIR):
93355b4669Sjacobs	$(INS.dir)
94