1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 23 # 24 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 #ident "@(#)Makefile.sfw 1.3 09/06/23 SMI" 28 # 29 30 VER=libtool-1.5.22 31 VER64=$(VER)-64 32 33 include ../Makefile.cmd 34 35 all: all32 all64 36 37 all32: $(VER)/config.status 38 (cd $(VER); env - \ 39 LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \ 40 PATH=$(SFW_PATH) \ 41 MAKE=$(CCSMAKE) \ 42 $(CCSMAKE)) 43 @find . -name core -exec rm -f {} \; 44 45 all64: $(VER64)/config.status 46 (cd $(VER64); env - \ 47 CC=$(CC64) \ 48 CFLAGS="$(CFLAGS64)" \ 49 CPPFLAGS="-m64" \ 50 CXX="g++ -m64" \ 51 CXXFLAGS="-m64" \ 52 FFLAGS="-m64 -w" \ 53 LDFLAGS="-L$(ROOTSFWLIB)/$(MACH64) -L$(ROOTLIB64)" \ 54 LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \ 55 PATH=$(SFW_PATH) \ 56 MAKE=$(CCSMAKE) \ 57 $(CCSMAKE)) 58 59 install: all 60 # install the bits in the proto area 61 cd $(VER); env SRC=$(SRC) \ 62 DESTDIR=$(ROOT) \ 63 BINDIR=$(ROOT)/usr/bin \ 64 PERL=/usr/perl5/bin/perl \ 65 INSTALL="$(SRC)/tools/install-proto -c -m 0555" \ 66 PATH=$(SFW_PATH) \ 67 $(CCSMAKE) install 68 # perform a few post-install fixups 69 $(SHELL) ./install-sfw 70 VER64=$(VER64) MACH64=$(MACH64) $(SHELL) ./install-sfw-64 71 # fix the proto area 72 $(SRC)/tools/protofix --pkg SUNWlibtool --perm 73 $(SRC)/tools/protofix --pkg SUNWltdl --perm 74 75 $(VER)/config.status: $(VER)/configure 76 (cd $(VER); env - \ 77 CC=$(CC) \ 78 PATH=$(SFW_PATH) \ 79 MAKE=$(CCSMAKE) \ 80 ./configure --prefix=/usr \ 81 --disable-static) 82 83 $(VER64)/config.status: $(VER64)/configure 84 (cd $(VER64); env - \ 85 CC=$(CC64) \ 86 CFLAGS="$(CFLAGS64)" \ 87 CPPFLAGS="-m64" \ 88 CXX="g++ -m64" \ 89 CXXFLAGS="-m64" \ 90 FFLAGS="-m64 -w" \ 91 LDFLAGS="-L$(ROOTSFWLIB)/$(MACH64) -L$(ROOTLIB64)" \ 92 PATH=$(SFW_PATH) \ 93 MAKE=$(CCSMAKE) \ 94 ./configure --prefix=/usr \ 95 --disable-static) 96 97 $(VER)/configure: $(VER).tar.gz 98 /usr/bin/gzip -dc $(VER).tar.gz | tar xpf - 99 touch $(VER)/configure 100 101 $(VER64)/configure : $(VER).tar.gz 102 mkdir -p tmp 103 gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -) 104 rm -rf $(VER64) 105 mv tmp/$(VER) $(VER64); rmdir tmp 106 touch $(VER64)/configure 107 108 clean: 109 -rm -rf $(VER) $(VER64) 110 111 include ../Makefile.targ 112