Build with X11

pull/1/head
Takashi Kokubun 8 years ago
parent 5a78ce246c
commit b2ddabbe25

@ -1,7 +1,4 @@
current_dir := $(shell pwd)
LD=gcc
LDFLAGS=-lX11
OBJS=src/main.o
.PHONY: all
all: xkremap
@ -13,5 +10,5 @@ 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 $@
mruby/build/host/bin/xkremap: mruby build_config.rb tools/xkremap/xkremap.c
mruby/build/host/bin/xkremap: mruby build_config.rb tools/xkremap/main.c
cd mruby && MRUBY_CONFIG="$(current_dir)/build_config.rb" make

@ -2,8 +2,13 @@ MRuby::Build.new do |conf|
toolchain :gcc
conf.gem File.expand_path(File.dirname(__FILE__))
conf.instance_eval do
# Allow showing backtrace.
@mrbc.compile_options += ' -g'
end
conf.linker do |linker|
linker.libraries += %w(X11)
end
end

@ -132,7 +132,6 @@ void
event_loop(Display *display)
{
XEvent event;
XWindowAttributes attrs;
while (1) {
XNextEvent(display, &event);
switch (event.type) {

@ -1,8 +0,0 @@
#include <stdio.h>
int
main(void)
{
printf("Hello xkremap!\n");
return 0;
}
Loading…
Cancel
Save