Home | History | Annotate | Download | only in flex
      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.11	09/08/21 SMI"
     29 #
     30 
     31 include ../Makefile.cmd
     32 
     33 VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
     34 TARBALL=$(VER).tar.gz
     35 VER64=$(VER)-64
     36 SONAME=libfl.so.1
     37 
     38 SFW_PATH="$(SPRO_VROOT)/bin:/usr/ccs/bin:/usr/bin:/usr/sfw/bin:$(PATH)"
     39 
     40 all: real-all
     41 
     42 all32: $(VER)/config.status
     43 	(cd $(VER); env - \
     44 	    PATH=$(SFW_PATH) \
     45 	    LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
     46 	    CC=$(CC) \
     47 	    CXX=$(CCC) \
     48 	    "CFLAGS=$(CFLAGS)" \
     49 	    "LDFLAGS=-xildoff" \
     50 	    "SONAME=$(SONAME)" \
     51 	    "MAKE=$(GMAKE)" \
     52 	    $(GMAKE))
     53 
     54 all64: $(VER64)/config.status
     55 	(cd $(VER64); env - \
     56 	    PATH=$(SFW_PATH) \
     57 	    LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
     58 	    CC=$(CC64) \
     59 	    CXX=$(CCC64) \
     60 	    "CFLAGS=$(CFLAGS64)" \
     61 	    "CXXFLAGS=-m64" \
     62 	    "LDFLAGS=-m64 -xildoff" \
     63 	    "SONAME=$(SONAME)" \
     64 	    "MAKE=$(GMAKE)" \
     65 	    $(GMAKE) $(SONAME))
     66 
     67 install: all
     68 	VERS=$(VER) $(SHELL) ./install-sfw
     69 	VERS=$(VER64) MACH64=$(MACH64) $(SHELL) ./install-sfw-64
     70 
     71 real-all: all32 all64
     72 
     73 $(VER)/config.status: $(VER)/configure
     74 	(cd $(VER); env - \
     75 	    PATH=$(SFW_PATH) \
     76 	    CC=$(CC) \
     77 	    CXX=$(CCC) \
     78 	    "CFLAGS=$(CFLAGS)" \
     79 	    "LDFLAGS=-xildoff" \
     80 	    "MAKE=$(GMAKE)" \
     81 	$(SHELL) ./configure --prefix=$(CFGPREFIX))
     82 
     83 $(VER64)/config.status: $(VER64)/configure
     84 	(cd $(VER64); env - \
     85 	    PATH=$(SFW_PATH) \
     86 	    CC=$(CC64) \
     87 	    CXX=$(CCC64) \
     88 	    "CFLAGS=$(CFLAGS64)" \
     89 	    "CXXFLAGS=-m64" \
     90 	    "LDFLAGS=-m64 -xildoff" \
     91 	    "MAKE=$(GMAKE)" \
     92 	$(SHELL) ./configure --prefix=$(CFGPREFIX))
     93 
     94 $(VER)/configure: $(TARBALL)
     95 	mkdir -p tmp; gzip -dc $(TARBALL) | (cd tmp; tar xopf -)
     96 	mv tmp/$(VER) $(VER); rmdir tmp
     97 	(cd $(VER); gpatch -p1 <../patch)
     98 	(cd $(VER); gpatch -p1 <../patch.tests)
     99 	$(TOUCH) $(VER)/configure
    100 
    101 $(VER64)/configure: $(VER).tar.gz
    102 	mkdir -p tmp; gzip -dc $(TARBALL) | (cd tmp; tar xopf -)
    103 	mv tmp/$(VER) $(VER64); rmdir tmp
    104 	(cd $(VER64); gpatch -p1 <../patch)
    105 	(cd $(VER64); gpatch -p1 <../patch.tests)
    106 	$(TOUCH) $(VER64)/configure
    107 
    108 clean:
    109 	-rm -rf $(VER) $(VER64)
    110 
    111 include ../Makefile.targ
    112 
    113 FRC:
    114