diff options
| author | Yuichiro MASUI <[email protected]> | 2012-12-29 05:37:55 +0900 |
|---|---|---|
| committer | Yuichiro MASUI <[email protected]> | 2013-01-03 02:24:15 +0900 |
| commit | 7c469c0b9dadd1de09fed18c3e5cc551012c38c1 (patch) | |
| tree | b79aa703ef7c528896c4f1be8280d0691314008b /mrblib/Makefile | |
| parent | a48fc0d7952ad1f10ae777637269fe6a3f9ad0a2 (diff) | |
| download | mruby-7c469c0b9dadd1de09fed18c3e5cc551012c38c1.tar.gz mruby-7c469c0b9dadd1de09fed18c3e5cc551012c38c1.zip | |
Rebuild CRuby based building script without Makefile
Tested CRuby 1.8.6 and 1.9.3
You can see building configuration in build_config.rb
Diffstat (limited to 'mrblib/Makefile')
| -rw-r--r-- | mrblib/Makefile | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/mrblib/Makefile b/mrblib/Makefile deleted file mode 100644 index 57ce1387b..000000000 --- a/mrblib/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# Makefile description. -# basic build file for mruby library (Ruby part) - -# project-specific macros -# extension of the executable-file is modifiable(.exe .out ...) -BASEDIR = . -TARGET := mrblib -MLIB := $(TARGET).o -CLIB := $(TARGET).c -DLIB := $(TARGET).ctmp -RLIB := $(TARGET).rbtmp -DEPLIB := $(TARGET).d -MRB1 := $(BASEDIR)/*.rb -MRBS := $(MRB1) -LIBR0 := ../lib/libmruby_core.a -LIBR := ../lib/libmruby.a - -# libraries, includes -INCLUDES = -I../src -I../include - -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 = CC=$(CC) LL=$(LL) ALL_CFLAGS='$(ALL_CFLAGS)' LDFLAGS='$(LDFLAGS)' -else - MAKE_FLAGS = CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)' LDFLAGS='$(LDFLAGS)' -endif - -# mruby compiler -ifeq ($(OS),Windows_NT) -MRBC = ../bin/mrbc.exe -else -MRBC = ../bin/mrbc -endif - - -############################## -# generic build targets, rules - -.PHONY : all -all : $(LIBR) - -# update libmruby.a -$(LIBR) : $(MLIB) $(LIBR0) - $(CP) $(LIBR0) $(LIBR) - $(AR) r $(LIBR) $(MLIB) - -# Compile mrblib source -$(MLIB) : $(CLIB) - $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $(CLIB) -o $(MLIB) - -# Compile C source from merged mruby source -$(CLIB) : $(RLIB) $(MRBC) - $(MRBC) -Bmrblib_irep -o$(DLIB) $(RLIB); $(CAT) init_$(TARGET).c $(DLIB) > $@ - -$(MRBC) : $(LIBR0) - $(MAKE) -C ../tools/mrbc $(MAKE_FLAGS) - -# merge mruby sources -$(RLIB) : $(MRBS) - $(CAT) $(MRBS) > $@ - -# clean up -.PHONY : clean -clean : - @echo "make: removing targets, objects and depend files of `pwd`" - -$(RM_F) $(MRBC) $(MLIB) $(CLIB) $(RLIB) $(DLIB) $(DEPLIB) $(LIBR) |
