diff options
| author | Yuichiro MASUI <[email protected]> | 2012-12-16 01:56:03 +0900 |
|---|---|---|
| committer | Yuichiro MASUI <[email protected]> | 2012-12-16 01:56:03 +0900 |
| commit | 06d242ae430ad37fd88fe6490980121ee26a1283 (patch) | |
| tree | b9326ec83c57de85381b73705f5cd55deaecc4f3 /Makefile | |
| parent | f2d3c4d2f7361cbd5e246f78630cca919e342673 (diff) | |
| download | mruby-06d242ae430ad37fd88fe6490980121ee26a1283.tar.gz mruby-06d242ae430ad37fd88fe6490980121ee26a1283.zip | |
Moved some building script from GNU make to Ruby script
Added minirake what's Rake subset
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index a70938373..000000000 --- a/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# Makefile description. -# basic build file for mruby - -# compiler, linker (gcc), archiver, parser generator -export CC = gcc -export LL = gcc -export AR = ar -export YACC = bison - -MRUBY_ROOT := $(realpath .) - -ifeq ($(strip $(ENABLE_GEMS)),) - # by default GEMs are deactivated - ENABLE_GEMS = false -endif - -ifeq ($(strip $(ACTIVE_GEMS)),) - # the default file which contains the active GEMs - ACTIVE_GEMS = GEMS.active -endif - -ifeq ($(strip $(COMPILE_MODE)),) - # default compile option - COMPILE_MODE = debug -endif - -ifeq ($(COMPILE_MODE),debug) - CFLAGS = -g -O3 -else ifeq ($(COMPILE_MODE),release) - CFLAGS = -O3 -else ifeq ($(COMPILE_MODE),small) - CFLAGS = -Os -endif - -ALL_CFLAGS = -Wall -Werror-implicit-function-declaration $(CFLAGS) -ifeq ($(OS),Windows_NT) - MAKE_FLAGS = --no-print-directory CC=$(CC) LL=$(LL) ALL_CFLAGS='$(ALL_CFLAGS)' LDFLAGS='$(LDFLAGS)' ENABLE_GEMS='$(ENABLE_GEMS)' ACTIVE_GEMS='$(ACTIVE_GEMS)' MRUBY_ROOT='$(MRUBY_ROOT)' -else - MAKE_FLAGS = --no-print-directory CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)' LDFLAGS='$(LDFLAGS)' ENABLE_GEMS='$(ENABLE_GEMS)' ACTIVE_GEMS='$(ACTIVE_GEMS)' MRUBY_ROOT='$(MRUBY_ROOT)' -endif - -############################## -# internal variables - -export MSG_BEGIN = @for line in -export MSG_END = ; do echo "$$line"; done - -export CP := cp -export RM_F := rm -f -export CAT := cat - -############################## -# generic build targets, rules - -.PHONY : all -all : - @$(MAKE) -C src $(MAKE_FLAGS) - @$(MAKE) -C mrblib $(MAKE_FLAGS) -ifeq ($(ENABLE_GEMS),true) - @echo "-- MAKE mrbgems --" - @$(MAKE) -C mrbgems $(MAKE_FLAGS) -endif - $(MAKE) -C tools/mruby $(MAKE_FLAGS) - @$(MAKE) -C tools/mirb $(MAKE_FLAGS) - -# mruby test -.PHONY : test -test : all - @$(MAKE) -C test $(MAKE_FLAGS) - -# clean up -.PHONY : clean -clean : - @$(MAKE) clean -C src $(MAKE_FLAGS) -ifeq ($(ENABLE_GEMS),true) - @echo "-- CLEAN mrbgems --" - @$(MAKE) clean -C mrbgems $(MAKE_FLAGS) -endif - @$(MAKE) clean -C tools/mruby $(MAKE_FLAGS) - @$(MAKE) clean -C tools/mirb $(MAKE_FLAGS) - @$(MAKE) clean -C test $(MAKE_FLAGS) - -# display help for build configuration and interesting targets -.PHONY : showconfig -showconfig : - $(MSG_BEGIN) \ - "" \ - " CC = $(CC)" \ - " LL = $(LL)" \ - " MAKE = $(MAKE)" \ - "" \ - " CFLAGS = $(CFLAGS)" \ - " ALL_CFLAGS = $(ALL_CFLAGS)" \ - $(MSG_END) - -.PHONY : help -help : - $(MSG_BEGIN) \ - "" \ - " Basic mruby Makefile" \ - "" \ - "targets:" \ - " all (default): build all targets, install (locally) in-repo" \ - " clean: clean all built and in-repo installed artifacts" \ - " showconfig: show build config summary" \ - " test: run all mruby tests" \ - $(MSG_END) |
