Makefile revision 10207:87c40ea3fc4b
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY =		mod_ipp.a
27VERS =
28OBJECTS = mod_ipp.o
29
30include ../../Makefile.lib
31include ../../Makefile.rootfs
32
33APACHEMODDIR =	$(ROOT)/usr/apache/libexec
34APACHECONFDIR =	$(ROOT)/etc/apache
35LISTENERDIR =	$(ROOT)/var/lp/ipp-listener
36
37ROOTDIRS =	$(ROOT)/usr/apache $(APACHEMODDIR) $(APACHECONFDIR) \
38		$(ROOT)/var/lp $(LISTENERDIR)
39
40$(ROOT)/var/lp:=	DIRMODE = 775
41$(ROOT)/var/lp:=	FILEMODE = 775
42
43LIBS =			$(DYNLIB)
44
45SRCS = $(OBJECTS:%.o = %.c)
46
47
48CFLAGS +=	$(CCVERBOSE)
49CPPFLAGS +=	-I../libipp-listener/common
50CPPFLAGS +=	-I../libipp-core/common
51CPPFLAGS +=	-I/usr/apache/include
52CPPFLAGS +=	-DEAPI
53ZDEFS =		$(ZNODEFS)
54
55MAPFILES =	mapfile
56
57LDLIBS +=	-lipp-listener -lipp-core -lpapi -lc
58
59#	SMF manifest
60MANIFEST=       ipp-listener.xml
61ROOTMANIFESTDIR=        $(ROOT)/var/svc/manifest/application/print
62ROOTMANIFEST=		$(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
63$(ROOTMANIFEST)         := FILEMODE= 444
64
65#	Apache module
66$(APACHEMODDIR)/$(LIBLINKS):	$(ROOTDIRS)
67
68#	Apache config
69APACHECONFFILE=	$(APACHECONFDIR)/httpd-standalone-ipp.conf
70$(APACHECONFFILE)         := FILEMODE= 644
71LISTENERFILE=	$(LISTENERDIR)/index.html
72$(LISTENERFILE)         := FILEMODE= 444
73
74$(ROOT)/var/lp:=	FILEMODE = 0775
75
76$(APACHEMODDIR)/$(LIBLINKS):=	FILEMODE = 0555
77
78$(ROOTMANIFESTDIR)/% $(APACHEMODDIR)/% $(APACHECONFDIR)/% $(LISTENERDIR)/%:	%
79	$(INS.file)
80
81$(ROOTDIRS):
82	$(INS.dir)
83
84.KEEP_STATE:
85
86all:	$(LIBS)
87
88install:	all $(APACHEMODDIR)/$(LIBLINKS) $(APACHECONFFILE) \
89		$(LISTENERFILE) $(ROOTMANIFEST)
90
91install_h:
92
93lint:
94
95include ../../Makefile.targ
96