summaryrefslogblamecommitdiffstats
path: root/python/Makefile
blob: 353880126ccba817da88d430efe5d01e907f5528 (plain) (tree)
1
2
3
4
5
6
7
8
9


              
                             
                              



                                   
          



                                                                                  
           





                                                                                    







                                                                                                                                               



                                                                                                                       
                                                                                                                                                 


                      



                                       




                                                                                           

                                          



                                           

                                          








                                            

VERSION=2.7.17
VERSION3=3.8.0
INSTALL_PATH=`pwd`/../output2
INSTALL_PATH3=`pwd`/../output3

make: download
	echo "Create static python"

download: 
	echo "Download"
	wget -c https://www.python.org/ftp/python/$(VERSION)/Python-$(VERSION).tgz
	tar -xvf Python-$(VERSION).tgz

download3: 
	echo "Download"
	wget -c https://www.python.org/ftp/python/$(VERSION3)/Python-$(VERSION3).tgz
	tar -xvf Python-$(VERSION3).tgz

configure:
	echo "Configure"
	#dynamic
	#cd ./Python-$(VERSION); ./configure --enable-shared --prefix=$(INSTALL_PATH)
	#static
	#cd ./Python-$(VERSION); ./configure CFLAGS="-fPIC" LDFLAGS="-static" --disable-shared --prefix=$(INSTALL_PATH)
	cd ./Python-$(VERSION); ./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-fPIC -static" --disable-shared --prefix=$(INSTALL_PATH)

configure3:
	echo "Configure"
	#dynamic
	#cd ./Python-$(VERSION); ./configure --enable-shared --prefix=$(INSTALL_PATH)
	#static
	#cd ./Python-$(VERSION); ./configure CFLAGS="-fPIC" LDFLAGS="-static" --disable-shared --prefix=$(INSTALL_PATH)
	cd ./Python-$(VERSION3); ./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-fPIC -static" --disable-shared --prefix=$(INSTALL_PATH3)

compile:
	echo "Compile"
	cd ./Python-$(VERSION);make -j4

compile3:
	echo "Compile"
	cd ./Python-$(VERSION3);make -j4 CFLAGS="-fPIC" LDFLAGS="-static" LINKFORSHARED=" "
	#cd ./Python-$(VERSION3);make -j4

install:
	echo "Install"
	mkdir -p $(INSTALL_PATH)
	#export PYTHONHOME=$(INSTALL_PATH)
	cd ./Python-$(VERSION);make install

install3:
	echo "Install"
	mkdir -p $(INSTALL_PATH3)
	#export PYTHONHOME=$(INSTALL_PATH)
	cd ./Python-$(VERSION3);make install

clean:
	echo "Clean"
	cd ./Python-$(VERSION);make clean

clean3:
	echo "Clean"
	cd ./Python-$(VERSION3);make clean