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 /src/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 'src/Makefile')
| -rw-r--r-- | src/Makefile | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index de9a4e6e3..000000000 --- a/src/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# Makefile description. -# basic build file for mruby library - -# project-specific macros -# extension of the executable-file is modifiable(.exe .out ...) -BASEDIR = . -TARGET := ../lib/libmruby_core.a -YSRC := $(BASEDIR)/parse.y -YC := $(BASEDIR)/y.tab.c -KWD := $(BASEDIR)/keywords -LDEF := $(BASEDIR)/lex.def -EXCEPT1 := $(YC) $(BASEDIR)/minimain.c -OBJY := $(patsubst %.c,%.o,$(YC)) -OBJ1 := $(patsubst %.c,%.o,$(filter-out $(EXCEPT1),$(wildcard $(BASEDIR)/*.c))) -#OBJ2 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/ext/regex/*.c)) -#OBJ3 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/ext/enc/*.c)) -OBJS := $(OBJ1) $(OBJ2) $(OBJ3) - -# libraries, includes -INCLUDES = -I$(BASEDIR) -I$(BASEDIR)/../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) - - -############################## -# generic build targets, rules - -.PHONY : all -all : $(TARGET) - -# executable constructed using linker from object files -$(TARGET) : $(OBJS) $(OBJY) - $(AR) r $@ $(OBJS) $(OBJY) - --include $(OBJS:.o=.d) $(OBJY:.o=.d) - -# objects compiled from source -$(OBJS) : %.o : %.c - $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $< -o $@ - -# parser compile -$(OBJY) : $(YC) $(LDEF) - $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $(YC) -o $(OBJY) - -# yacc compile -$(YC) : $(YSRC) - $(YACC) -o $(YC) $(YSRC) - -$(LDEF) : $(KWD) - gperf -L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k'1,3,$$' $(KWD) > $(LDEF) - -# clean up -.PHONY : clean #cleandep -clean : - @echo "make: removing targets, objects and depend files of `pwd`" - -$(RM_F) $(TARGET) $(OBJS) $(OBJY) $(YC) - -$(RM_F) $(OBJS:.o=.d) $(OBJY:.o=.d) - -$(RM_F) $(patsubst %.c,%.o,$(EXCEPT1)) $(patsubst %.c,%.d,$(EXCEPT1)) |
