CWD=$(shell pwd) XCC_DIR=$(CWD)/xcomp/bin/ XCC=$(XCC_DIR)mingw32-gcc all: config-python-win32 SDL/src/.libs/SDL.dll python24.dll ffmpeg/libavutil/libavutil.a ffmpeg/libavcodec/libavcodec.a ffmpeg/libavformat/libavformat.a python setup.py clean CROSSCOMPILE=1 python setup.py build # -rm -f $@ # zip -rn pyc:pyo $@ LGPL COPYRIGHT orchard -j win32_installer/* -x "*/.*" -x "*/*/.*" include Makefile.config installer: all rm -rf installer CROSSCOMPILE=1 python setup.py install --prefix=installer mv installer/lib/python2.?/site-packages/* installer rm -rf installer/lib cp SDL/src/.libs/SDL.dll installer cp LGPL installer/LGPL.txt cp COPYRIGHT installer/COPYRIGHT.txt cp -R win32_installer/* installer include Makefile.common # --------------------------------------- # --------------------------------------- # MinGW cross compiler # --------------------------------------- $(XCC): install_xcc ./install_xcc # --------------------------------------- # SDL # --------------------------------------- SDL/README: SDL-1.2.9.tar.gz tar xfz $< mv $(subst .tar.gz,,$<) SDL touch $@ SDL/configure: SDL/README cd SDL && PATH=$(CWD)/win32:$(PATH) ./autogen.sh SDL/src/.libs/SDL.dll: SDL/configure $(XCC) cd SDL && PATH=$(PATH):$(XCC_DIR) ./configure --host=mingw32 --enable-shared cd SDL && PATH=$(PATH):$(XCC_DIR) $(MAKE) # --------------------------------------- # Python headers # --------------------------------------- config-python-win32: Python/README $(XCC) rm -f config-python-* cd Python && PATH=$(CWD)/win32:$(PATH):$(XCC_DIR) ./configure --host=mingw32 --with-cxx=mingw32-g++ --enable-shared touch $@ # --------------------------------------- # FFmpeg libraries # --------------------------------------- # Windows ffmpeg/config.mak: $(XCC) cd ffmpeg && PATH=$(CWD)/win32:$(PATH) ./configure --enable-shared --enable-mingw32 --cpu=x86 --enable-memalign-hack --cross-prefix=$(XCC_DIR)/mingw32- --cc=gcc $(FFMPEG_CONFIG_FLAGS) ffmpeg/libavformat/libavformat.a: ffmpeg/config.mak cd ffmpeg/libavformat && $(MAKE) libavformat.a ffmpeg/libavutil/libavutil.a: ffmpeg/config.mak cd ffmpeg/libavutil && $(MAKE) libavutil.a ffmpeg/libavcodec/libavcodec.a: ffmpeg/config.mak cd ffmpeg/libavcodec && $(MAKE) libavcodec.a # --------------------------------------- # FFmpeg module # --------------------------------------- .PHONY: all