2016-11-28 14:48:06 +00:00
|
|
|
current_dir := $(shell pwd)
|
2016-11-28 18:25:24 +00:00
|
|
|
CSRCS := $(wildcard tools/xkremap/*.[ch])
|
2016-11-29 11:15:39 +00:00
|
|
|
MRBSRCS := $(wildcard mrblib/xkremap/*.rb)
|
|
|
|
MRBCSRCS := $(wildcard src/*.[ch])
|
2016-11-29 17:53:53 +00:00
|
|
|
.PHONY: all clean
|
2016-11-25 23:24:50 +00:00
|
|
|
|
|
|
|
all: xkremap
|
|
|
|
|
2016-11-29 17:53:53 +00:00
|
|
|
clean:
|
|
|
|
rm -rf mruby/build/host
|
|
|
|
|
2016-11-28 15:15:10 +00:00
|
|
|
xkremap: mruby/build/host/bin/xkremap
|
|
|
|
cp mruby/build/host/bin/xkremap xkremap
|
2016-11-28 14:48:06 +00:00
|
|
|
|
|
|
|
mruby:
|
|
|
|
curl -L --fail --retry 3 --retry-delay 1 https://github.com/mruby/mruby/archive/1.2.0.tar.gz -s -o - | tar zxf -
|
|
|
|
mv mruby-1.2.0 $@
|
|
|
|
|
2016-11-29 11:15:39 +00:00
|
|
|
mruby/build/host/bin/xkremap: mruby build_config.rb $(CSRCS) $(MRBSRCS) $(MRBCSRCS)
|
2016-11-28 14:48:06 +00:00
|
|
|
cd mruby && MRUBY_CONFIG="$(current_dir)/build_config.rb" make
|