diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-02 16:46:13 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-02 16:46:13 +0900 |
| commit | 0026d5ff8259ce18bde1bebf3be938dce1ca2227 (patch) | |
| tree | 4366a94ccb89cf9b949cdb37068bc2a07ca8c178 | |
| parent | af2ceeb5bf535d0bd0c98f91f8fb99ada638d6a1 (diff) | |
| download | mruby-0026d5ff8259ce18bde1bebf3be938dce1ca2227.tar.gz mruby-0026d5ff8259ce18bde1bebf3be938dce1ca2227.zip | |
run make -c mrblib from top
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | mrblib/Makefile | 8 | ||||
| -rw-r--r-- | tools/mruby/Makefile | 12 |
3 files changed, 11 insertions, 10 deletions
@@ -23,6 +23,7 @@ endif .PHONY : all all : @$(MAKE) -C src $(MAKE_FLAGS) + @$(MAKE) -C mrblib $(MAKE_FLAGS) @$(MAKE) -C tools/mruby $(MAKE_FLAGS) # clean up diff --git a/mrblib/Makefile b/mrblib/Makefile index 8f4787e6e..10cf654cd 100644 --- a/mrblib/Makefile +++ b/mrblib/Makefile @@ -12,10 +12,17 @@ RLIB := $(TARGET).rbtmp DEPLIB := $(TARGET).d MRB1 := $(BASEDIR)/*.rb MRBS := $(MRB1) +LIB := ../lib/mruby +ifeq ($(OS),Windows_NT) +LIBR := $(LIB).lib +else +LIBR := $(LIB).a +endif # C compiler (gcc) CC = gcc LL = gcc +AR = ar DEBUG_MODE = 1 ifeq ($(DEBUG_MODE),1) CFLAGS = -g @@ -42,6 +49,7 @@ endif .PHONY : all all : $(MRBC) $(MLIB) + $(AR) r $(LIBR) $(MLIB) @echo "make: built targets of `pwd`" # Compile mrblib source diff --git a/tools/mruby/Makefile b/tools/mruby/Makefile index 956f2f709..7b7eb83be 100644 --- a/tools/mruby/Makefile +++ b/tools/mruby/Makefile @@ -19,10 +19,6 @@ OBJ0 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/../tools/mruby/*.c)) #OBJ3 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/ext/enc/*.c)) OBJS := $(OBJ0) -# mruby libraries -EXTC := $(BASEDIR)/../mrblib/mrblib.c -EXTRB := $(wildcard $(BASEDIR)/../mrblib/*.rb) -EXTM := $(patsubst %.c,%.o,$(EXTC)) # ext libraries #EXT1 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/../ext/socket/*.c)) EXTS := $(EXT1) @@ -56,8 +52,8 @@ all : $(LIBR) $(EXE) @echo "make: built targets of `pwd`" # executable constructed using linker from object files -$(EXE) : $(LIBR) $(OBJS) $(EXTM) $(EXTS) - $(LL) -o $@ $(CFLAGS) $(OBJS) $(EXTM) $(LIBR) $(EXTS) $(LIBS) +$(EXE) : $(LIBR) $(OBJS) $(EXTS) + $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(EXTS) $(LIBS) -include $(OBJS:.o=.d) @@ -70,10 +66,6 @@ $(LIBR) : @$(MAKE) -C $(BASEDIR) $(MAKE_FLAGS) # mruby library compile -$(EXTM) : $(EXTRB) $(LIBR) - @$(MAKE) -C ../mrbc $(MAKE_FLAGS) - @$(MAKE) -C ../../mrblib $(MAKE_FLAGS) - # extend libraries complile $(EXTS) : %.o : %.c $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $< -o $@ |
