# Toplevel Makefile for Mac OS X build of PasswordSafe

include version.wx
export VER_MAJOR
export VER_MINOR
export VER_REV
export VER_SPECIAL
export RELEASENUM := $(VER_MAJOR).$(VER_MINOR)
export RELEASE_SPECIAL := $(VER_SPECIAL)
export RELEASENAME := $(RELEASENUM)$(RELEASE_SPECIAL)


all clean unicodedebug unicoderelease:
	$(MAKE) -C src/os/mac $@
	$(MAKE) -C src/core $@
	$(MAKE) -C src/ui/wxWidgets $@

debug:
	$(MAKE) unicodedebug

release:
	$(MAKE) unicoderelease

reallyclean:
	$(MAKE) clean CONFIG=unicodebug
	$(MAKE) clean CONFIG=unicorelease

dist:
	$(MAKE) -C install/macosx

.PHONY:	all clean reallyclean debug release unicodedebug unicoderelease dist
# Local variables:
# mode: makefile
# End:
ifndef VER_SPECIAL
VER_SPECIAL = OSX
endif

src/ui/wxWidgets/version.h: version.wx Misc/mkversion.pl src/ui/wxWidgets/version.in
ifdef VER_REV
	@Misc/mkversion.pl MAJOR=$(VER_MAJOR) MINOR=$(VER_MINOR) REV=$(VER_REV) SPECIAL=$(VER_SPECIAL) src/ui/wxWidgets/version.in $@
else
	@Misc/mkversion.pl MAJOR=$(VER_MAJOR) MINOR=$(VER_MINOR) SPECIAL=$(VER_SPECIAL) src/ui/wxWidgets/version.in $@
endif
