mame/3rdparty/genie/makefile

68 lines
1.8 KiB
Makefile
Raw Normal View History

#
# Copyright 2011-2014 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
UNAME := $(shell uname)
ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin SunOS FreeBSD GNU/kFreeBSD NetBSD OpenBSD GNU))
ifeq ($(UNAME),$(filter $(UNAME),Darwin))
OS=darwin
else
ifeq ($(UNAME),$(filter $(UNAME),SunOS))
OS=solaris
else
ifeq ($(UNAME),$(filter $(UNAME),FreeBSD GNU/kFreeBSD NetBSD OpenBSD))
OS=bsd
else
OS=linux
endif
endif
endif
else
OS=windows
endif
.PHONY: release
GENIE=bin/$(OS)/genie
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
PROJECT_TYPE?=gmake
SILENT?=@
$(GENIE):
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).$(OS)
2016-06-08 19:36:57 +02:00
all: $(SILENT) $(GENIE)
clean:
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).$(OS) clean
$(SILENT) -rm -rf bin
2016-06-08 19:36:57 +02:00
projgen:
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(GENIE) --to=../build/$(PROJECT_TYPE).windows --os=windows $(PROJECT_TYPE)
$(SILENT) $(GENIE) --to=../build/$(PROJECT_TYPE).linux --os=linux $(PROJECT_TYPE)
$(SILENT) $(GENIE) --to=../build/$(PROJECT_TYPE).darwin --os=macosx --platform=universal32 $(PROJECT_TYPE)
$(SILENT) $(GENIE) --to=../build/$(PROJECT_TYPE).freebsd --os=bsd $(PROJECT_TYPE)
2016-06-08 19:36:57 +02:00
rebuild:
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).$(OS) clean all
release-windows release-darwin: $(GENIE)
$(GENIE) release
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).$(OS) clean all
$(SILENT) git checkout src/host/version.h
release-linux: $(GENIE)
$(SILENT) $(GENIE) release
Sync with GENie upstream revision ce9f3c5 (#6262) * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Print generated filenames as quoted string Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Remove '...' after filename Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Fixed release script. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Updated README. Signed-off-by: Julian Sikorski <belegdol+github@gmail.com> * Update scripts.c Co-authored-by: Christian Helmich <kagekirin@gmail.com> Co-authored-by: Johan Sköld <johan@skold.cc> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2020-02-05 23:21:10 +01:00
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).darwin clean all CC=x86_64-apple-darwin15-clang
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).linux clean all
$(SILENT) $(MAKE) -C build/$(PROJECT_TYPE).windows clean all CC=x86_64-w64-mingw32-gcc
$(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/