Project: Gfire
Code Location: http://my-svn.assembla.com/svn/gfire/trunk/trunk
Browse
/
Download File
Makefile.mingw
GFIRE_DIR = .
include mingw.mak

GFIRE_VERSION_STRING = `cat ./VERSION`
GFIRE_VERSION_SUFFIX = `awk '{split($$1,array,"\\\.|-"); print array[4];}' VERSION`
GFIRE_VERSION_PATCH = `awk '{split($$1,array,"\\\.|-"); print array[3];}' VERSION`
GFIRE_VERSION_MINOR = `awk '{split($$1,array,"\\\.|-"); print array[2];}' VERSION`
GFIRE_VERSION_MAJOR = `awk '{split($$1,array,"\\\.|-"); print array[1];}' VERSION`

SUBDIRS = src po data pixmaps

.PHONY: all clean installer

all: gfire_config_win.h
	@if builtin type -p svnversion &> /dev/null; then \
		svnversion | sed 's/\([0-9]\+:\)\?\([0-9]\+\)P\?M\?S\?/\2/' > REV ; \
	elif [ ! -e REV ]; then \
		echo "0" > REV ; \
	fi
	@list='${SUBDIRS}'; for subdir in $$list; do \
		(cd $$subdir && $(MAKE) -f Makefile.mingw all) || exit 1; \
	done;

clean:
	@list='${SUBDIRS}'; for subdir in $$list; do \
		(cd $$subdir && $(MAKE) -f Makefile.mingw clean) || exit 1; \
	done;

distclean: clean
	rm -rf ${WIN32_INSTALL_DIR}
	rm -rf ${WIN32_INSTALL_DIR_DEBUG}
	rm -f pidgin-gfire-$(GFIRE_VERSION_STRING)-dbgsym.zip
	rm -f pidgin-gfire-$(GFIRE_VERSION_STRING).exe
	rm -f pidgin-gfire-$(GFIRE_VERSION_STRING).zip

install: all
	@list='${SUBDIRS}'; for subdir in $$list; do \
		(cd $$subdir && $(MAKE) -f Makefile.mingw install) || exit 1; \
	done;
	cd ${WIN32_INSTALL_DIR_DEBUG} && zip -ru ../pidgin-gfire-`cat ../VERSION`-dbgsym.zip *

installer: installer-gui installer-zip

installer-gui: install VERSION
	${MAKENSIS} -V3 -DGFIRE_VERSION="$(GFIRE_VERSION_STRING)" -DGFIRE_INSTALL_DIR="${WIN32_INSTALL_DIR}" ${GFIRE_DIR}/nsis/gfire-installer.nsi
	#${MAKENSIS} ${GFIRE_DIR}/nsis/gfire-installer.nsi

installer-zip: install VERSION
	cd ${WIN32_INSTALL_DIR} && zip -ru ../pidgin-gfire-`cat ../VERSION`.zip *