python.mk 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Copyright (c) 2006-2011 Nokia Corporation and/or its subsidiary(-ies).
  3. # All rights reserved.
  4. # This component and the accompanying materials are made available
  5. # under the terms of the License "Eclipse Public License v1.0"
  6. # which accompanies this distribution, and is available
  7. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. #
  9. # Initial Contributors:
  10. # Nokia Corporation - initial contribution.
  11. #
  12. # Contributors:
  13. #
  14. # Description:
  15. # Utility makefile
  16. #
  17. # Build Python for Raptor
  18. define b_python
  19. .PHONY:: python$(RAPTOR_PYTHON_DIRVERSION) python
  20. python$(RAPTOR_PYTHON_DIRVERSION):: $(PYINSTALLROOT)/bin/python
  21. all:: python$(RAPTOR_PYTHON_DIRVERSION)
  22. python:: $(RAPTOR_PYTHON_DIRVERSION)
  23. $(call fetch_gbzip,$(PYTHON_TAR),$(PYTHON_TAR_URL))
  24. $(PYINSTALLROOT)/bin/python: $(PYTHON_TAR)
  25. rm -rf $(PYTHON_SOURCEDIR) && \
  26. cd $(OUTPUTPATH) && \
  27. tar -xjf $(PYTHON_TAR) && \
  28. ( \
  29. cd $(PYTHON_SOURCEDIR) && \
  30. CFLAGS="-O3 $(GCCTUNE) -s" ./configure --prefix=$(PYINSTALLROOT) --enable-shared --with-threads --enable-bzip2 && \
  31. $(MAKE) -j8 && $(MAKE) install \
  32. )
  33. CLEANFILES:=$(PYINSTALLROOT)/bin/python
  34. $(cleanlog)
  35. endef