2015-02-01 10:16:25 +01:00
|
|
|
#
|
|
|
|
# Copyright 2011-2014 Branimir Karadzic. All rights reserved.
|
|
|
|
# License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
#
|
|
|
|
|
|
|
|
UNAME := $(shell uname)
|
2015-04-10 12:37:34 +02:00
|
|
|
ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin SunOS FreeBSD GNU/kFreeBSD NetBSD OpenBSD))
|
2015-02-01 10:16:25 +01:00
|
|
|
ifeq ($(UNAME),$(filter $(UNAME),Darwin))
|
|
|
|
OS=darwin
|
|
|
|
else
|
2015-04-10 12:37:34 +02:00
|
|
|
ifeq ($(UNAME),$(filter $(UNAME),SunOS))
|
|
|
|
OS=solaris
|
|
|
|
else
|
|
|
|
ifeq ($(UNAME),$(filter $(UNAME),FreeBSD GNU/kFreeBSD NetBSD OpenBSD))
|
|
|
|
OS=bsd
|
|
|
|
else
|
2015-02-01 10:16:25 +01:00
|
|
|
OS=linux
|
|
|
|
endif
|
2015-04-10 12:37:34 +02:00
|
|
|
endif
|
|
|
|
endif
|
2015-02-01 10:16:25 +01:00
|
|
|
else
|
|
|
|
OS=windows
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
|
|
|
|
GENIE=bin/$(OS)/genie
|
|
|
|
|
|
|
|
SILENT?=@
|
|
|
|
|
|
|
|
$(GENIE):
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.$(OS)
|
2015-02-01 10:16:25 +01:00
|
|
|
|
|
|
|
all: $(GENIE)
|
|
|
|
|
|
|
|
clean:
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.$(OS) clean
|
2015-02-01 10:16:25 +01:00
|
|
|
$(SILENT) -rm -rf bin
|
|
|
|
|
|
|
|
rebuild:
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.$(OS) clean all
|
2015-02-01 10:16:25 +01:00
|
|
|
|
|
|
|
release-windows release-darwin: $(GENIE)
|
|
|
|
$(GENIE) release
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.$(OS) clean all
|
2015-02-01 10:16:25 +01:00
|
|
|
$(SILENT) git checkout src/host/version.h
|
|
|
|
|
|
|
|
release-linux: $(GENIE)
|
|
|
|
$(SILENT) $(GENIE) release
|
2015-10-15 11:21:28 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.darwin clean all CC=x86_64-apple-darwin13-clang
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C build/gmake.linux clean all
|
|
|
|
$(SILENT) $(MAKE) -C build/gmake.windows clean all CC=i686-w64-mingw32-gcc
|
2015-02-01 10:16:25 +01:00
|
|
|
$(SILENT) git checkout src/host/version.h
|
|
|
|
|
|
|
|
release: release-$(OS)
|
2015-03-17 11:08:12 +01:00
|
|
|
|
|
|
|
dist: release
|
|
|
|
cp bin/linux/genie ../bx/tools/bin/linux/
|
|
|
|
cp bin/windows/genie.exe ../bx/tools/bin/windows/
|
|
|
|
cp bin/darwin/genie ../bx/tools/bin/darwin/
|