# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)Makefile.sfw 1.1 09/07/17 SMI" # # # lib/libyaz/Makefile.sfw # VER = $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) VER64 = $(VER)-64 TARBALL = $(VER).tar.gz PREFIX = $(ROOT)/usr CONFIGURE_GENERIC = LDFLAGS="$(LDFLAGS)" CONFIGURE_GENERIC += PATH=$(SFW_PATH) CONFIGURE_GENERIC += MAKE="$(CCSMAKE)" PRE_CONFIGURE = CC="$(CC)" PRE_CONFIGURE += CFLAGS="$(CFLAGS)" PRE_CONFIGURE += $(CONFIGURE_GENERIC) PRE_CONFIGURE_64 = CC="$(CC64)" PRE_CONFIGURE_64 += CFLAGS="$(CFLAGS64)" PRE_CONFIGURE_64 += $(CONFIGURE_GENERIC) GENERIC_OPTIONS = --datarootdir="/usr/share" GENERIC_OPTIONS += --includedir=$(CFGINC) GENERIC_OPTIONS += --mandir=$(CFGMAN) GENERIC_OPTIONS += INSTALL="$(INSTALL_PROTO)" GENERIC_OPTIONS += INSTALL_DATA="$(INSTALL_PROTO) -m 444" CONFIGURE_OPTIONS_32 = --bindir=$(CFGBIN) CONFIGURE_OPTIONS_32 += --libdir=$(CFGLIB) CONFIGURE_OPTIONS_32 += $(GENERIC_OPTIONS) CONFIGURE_OPTIONS_64 = --bindir=$(CFGBIN64) CONFIGURE_OPTIONS_64 += --libdir=$(CFGLIB64) CONFIGURE_OPTIONS_64 += $(GENERIC_OPTIONS) include ../Makefile.lib all: all32 test32 install32 all64 test64 install64 all32: $(VER)/config.status (cd $(VER); env - "CFLAGS=$(CFLAGS)" $(CONFIGURE_GENERIC) $(CCSMAKE)) all64: $(VER64)/config.status (cd $(VER64); env - "CFLAGS=$(CFLAGS64)" $(CONFIGURE_GENERIC) $(CCSMAKE)) test32: (cd $(VER); env - $(CCSMAKE) check) test64: (cd $(VER64); env - $(CCSMAKE) check) install: all for pkg in $(COMPONENT_PACKAGES:sh) ; do \ $(SRC)/tools/protofix --pkg $$pkg --perm ; \ done ($(RM) \ $(ROOTBIN)/yaz-icu \ $(ROOTMAN1)/yaz-icu.1 \ $(ROOTLIB)/libyaz*.a \ $(ROOTLIB)/libyaz*.la \ $(ROOTBIN64)/yaz-* \ $(ROOTBIN64)/zoomsh \ $(ROOTLIB64)/libyaz*.a \ $(ROOTLIB64)/libyaz*.la \ $(ROOTLIB64)/pkgconfig/yaz.pc) install32: (cd $(VER); env - $(CCSMAKE) MANSCRIPT=$(COMPONENT_TOP)/sunman-stability DESTDIR=$(ROOT) install) install64: (cd $(VER64); env - $(CCSMAKE) MANSCRIPT=$(COMPONENT_TOP)/sunman-stability DESTDIR=$(ROOT) install) $(VER)/config.status: $(VER)/configure (cd $(VER); env - $(PRE_CONFIGURE) $(SHELL) ./configure $(CONFIGURE_OPTIONS_32)) $(VER64)/config.status: $(VER64)/configure (cd $(VER64); env - $(PRE_CONFIGURE_64) $(SHELL) ./configure $(CONFIGURE_OPTIONS_64)) $(VER)/configure: $(TARBALL) $(GTAR) xzpf $(TARBALL) --no-same-owner $(TOUCH) $(VER)/configure $(VER64)/configure: $(TARBALL) $(MKDIR) -p tmp; (cd tmp; $(GTAR) xzpf ../$(TARBALL) --no-same-owner) $(MV) tmp/$(VER) $(VER64); $(RMDIR) tmp $(TOUCH) $(VER64)/configure clean: -rm -rf $(VER) $(VER64) install_h: include ../Makefile.targ