aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-19 20:55:28 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-19 20:55:28 -0500
commitbe15c787b357fda85983c01be1f4350c5fddf753 (patch)
tree8d77a9ebb5d2ec05560247724953ca70d87608f4 /Makefile
downloadrust-term-be15c787b357fda85983c01be1f4350c5fddf753.tar.gz
rust-term-be15c787b357fda85983c01be1f4350c5fddf753.zip
project skeleton
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4d0ee91
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+RUSTC = rustc
+SRC = src
+
+MAIN_SOURCE = $(SRC)/term.rs
+OTHER_SOURCES = $(SRC)/ios.rs $(SRC)/info.rs
+
+all: build tests
+
+build: built
+
+tests: build
+
+built: $(MAIN_SOURCE) $(OTHER_SOURCES) libtermios_wrapper.a
+ $(RUSTC) --out-dir . -L . $(MAIN_SOURCE) && touch built
+
+libtermios_wrapper.a: termios_wrapper.o
+ ar cr libtermios_wrapper.a termios_wrapper.o
+
+termios_wrapper.o: $(SRC)/termios_wrapper.c
+ cc -c $<
+
+clean:
+ rm -f termios_wrapper.o libtermios_wrapper.a
+ rm -f libterm-*.so
+ rm -f built
+
+.PHONY: clean build tests default