Home | History | Annotate | Download | only in wxwidgets
      1 # CDDL HEADER START
      2 #
      3 # The contents of this file are subject to the terms of the
      4 # Common Development and Distribution License (the "License").
      5 # You may not use this file except in compliance with the License.
      6 #
      7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      8 # or http://www.opensolaris.org/os/licensing.
      9 # See the License for the specific language governing permissions
     10 # and limitations under the License.
     11 #
     12 # When distributing Covered Code, include this CDDL HEADER in each
     13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     14 # If applicable, add the following below this CDDL HEADER, with the
     15 # fields enclosed by brackets "[]" replaced with your own identifying
     16 # information: Portions Copyright [yyyy] [name of copyright owner]
     17 #
     18 # CDDL HEADER END
     19 #
     20 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     21 # Use is subject to license terms.
     22 #
     23 #pragma ident	"@(#)Makefile.sfw	1.5	08/09/24 SMI"
     24 
     25 include ../Makefile.lib
     26 
     27 VER =           $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
     28 TARBALL =       $(VER).tar.bz2
     29 
     30 VER64=$(VER)-64
     31 
     32 PREFIX=/usr
     33 LDFLAGS= -L$(PREFIX)/lib -R$(PREFIX)/lib -lCstd
     34 EXTRA_LDFLAGS64= -L$(PREFIX)/lib/$(MACH64) -R$(PREFIX)/lib/$(MACH64) -lCstd
     35 
     36 CCC += -norunpath
     37 CCC64 += -norunpath
     38 
     39 CONFIGURE_OPTIONS += --with-gtk
     40 CONFIGURE_OPTIONS += --enable-gtk2
     41 CONFIGURE_OPTIONS += --enable-unicode
     42 CONFIGURE_OPTIONS += --enable-mimetype
     43 CONFIGURE_OPTIONS += --enable-gui
     44 CONFIGURE_OPTIONS += --enable-xrc
     45 CONFIGURE_OPTIONS += --with-subdirs
     46 CONFIGURE_OPTIONS += --with-expat
     47 CONFIGURE_OPTIONS += --with-sdl
     48 CONFIGURE_OPTIONS += --without-gnomeprint
     49 CONFIGURE_OPTIONS += --without-gnomevfs
     50 CONFIGURE_OPTIONS += --with-opengl
     51 CONFIGURE_OPTIONS += --without-libmpack
     52 
     53 # Build wxwidgets
     54 wxwidgets: $(VER)/config.status
     55 	(cd $(VER); env - "CFLASG=$(CFLAGS) $(XREGSFLAG) $(LARGEFILES)" \
     56 	    "CC=$(CC)" \
     57 	    "CXX=$(CCC)" \
     58 	    "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
     59 	    "LDFLAGS=$(LDFLAGS)" \
     60 	    PATH=$(SFW_PATH) \
     61 	    MAKE=$(GMAKE) \
     62 	    $(GMAKE))
     63 
     64 wxwidgets64: $(VER64)/config.status
     65 	(cd $(VER64); env - "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) $(LARGEFILES)" \
     66 	    "CC=$(CC64)" \
     67 	    "CXX=$(CCC64)" \
     68         "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk -z ignore" \
     69 	"LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
     70 	PATH=$(SFW_PATH) \
     71 	MAKE=$(GMAKE) \
     72 	PKG_CONFIG_PATH="/usr/lib/64/pkgconfig/" \
     73 	$(GMAKE))
     74 
     75 COMPAT_VERSION= 5
     76 
     77 # override the defaults because -messages=no%anachronism and
     78 # -features=no%conststrings cause C++ linking to fail
     79 sparc_CCFLAGS = -compat=$(COMPAT_VERSION) $(CCFLAGS_GENERIC)
     80 sparcv9_CCFLAGS = $(sparcv9_XARCH) -dalign -compat=5 $(CCFLAGS_GENERIC)
     81 i386_CCFLAGS = -compat=$(COMPAT_VERSION) $(CCFLAGS_GENERIC)
     82 amd64_CCFLAGS = $(amd64_XARCH) -compat=5 $(CCFLAGS_GENERIC)
     83 
     84 all: wxwidgets wxwidgets64 contrib32 contrib64
     85 
     86 install: all
     87 	$(SHELL) ./install-sfw 
     88 	MACH64=$(MACH64) $(SHELL) ./install-sfw-64
     89 
     90 $(VER)/config.status: $(VER)/configure
     91 	(cd $(VER); env - "CC=$(CC)" \
     92 	    "CFLAGS=$(CPPFLAGS) $(CFLAGS)" \
     93 	    "CPP=$(CC) $(CFLAGS) $(CPPFLAGS) -E" \
     94 	    "CXX=$(CCC)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS)" \
     95 	    "LDFLAGS=$(LDFLAGS)" \
     96 	    "CXXLDFLAGS=$(LDFLAGS) -norunpath" \
     97 	    "CXXLD=$(CCC) $(CCFLAGS) $(LDFLAGS)" \
     98 	    "PATH=$(SFW_PATH)" \
     99 	    "MAKE=$(GMAKE)" \
    100 	    ./configure $(CONFIGURE_OPTIONS))
    101  
    102 $(VER64)/config.status: $(VER64)/configure
    103 	(cd $(VER64); \
    104             env - "CC=$(CC64)" "CFLAGS=$(CPPFLAGS) $(CFLAGS64)" \
    105             "CPP=$(CC64) $(CFLAGS64) $(CPPFLAGS) -E" \
    106             "CXX=$(CCC64)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS64)" \
    107             "CXXCPP=$(CCC64) $(CPPFLAGS) $(CCFLAGS64) -E" \
    108             "LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
    109             "CXXLDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
    110             "CXXLD=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
    111             "CXXLINKLIB=$(CCC64) $(CCFLAGS64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
    112   	    PATH=$(SFW_PATH) \
    113 	    MACH64=$(MACH64) \
    114 	    MAKE=$(GMAKE) \
    115 	    PKG_CONFIG_PATH="/usr/lib/64/pkgconfig" \
    116 	    ./configure $(CONFIGURE_OPTIONS))
    117 
    118 $(VER)/configure: $(VER).tar.gz
    119 	gzip -dc $(VER).tar.gz | $(GTAR) xopf - --no-same-owner
    120 	(cd $(VER) \
    121 	; gpatch -p0 < ../Patches/wxwidgets-02-detach.diff )
    122 	touch $(VER)/configure
    123 
    124 $(VER64)/configure: $(VER).tar.gz
    125 	mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; $(GTAR) xopf - --no-same-owner)
    126 	mv tmp/$(VER) $(VER64); rmdir tmp
    127 	(cd $(VER64) \
    128 	; gpatch -p0 < ../Patches/wxwidgets-02-detach.diff )
    129 	touch $(VER64)/configure
    130 
    131 # contrib target compiles all the stuff in the contrib hierarchy
    132 # that requires compilation.
    133 
    134 contrib32:
    135 	(cd $(VER)/contrib; \
    136 	    env - "CC=$(CC)" \
    137 	    "CXX=$(CCC)" \
    138 	    MAKE=$(GMAKE) \
    139 	    $(GMAKE))
    140 
    141 contrib64:
    142 	(cd $(VER64)/contrib; \
    143 	    env - "CC=$(CC64)" \
    144 	    "CXX=$(CCC64)" \
    145 	    MAKE=$(GMAKE) \
    146 	    $(GMAKE))
    147 
    148 clean:
    149 	-rm -rf $(VER) $(VER64)
    150 
    151 install_h:
    152 
    153 include ../Makefile.targ
    154