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# 25b0e753ddSGordon Ross# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 26b0e753ddSGordon Ross# 27355b4669Sjacobs 28355b4669SjacobsLIBRARY = mod_ipp.a 29355b4669SjacobsVERS = 30355b4669SjacobsOBJECTS = mod_ipp.o 31355b4669Sjacobs 32355b4669Sjacobsinclude ../../Makefile.lib 33355b4669Sjacobsinclude ../../Makefile.rootfs 34355b4669Sjacobs 35b0e753ddSGordon Ross# These *BASE paths are used ONLY at build time to locate headers. 36b0e753ddSGordon Ross# This builds against Apache 2.2 but the module should work with 37*5f4bac28SGordon Ross# any Apache 2.x version, and APR 1.3 or later. 38b0e753ddSGordon RossAPACHEBASE = /usr/apache2/2.2 39*5f4bac28SGordon RossAPR_BASE = /usr/apr/1.3 40*5f4bac28SGordon RossAPRUBASE = /usr/apr-util/1.3 41b0e753ddSGordon Ross 42b0e753ddSGordon RossIPPCONFDIR = $(ROOT)/etc/lp/ipp 43b0e753ddSGordon RossIPPLIBDIR = $(ROOT)/usr/lib/lp/ipp 44355b4669SjacobsLISTENERDIR = $(ROOT)/var/lp/ipp-listener 45355b4669Sjacobs 46b0e753ddSGordon RossROOTDIRS = $(ROOT)/etc/lp $(IPPCONFDIR) \ 47b0e753ddSGordon Ross $(ROOT)/usr/lib/lp $(IPPLIBDIR) \ 48355b4669Sjacobs $(ROOT)/var/lp $(LISTENERDIR) 49355b4669Sjacobs 50b0e753ddSGordon 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 62b0e753ddSGordon RossCPPFLAGS += -I$(ADJUNCT_PROTO)$(APACHEBASE)/include 63b0e753ddSGordon RossCPPFLAGS += -I$(ADJUNCT_PROTO)$(APR_BASE)/include 64b0e753ddSGordon RossCPPFLAGS += -I$(ADJUNCT_PROTO)$(APRUBASE)/include 65b0e753ddSGordon RossCPPFLAGS += -DAPACHE2 66355b4669SjacobsCPPFLAGS += -DEAPI 67f808c858Sraf 68b0e753ddSGordon Ross# See: /usr/apache2/2.2/build/config_vars.mk 69b0e753ddSGordon Ross# Make sure to build with compatible flags. 70b0e753ddSGordon RossCPPFLAGS += -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 71b0e753ddSGordon Ross 72b0e753ddSGordon 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 83b0e753ddSGordon Ross# LIBLINKS is not a link here, just the bare *.so name 84b0e753ddSGordon Ross$(IPPLIBDIR)/$(LIBLINKS): $(ROOTDIRS) 85355b4669Sjacobs 86355b4669Sjacobs# Apache config 87b0e753ddSGordon 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 94b0e753ddSGordon Ross$(IPPLIBDIR)/$(LIBLINKS):= FILEMODE = 0555 95355b4669Sjacobs 96b0e753ddSGordon Ross$(ROOTMANIFESTDIR)/% $(IPPLIBDIR)/% $(IPPCONFDIR)/% $(LISTENERDIR)/%: % 97355b4669Sjacobs $(INS.file) 98355b4669Sjacobs 99355b4669Sjacobs$(ROOTDIRS): 100355b4669Sjacobs $(INS.dir) 101355b4669Sjacobs 102355b4669Sjacobs.KEEP_STATE: 103355b4669Sjacobs 104355b4669Sjacobsall: $(LIBS) 105355b4669Sjacobs 106b0e753ddSGordon Rossinstall: all $(IPPLIBDIR)/$(LIBLINKS) $(APACHECONFFILE) \ 107355b4669Sjacobs $(LISTENERFILE) $(ROOTMANIFEST) 108355b4669Sjacobs 109355b4669Sjacobsinstall_h: 110355b4669Sjacobs 111355b4669Sjacobslint: 112355b4669Sjacobs 113355b4669Sjacobsinclude ../../Makefile.targ 114