usr/src/lib/python26-pyopenssl/Makefile.sfw
changeset 72 82bde2a81435
parent 71 121736d79438
child 73 73cc228b67a6
equal deleted inserted replaced
71:121736d79438 72:82bde2a81435
     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 # ident	"@(#)Makefile.sfw	1.2	09/04/27 SMI"
       
    27 #
       
    28 
       
    29 VER= $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
       
    30 VER64=$(VER)-64
       
    31 
       
    32 include ../Makefile.lib
       
    33 
       
    34 all: all32 all64
       
    35 
       
    36 all32: $(VER)/setup.py
       
    37 	(cd $(VER); env - \
       
    38 	    CC=$(CC) PATH=$(SFW_PATH) \
       
    39 	    $(PYTHON26) setup.py build)
       
    40 
       
    41 all64: $(VER64)/setup.py
       
    42 	(cd $(VER64); env - \
       
    43 	    CC=$(CC64) "CFLAGS=$(CFLAGS64)" PATH=$(SFW_PATH) \
       
    44 	    $(PYTHON26_64) setup.py build)
       
    45 
       
    46 $(VER)/setup.py: $(VER).tar.gz
       
    47 	mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
       
    48 	mv tmp/$(VER) $(VER); rmdir tmp
       
    49 	touch $(VER)/setup.py
       
    50 
       
    51 $(VER64)/setup.py: $(VER).tar.gz
       
    52 	mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
       
    53 	mv tmp/$(VER) $(VER64); rmdir tmp
       
    54 	touch $(VER64)/setup.py
       
    55 
       
    56 install: all
       
    57 	(cd $(VER); $(PYTHON26) setup.py install --install-platlib=./)
       
    58 	(cd $(VER64); $(PYTHON26_64) setup.py install --install-platlib=./)
       
    59 	VER=$(VER) VER64=$(VER64) $(SHELL) ./install-sfw
       
    60 
       
    61 clean:
       
    62 	-rm -rf $(VER) $(VER64)
       
    63 
       
    64 install_h:
       
    65 
       
    66 include ../Makefile.targ
       
    67