xref: /titanic_41/usr/src/lib/print/mod_ipp/Makefile (revision dfa1896db444d8b104da7cb009f39f1a89a438aa)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
26#
27
28LIBRARY =		mod_ipp.a
29VERS =
30OBJECTS = mod_ipp.o
31
32include ../../Makefile.lib
33include ../../Makefile.rootfs
34
35# These *BASE paths are used ONLY at build time to locate headers.
36# This builds against Apache 2.2 but the module should work with
37# any Apache 2.x version, and APR 1.3 or later.
38APACHEBASE =	/usr/apache2/2.2
39APR_BASE =	/usr/apr/1.3
40APRUBASE =	/usr/apr-util/1.3
41
42IPPCONFDIR =	$(ROOT)/etc/lp/ipp
43IPPLIBDIR =	$(ROOT)/usr/lib/lp/ipp
44LISTENERDIR =	$(ROOT)/var/lp/ipp-listener
45
46ROOTDIRS =	$(ROOT)/etc/lp $(IPPCONFDIR) \
47		$(ROOT)/usr/lib/lp $(IPPLIBDIR) \
48		$(ROOT)/var/lp $(LISTENERDIR)
49
50$(ROOT)/etc/lp:=	DIRMODE = 775
51$(ROOT)/var/lp:=	DIRMODE = 775
52$(ROOT)/var/lp:=	FILEMODE = 775
53
54LIBS =			$(DYNLIB)
55
56SRCS = $(OBJECTS:%.o = %.c)
57
58
59CFLAGS +=	$(CCVERBOSE)
60CPPFLAGS +=	-I../libipp-listener/common
61CPPFLAGS +=	-I../libipp-core/common
62CPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APACHEBASE)/include
63CPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APR_BASE)/include
64CPPFLAGS +=	-I$(ADJUNCT_PROTO)$(APRUBASE)/include
65CPPFLAGS +=	-DAPACHE2
66CPPFLAGS +=	-DEAPI
67
68# See: /usr/apache2/2.2/build/config_vars.mk
69# Make sure to build with compatible flags.
70CPPFLAGS +=	-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
71
72MAPFILES =	mapfile httpd-syms.map
73
74LDLIBS +=	-lipp-listener -lipp-core -lpapi -lc
75
76#	SMF manifest
77MANIFEST=       ipp-listener.xml
78ROOTMANIFESTDIR=        $(ROOT)/lib/svc/manifest/application/print
79ROOTMANIFEST=		$(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
80$(ROOTMANIFEST)         := FILEMODE= 444
81
82#	Apache module
83#	LIBLINKS is not a link here, just the bare *.so name
84$(IPPLIBDIR)/$(LIBLINKS):	$(ROOTDIRS)
85
86#	Apache config
87APACHECONFFILE=	$(IPPCONFDIR)/httpd-standalone-ipp.conf
88$(APACHECONFFILE)         := FILEMODE= 644
89LISTENERFILE=	$(LISTENERDIR)/index.html
90$(LISTENERFILE)         := FILEMODE= 444
91
92$(ROOT)/var/lp:=	FILEMODE = 0775
93
94$(IPPLIBDIR)/$(LIBLINKS):=	FILEMODE = 0555
95
96$(ROOTMANIFESTDIR)/% $(IPPLIBDIR)/% $(IPPCONFDIR)/% $(LISTENERDIR)/%:	%
97	$(INS.file)
98
99$(ROOTDIRS):
100	$(INS.dir)
101
102.KEEP_STATE:
103
104all:	$(LIBS)
105
106install:	all $(IPPLIBDIR)/$(LIBLINKS) $(APACHECONFFILE) \
107		$(LISTENERFILE) $(ROOTMANIFEST)
108
109install_h:
110
111lint:
112
113include ../../Makefile.targ
114