sbsv2/raptor/util/python.mk
changeset 625 a1925fb7753a
parent 590 360bd6b35136
child 641 8dd670a9f34f
equal deleted inserted replaced
624:f70b728ea30c 625:a1925fb7753a
     1 #
     1 #
     2 # Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 # Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     3 # All rights reserved.
     4 # This component and the accompanying materials are made available
     4 # This component and the accompanying materials are made available
     5 # under the terms of the License "Eclipse Public License v1.0"
     5 # under the terms of the License "Eclipse Public License v1.0"
     6 # which accompanies this distribution, and is available
     6 # which accompanies this distribution, and is available
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
    15 # Utility makefile 
    15 # Utility makefile 
    16 #
    16 #
    17 
    17 
    18 # Build Python for Raptor
    18 # Build Python for Raptor
    19 
    19 
    20 RAPTOR_PYTHON_VER:=2.6.2
    20 RAPTOR_PYTHON_VER:=2.7
    21 
    21 
    22 PYTHON_SOURCEDIR:=$(OUTPUTPATH)/Python-$(RAPTOR_PYTHON_VER)
    22 PYTHON_SOURCEDIR:=$(OUTPUTPATH)/Python-$(RAPTOR_PYTHON_VER)
    23 PYTHON_TAR:=$(SBS_HOME)/util/ext/Python-$(RAPTOR_PYTHON_VER).tgz
    23 PYTHON_TAR:=$(SBS_HOME)/util/ext/Python-$(RAPTOR_PYTHON_VER).tar.bz2
    24 PYINSTALLROOT:=$(INSTALLROOT)/python$(subst .,,$(RAPTOR_PYTHON_VER))
    24 PYINSTALLROOT:=$(INSTALLROOT)/python$(subst .,,$(RAPTOR_PYTHON_VER))
    25 
    25 
    26 define b_python
    26 define b_python
    27 .PHONY:: python
    27 .PHONY:: python
    28 
    28 
    31 python: $(PYINSTALLROOT)/bin/python
    31 python: $(PYINSTALLROOT)/bin/python
    32 	
    32 	
    33 $(PYINSTALLROOT)/bin/python: $(PYTHON_TAR) 
    33 $(PYINSTALLROOT)/bin/python: $(PYTHON_TAR) 
    34 	rm -rf $(PYTHON_SOURCEDIR) && \
    34 	rm -rf $(PYTHON_SOURCEDIR) && \
    35 	cd $(OUTPUTPATH) && \
    35 	cd $(OUTPUTPATH) && \
    36 	tar -xzf $(PYTHON_TAR) && \
    36 	tar -xjf $(PYTHON_TAR) && \
    37 	(  \
    37 	(  \
    38 	cd $(PYTHON_SOURCEDIR) && \
    38 	cd $(PYTHON_SOURCEDIR) && \
    39 	CFLAGS="-O3 $(GCCTUNE) -s" ./configure --prefix=$(PYINSTALLROOT) --enable-shared --with-threads && \
    39 	CFLAGS="-O3 $(GCCTUNE) -s" ./configure --prefix=$(PYINSTALLROOT) --enable-shared --with-threads && \
    40 	$(MAKE) -j8 && $(MAKE) install \
    40 	$(MAKE) -j8 && $(MAKE) install \
    41 	)
    41 	)
       
    42 
       
    43 CLEANFILES:=$(PYINSTALLROOT)/bin/python
       
    44 $(cleanlog)
       
    45 
    42 endef
    46 endef
    43 
    47 
    44 $(eval $(b_python))
    48 $(eval $(b_python))
    45 
    49