diff options
| author | Beoran <[email protected]> | 2012-05-01 20:13:09 +0200 |
|---|---|---|
| committer | Jon <[email protected]> | 2012-05-22 09:11:13 -0400 |
| commit | b5dcb7128d7d235b66b4d9be879d26364dd1e3e9 (patch) | |
| tree | c58c7ccfa87d4cdd9c9f8a503356f5e2d142ea16 /mrblib/Makefile | |
| parent | abacbf667241ff4919b14007ef1a704f321de96d (diff) | |
| download | mruby-b5dcb7128d7d235b66b4d9be879d26364dd1e3e9.tar.gz mruby-b5dcb7128d7d235b66b4d9be879d26364dd1e3e9.zip | |
First cmake build system. Works on Linux.
Diffstat (limited to 'mrblib/Makefile')
| -rw-r--r-- | mrblib/Makefile | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/mrblib/Makefile b/mrblib/Makefile deleted file mode 100644 index d22c4509f..000000000 --- a/mrblib/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# makefile discription. -# 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 - -# C compiler (gcc) -CC = gcc -LL = gcc -AR = ar -DEBUG_MODE = 1 -ifeq ($(DEBUG_MODE),1) -CFLAGS = -g -else -CFLAGS = -O3 -endif -INCLUDES = -I../src -I../include -ALL_CFLAGS = -Wall -Werror-implicit-function-declaration $(CFLAGS) -ifeq ($(OS),Windows_NT) - MAKE_FLAGS = CC=$(CC) LL=$(LL) ALL_CFLAGS="$(ALL_CFLAGS)" -else - MAKE_FLAGS = CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)' -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) : ../src/opcode.h ../src/codegen.c ../src/parse.y - $(MAKE) -C ../tools/mrbc $(MAKE_FLAGS) - -# merge mruby sources -$(RLIB) : $(MRBS) - cat $? > $@ - -# clean up -.PHONY : clean -clean : - @echo "make: removing targets, objects and depend files of `pwd`" - -rm -f $(MRBC) $(MLIB) $(CLIB) $(RLIB) $(DLIB) $(DEPLIB) $(LIBR) |
