forked from mrubyc/mrubyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (48 loc) · 1.35 KB
/
Makefile
File metadata and controls
57 lines (48 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# mruby/c Makefile
#
# Copyright (C) 2015-2021 Kyushu Institute of Technology.
# Copyright (C) 2015-2021 Shimane IT Open-Innovation Center.
#
# This file is distributed under BSD 3-Clause License.
#
# tag or branch name of mruby/mruby
MRUBY_TAG = `grep MRUBY_VERSION mrblib/global.rb | sed 's/MRUBY_VERSION *= *"\(.\+\)"/\1/'`
all: mrubyc_lib mrubyc_bin
.PHONY: mrblib
mrblib:
cd mrblib ; $(MAKE) distclean all
mrubyc_lib:
cd mrblib ; $(MAKE) all
cd src ; $(MAKE) all
mrubyc_bin:
cd sample_c ; $(MAKE) all
clean:
cd mrblib ; $(MAKE) clean
cd src ; $(MAKE) clean
cd sample_c ; $(MAKE) clean
package: clean
@LANG=C ;\
TARGET="mruby-c_`head -n1 Version`" ;\
if [ -n "$$MRUBYC_VERSION" ] ;\
then TARGET="mruby-c_$$MRUBYC_VERSION" ;\
fi ;\
echo Making \"$$TARGET.tgz\" ;\
mkdir -p pkg/$$TARGET ;\
cp -Rp src doc sample_c sample_ruby auto_test README.md Makefile pkg/$$TARGET ;\
cd pkg ;\
tar cfz ../$$TARGET.tgz $$TARGET ;\
cd .. ;\
rm -Rf pkg ;\
echo Done.
.PHONY: test setup_test
test:
docker run --mount type=bind,src=${PWD}/,dst=/root/mrubyc \
-e CFLAGS="-DMRBC_USE_MATH=1 -DMAX_SYMBOLS_COUNT=500 $(CFLAGS)" \
mrubyc/mrubyc-test bundle exec mrubyc-test \
--every=100 \
--mrbc-path=/root/mruby/build/host/bin/mrbc \
$(file)
setup_test:
@echo MRUBY_TAG=$(MRUBY_TAG)
docker build -t mrubyc/mrubyc-test --build-arg MRUBY_TAG=$(MRUBY_TAG) .