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 # 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 27 # 28 #ident "@(#)Makefile.sfw 1.12 09/10/07 SMI" 29 # 30 31 include ../Makefile.cmd 32 33 VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) 34 VER64=$(VER)-64 35 36 TARBALL=$(VER).tar.gz 37 38 SFW_PATH="$(SPRO_VROOT)/bin:/usr/perl5/bin:/usr/sfw/bin:$(PATH)" 39 40 LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -R/usr/gnu/lib -L/usr/gnu/lib 41 LD_OPTIONS64=-M $(SRC)/cmd/mapfile_noexstk -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64) 42 43 all: all32 all64 44 45 all32: $(VER)/config.status 46 (cd $(VER); env - \ 47 CC=$(CC) \ 48 CFLAGS="`echo $(CFLAGS)` -xc99=all,no_lib -xCC" \ 49 LD_OPTIONS="`echo $(LD_OPTIONS)`" \ 50 PATH=$(SFW_PATH) \ 51 MAKE=$(GMAKE) $(GMAKE)) 52 53 all64: $(VER64)/config.status 54 (cd $(VER64); env - \ 55 CC=$(CC64) \ 56 CFLAGS="`echo $(CFLAGS64)` -xc99=all,no_lib -xCC" \ 57 LD_OPTIONS="`echo $(LD_OPTIONS64)`" \ 58 PATH=$(SFW_PATH) \ 59 MAKE=$(GMAKE) $(GMAKE)) 60 61 install: all 62 PKGVERS=$(VER) \ 63 PKGVERS64=$(VER64) \ 64 MACH32=$(MACH32) \ 65 MACH64=$(MACH64) \ 66 INTEL_BLD=$(INTEL_BLD) \ 67 $(SHELL) ./install-sfw 68 69 $(VER)/config.status: $(VER)/configure 70 (cd $(VER); env - \ 71 CC=$(CC) \ 72 CFLAGS="`echo $(CFLAGS)` -xc99=all,no_lib -xCC" \ 73 LD_OPTIONS="`echo $(LD_OPTIONS)`" \ 74 PATH=$(SFW_PATH) \ 75 MAKE=$(GMAKE) \ 76 ./configure --prefix=$(CFGPREFIX) \ 77 --with-system-readline \ 78 --with-x=no \ 79 --with-curses \ 80 --with-libexpat-prefix=/usr/lib) 81 82 $(VER64)/config.status: $(VER64)/configure 83 (cd $(VER64); env - \ 84 CC=$(CC64) \ 85 CFLAGS="`echo $(CFLAGS64)` -xc99=all,no_lib -xCC" \ 86 LD_OPTIONS="`echo $(LD_OPTIONS64)`" \ 87 PATH=$(SFW_PATH) \ 88 MAKE=$(GMAKE) \ 89 ./configure --prefix=$(CFGPREFIX) \ 90 --with-system-readline \ 91 --with-x=no \ 92 --with-curses \ 93 --with-libexpat-prefix=/usr/lib/$(MACH64)) 94 95 $(VER)/configure: $(TARBALL) 96 /usr/bin/gzip -dc $(TARBALL) | $(GTAR) xpf - --no-same-owner 97 touch $(VER)/configure 98 (cd $(VER); \ 99 gpatch -p1 < ../gdb.solib-svr4.patch; \ 100 gpatch -p1 < ../gdb.auxv.patch) 101 102 $(VER64)/configure: $(TARBALL) 103 rm -rf tmp; mkdir tmp 104 /usr/bin/gzip -dc $(TARBALL) | (cd tmp; $(GTAR) xpf - --no-same-owner) 105 mv tmp/$(VER) $(VER64); rmdir tmp 106 touch $(VER64)/configure 107 (cd $(VER64); \ 108 gpatch -p1 < ../gdb.solib-svr4.patch; \ 109 gpatch -p1 < ../gdb.auxv.patch) 110 111 clean: 112 -rm -rf $(VER) $(VER64) 113 114 include ../Makefile.targ 115 116 FRC: 117