summaryrefslogtreecommitdiffhomepage
path: root/tools/mrbc/Makefile
diff options
context:
space:
mode:
authorBeoran <[email protected]>2012-05-01 20:13:09 +0200
committerJon <[email protected]>2012-05-22 09:11:13 -0400
commitb5dcb7128d7d235b66b4d9be879d26364dd1e3e9 (patch)
treec58c7ccfa87d4cdd9c9f8a503356f5e2d142ea16 /tools/mrbc/Makefile
parentabacbf667241ff4919b14007ef1a704f321de96d (diff)
downloadmruby-b5dcb7128d7d235b66b4d9be879d26364dd1e3e9.tar.gz
mruby-b5dcb7128d7d235b66b4d9be879d26364dd1e3e9.zip
First cmake build system. Works on Linux.
Diffstat (limited to 'tools/mrbc/Makefile')
-rw-r--r--tools/mrbc/Makefile67
1 files changed, 0 insertions, 67 deletions
diff --git a/tools/mrbc/Makefile b/tools/mrbc/Makefile
deleted file mode 100644
index 9ecda4a59..000000000
--- a/tools/mrbc/Makefile
+++ /dev/null
@@ -1,67 +0,0 @@
-# makefile discription.
-# basic build file for mruby-compiler
-
-# project-specific macros
-# extension of the executable-file is modifiable(.exe .out ...)
-BASEDIR := ../../src
-TARGET := ../../bin/mrbc
-LIBR := ../../lib/libmruby_core.a
-ifeq ($(OS),Windows_NT)
-EXE := $(TARGET).exe
-else
-EXE := $(TARGET)
-endif
-EXCEPT1 :=
-OBJ0 := $(patsubst %.c,%.o,$(wildcard $(BASEDIR)/../tools/mrbc/*.c))
-#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 := $(OBJ0)
-
-# libraries, includes
-LIBS = -lm
-INCLUDES = -I$(BASEDIR) -I$(BASEDIR)/../include
-
-# compiler, linker (gcc)
-CC = gcc
-LL = gcc
-YACC = bison
-DEBUG_MODE = 1
-ifeq ($(DEBUG_MODE),1)
-CFLAGS = -g -O3
-else
-CFLAGS = -O3
-endif
-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
-
-##############################
-# generic build targets, rules
-
-.PHONY : all
-all : $(EXE)
-
-# executable constructed using linker from object files
-$(EXE) : $(OBJS) $(LIBR)
- $(LL) -o $@ $(OBJS) $(LIBR) $(LIBS)
-
--include $(OBJS:.o=.d)
-
-# objects compiled from source
-$(OBJS) : %.o : %.c
- $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $< -o $@
-
-# C library compile
-$(LIBR) :
- @$(MAKE) -C $(BASEDIR) $(MAKE_FLAGS)
-
-# clean up
-.PHONY : clean
-clean :
- @echo "make: removing targets, objects and depend files of `pwd`"
- -rm -f $(EXE) $(OBJS)
- -rm -f $(OBJS:.o=.d)