Makefile
changeset 5 6dec159540ee
parent 4 e3a923bd3d56
child 6 862080d48ef2
equal deleted inserted replaced
4:e3a923bd3d56 5:6dec159540ee
    29 mkdir $(1)
    29 mkdir $(1)
    30 tar --strip-components=1 -C $(1) -xvjf $(tmp)/`basename $(1)`.tar.bz2
    30 tar --strip-components=1 -C $(1) -xvjf $(tmp)/`basename $(1)`.tar.bz2
    31 endef
    31 endef
    32 
    32 
    33 define get_src_http
    33 define get_src_http
    34 dld=$(distfiles)/$(2);( ( [ -f $$dld ] || wget $(1)/$(2) -O $$dld ) && ( [ ! -f $$dld.md5 ] && md5sum $$dld > $$dld.md5 || md5sum -c $$dld.md5 ) ) &&
    34 dld=$(distfiles)/`echo $(2) | tr ' ()' '___'`;( ( [ -f $$dld ] || wget $(1)/$(2) -O $$dld ) && ( [ ! -f $$dld.md5 ] && (cd $(distfiles);md5sum `basename $$dld`) > $$dld.md5 || (cd $(distfiles);md5sum -c `basename $$dld.md5`) ) ) &&
    35 endef
    35 endef
    36 
    36 
    37 define get_src_pypi
    37 define get_src_pypi
    38 $(call get_src_http,http://pypi.python.org/packages/$(1),$(2))
    38 $(call get_src_http,http://pypi.python.org/packages/$(1),$(2))
    39 endef
    39 endef
    44 
    44 
    45 all: Beremiz-$(version).exe
    45 all: Beremiz-$(version).exe
    46 
    46 
    47 mingwdir=build/mingw
    47 mingwdir=build/mingw
    48 mingw: 
    48 mingw: 
       
    49 	rm -rf $(mingwdir)
    49 	mkdir -p $(mingwdir)
    50 	mkdir -p $(mingwdir)
    50 	# windows.h
    51 	# windows.h
    51 	$(call get_src_sf,mingw/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.17,w32api-3.17-2-mingw32-dev.tar.lzma)\
    52 	$(call get_src_sf,mingw/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.17,w32api-3.17-2-mingw32-dev.tar.lzma)\
    52 	tar -C $(mingwdir) --lzma -xvf $$dld
    53 	tar -C $(mingwdir) --lzma -xvf $$dld
    53 	# mingw runtime
    54 	# mingw runtime
    91 wine = WINEPREFIX=$(tmp) wine
    92 wine = WINEPREFIX=$(tmp) wine
    92 pydir = build/python
    93 pydir = build/python
    93 pysite = $(pydir)/Lib/site-packages
    94 pysite = $(pydir)/Lib/site-packages
    94 
    95 
    95 python:
    96 python:
       
    97 	rm -rf $(pydir)
    96 	mkdir -p $(pydir)
    98 	mkdir -p $(pydir)
    97 	# Python
    99 	# Python
    98 	$(call get_src_http,http://www.python.org/ftp/python/2.7.2,python-2.7.2.msi)\
   100 	$(call get_src_http,http://www.python.org/ftp/python/2.7.2,python-2.7.2.msi)\
    99 	$(msiexec) /qn /a $$dld TARGETDIR=.\\$(pydir)
   101 	$(msiexec) /qn /a $$dld TARGETDIR=.\\$(pydir)
   100 	
   102