xref: /titanic_41/usr/src/lib/print/mod_ipp/Makefile (revision f9196d04d70ad82c110d3a8ac18974a63dcf211c)
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#
229444c26fSTom Whitten# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23355b4669Sjacobs# Use is subject to license terms.
24355b4669Sjacobs#
252208104eSGordon Ross# Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
262208104eSGordon Ross#
27355b4669Sjacobs
28355b4669SjacobsLIBRARY =		mod_ipp.a
29355b4669SjacobsVERS =
30355b4669SjacobsOBJECTS = mod_ipp.o
31355b4669Sjacobs
32355b4669Sjacobsinclude ../../Makefile.lib
33355b4669Sjacobsinclude ../../Makefile.rootfs
34355b4669Sjacobs
352208104eSGordon Ross# These *BASE paths are used ONLY at build time to locate headers.
362208104eSGordon Ross# This builds against Apache 2.2 but the module should work with
37*f9196d04SGordon Ross# any Apache 2.x version, and APR 1.3 or later.
382208104eSGordon RossAPACHEBASE =	/usr/apache2/2.2
39*f9196d04SGordon RossAPR_BASE =	/usr/apr/1.3
40*f9196d04SGordon RossAPRUBASE =	/usr/apr-util/1.3
412208104eSGordon Ross
422208104eSGordon RossIPPCONFDIR =	$(ROOT)/etc/lp/ipp
432208104eSGordon RossIPPLIBDIR =	$(ROOT)/usr/lib/lp/ipp
44355b4669SjacobsLISTENERDIR =	$(ROOT)/var/lp/ipp-listener
45355b4669Sjacobs
462208104eSGordon RossROOTDIRS =	$(ROOT)/etc/lp $(IPPCONFDIR) \
472208104eSGordon Ross		$(ROOT)/usr/lib/lp $(IPPLIBDIR) \
48355b4669Sjacobs		$(ROOT)/var/lp $(LISTENERDIR)
49355b4669Sjacobs
502208104eSGordon Ross$(ROOT)/etc/lp:=	DIRMODE = 775
51355b4669Sjacobs$(ROOT)/var/lp:=	DIRMODE = 775
52355b4669Sjacobs$(ROOT)/var/lp:=	FILEMODE = 775
53355b4669Sjacobs
54355b4669SjacobsLIBS =			$(DYNLIB)
55355b4669Sjacobs
56355b4669SjacobsSRCS = $(OBJECTS:%.o = %.c)
57355b4669Sjacobs
58355b4669Sjacobs
59355b4669SjacobsCFLAGS +=	$(CCVERBOSE)
60355b4669SjacobsCPPFLAGS +=	-I../libipp-listener/common
61355b4669SjacobsCPPFLAGS +=	-I../libipp-core/common
622208104eSGordon RossCPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APACHEBASE)/include
632208104eSGordon RossCPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APR_BASE)/include
642208104eSGordon RossCPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APRUBASE)/include
652208104eSGordon RossCPPFLAGS +=	-DAPACHE2
66355b4669SjacobsCPPFLAGS +=	-DEAPI
67f808c858Sraf
682208104eSGordon Ross# See: /usr/apache2/2.2/build/config_vars.mk
692208104eSGordon Ross# Make sure to build with compatible flags.
702208104eSGordon RossCPPFLAGS +=	-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
712208104eSGordon Ross
722208104eSGordon RossMAPFILES =	mapfile httpd-syms.map
73f808c858Sraf
74355b4669SjacobsLDLIBS +=	-lipp-listener -lipp-core -lpapi -lc
75355b4669Sjacobs
76355b4669Sjacobs#	SMF manifest
77355b4669SjacobsMANIFEST=       ipp-listener.xml
789444c26fSTom WhittenROOTMANIFESTDIR=        $(ROOT)/lib/svc/manifest/application/print
79355b4669SjacobsROOTMANIFEST=		$(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
80355b4669Sjacobs$(ROOTMANIFEST)         := FILEMODE= 444
81355b4669Sjacobs
82355b4669Sjacobs#	Apache module
832208104eSGordon Ross#	LIBLINKS is not a link here, just the bare *.so name
842208104eSGordon Ross$(IPPLIBDIR)/$(LIBLINKS):	$(ROOTDIRS)
85355b4669Sjacobs
86355b4669Sjacobs#	Apache config
872208104eSGordon RossAPACHECONFFILE=	$(IPPCONFDIR)/httpd-standalone-ipp.conf
88355b4669Sjacobs$(APACHECONFFILE)         := FILEMODE= 644
89355b4669SjacobsLISTENERFILE=	$(LISTENERDIR)/index.html
90355b4669Sjacobs$(LISTENERFILE)         := FILEMODE= 444
91355b4669Sjacobs
92355b4669Sjacobs$(ROOT)/var/lp:=	FILEMODE = 0775
93355b4669Sjacobs
942208104eSGordon Ross$(IPPLIBDIR)/$(LIBLINKS):=	FILEMODE = 0555
95355b4669Sjacobs
962208104eSGordon Ross$(ROOTMANIFESTDIR)/% $(IPPLIBDIR)/% $(IPPCONFDIR)/% $(LISTENERDIR)/%:	%
97355b4669Sjacobs	$(INS.file)
98355b4669Sjacobs
99355b4669Sjacobs$(ROOTDIRS):
100355b4669Sjacobs	$(INS.dir)
101355b4669Sjacobs
102355b4669Sjacobs.KEEP_STATE:
103355b4669Sjacobs
104355b4669Sjacobsall:	$(LIBS)
105355b4669Sjacobs
1062208104eSGordon Rossinstall:	all $(IPPLIBDIR)/$(LIBLINKS) $(APACHECONFFILE) \
107355b4669Sjacobs		$(LISTENERFILE) $(ROOTMANIFEST)
108355b4669Sjacobs
109355b4669Sjacobsinstall_h:
110355b4669Sjacobs
111355b4669Sjacobslint:
112355b4669Sjacobs
113355b4669Sjacobsinclude ../../Makefile.targ
114