diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-23 16:59:22 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-23 16:59:22 -0700 |
| commit | e3ae5bb9d261e174a82e318f784a8ab2aa4036ec (patch) | |
| tree | b74473538845af72be3a3104ad0d52c1b6df9324 /Makefile | |
| parent | 265ff670c8545a6ebaba7c13d946fc3c70eef36f (diff) | |
| parent | 105c11b7f6570292ad0fa15c8346c038f9d2f561 (diff) | |
| download | mruby-e3ae5bb9d261e174a82e318f784a8ab2aa4036ec.tar.gz mruby-e3ae5bb9d261e174a82e318f784a8ab2aa4036ec.zip | |
Merge pull request #188 from thecodeshop/makefile-mods
Makefile mods
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 45 |
1 files changed, 42 insertions, 3 deletions
@@ -1,9 +1,12 @@ # makefile discription. # basic build file for mruby -# compiler, linker (gcc) -CC = gcc -LL = gcc +# compiler, linker (gcc), archiver, parser generator +export CC = gcc +export LL = gcc +export AR = ar +export YACC = bison + DEBUG_MODE = 1 ifeq ($(DEBUG_MODE),1) CFLAGS = -g -O3 @@ -18,6 +21,16 @@ else 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 @@ -39,3 +52,29 @@ clean : @$(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) |
