aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index bf455f4..3d68652 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,14 @@
RUSTC = rustc
MAIN_SOURCE = src/term.rs
-OTHER_SOURCES = src/hexes.rs src/ios.rs src/info.rs src/util.rs src/trie.rs
+OTHER_SOURCES = src/hexes.rs src/ios.rs src/util.rs src/trie.rs
+ifdef CURSES
+OTHER_SOURCES += src/info/curses.rs
+CFG = --cfg curses
+else
+OTHER_SOURCES += src/info/builtin.rs
+CFG =
+endif
TESTS = bin/termios bin/termios2 bin/termios3 bin/rl bin/password bin/attrs bin/tput
all: build tests
@@ -9,7 +16,7 @@ all: build tests
build: tmp/built
check: build
- $(RUSTC) -L tmp --test $(MAIN_SOURCE) -o TEST
+ $(RUSTC) $(CFG) -L tmp --test $(MAIN_SOURCE) -o TEST
./TEST
@rm -f TEST
@@ -21,7 +28,7 @@ bin/%: test/%.rs tmp/built
tmp/built: $(MAIN_SOURCE) $(OTHER_SOURCES) tmp/libtermios_wrapper.a tmp/libio_helper.a
@mkdir -p lib
- $(RUSTC) --out-dir lib -L tmp $(MAIN_SOURCE) && touch tmp/built
+ $(RUSTC) $(CFG) --out-dir lib -L tmp $(MAIN_SOURCE) && touch tmp/built
clibs: tmp/libtermios_wrapper.a tmp/libio_helper.a