diff --git a/.gitignore b/.gitignore index a6d7ecd..1a0bed2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ temp/ +*.so +*.o + +termbox.build.sh +termbox.import.scm +termbox.install.sh +termbox.link diff --git a/Makefile b/Makefile index 027184b..8278a0e 100755 --- a/Makefile +++ b/Makefile @@ -1,18 +1,18 @@ # This is not for building the egg, but for pulling # the latest termbox source in. -termbox.h: temp/ - cp temp/src/*.c ./ - cp temp/src/*.h ./ - cp temp/src/*.inl ./ - cp temp/COPYING COPYING.termbox +termbox/: temp/ + mkdir -p termbox + cp temp/src/*.c ./termbox/ + cp temp/src/*.h ./termbox/ + cp temp/src/*.inl ./termbox/ + cp temp/COPYING ./termbox/COPYING temp/: git clone git@github.com:nsf/termbox.git temp clean: - rm -rf temp/ - rm -f *.c *.h *.inl - rm -f COPYING.termbox + rm -rf temp + rm -rf termbox .PHONY: clean, all diff --git a/termbox.egg b/termbox.egg index abbb981..892cddb 100644 --- a/termbox.egg +++ b/termbox.egg @@ -4,5 +4,5 @@ (category ui) (platform unix) (components - (extension termbox - (source "termbox.scm")))) + (extension termbox) + (source "termbox.scm"))) diff --git a/termbox.scm b/termbox.scm index 357a913..5abcae5 100644 --- a/termbox.scm +++ b/termbox.scm @@ -1,7 +1,13 @@ -(import (chicken foreign)) -(import srfi-4) +(module termbox + * + (import (chicken foreign)) + (import srfi-4)) + + +(foreign-declare "#include \"termbox/termbox.h\"") +(foreign-declare "#include \"termbox/termbox.c\"") +(foreign-declare "#include \"termbox/utf8.c\"") -(foreign-declare "#include \"termbox.h\"") (define TB_DEFAULT (foreign-value "TB_DEFAULT" unsigned-integer32)) (define TB_BLACK (foreign-value "TB_BLACK" unsigned-integer32)) diff --git a/COPYING.termbox b/termbox/COPYING similarity index 100% rename from COPYING.termbox rename to termbox/COPYING diff --git a/bytebuffer.inl b/termbox/bytebuffer.inl similarity index 100% rename from bytebuffer.inl rename to termbox/bytebuffer.inl diff --git a/input.inl b/termbox/input.inl similarity index 100% rename from input.inl rename to termbox/input.inl diff --git a/term.inl b/termbox/term.inl similarity index 100% rename from term.inl rename to termbox/term.inl diff --git a/termbox.c b/termbox/termbox.c similarity index 100% rename from termbox.c rename to termbox/termbox.c diff --git a/termbox.h b/termbox/termbox.h similarity index 100% rename from termbox.h rename to termbox/termbox.h diff --git a/utf8.c b/termbox/utf8.c similarity index 100% rename from utf8.c rename to termbox/utf8.c diff --git a/tests/test.scm b/tests/test.scm index 0e170f9..27b7d6c 100644 --- a/tests/test.scm +++ b/tests/test.scm @@ -1,3 +1,5 @@ +(import srfi-4) + (import termbox) (termbox-init)