From 8a0cdcf37dd568469b9976d18bbcf19103609e22 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 6 Apr 2016 13:39:37 -0400 Subject: [PATCH] allow installing include files; do not install test application --- Makefile | 8 ++++++++ wscript | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index efab526..711c3cc 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,11 @@ clean: .PHONY: distclean distclean: ./waf distclean + +.PHONY: install +install: + ./waf install + +.PHONY: uninstall +uninstall: + ./waf uninstall diff --git a/wscript b/wscript index 617db58..f123a78 100644 --- a/wscript +++ b/wscript @@ -1,6 +1,7 @@ def options(opt): opt.load("compiler_c compiler_cxx") - opt.add_option("--without-tests", + opt.add_option( + "--without-tests", action = "store_true", dest = "without_tests", default = False, @@ -25,9 +26,16 @@ def build(bld): if not bld.env.WITHOUT_TESTS: test_sources = bld.path.ant_glob("test/**/*.cpp") + \ bld.path.ant_glob("test/**/*.c") - bld.program(source = test_sources, + bld.program( + source = test_sources, target = "glcxx-test", use = "glcxx", uselib = "SDL2", lib = ["dl", "GL"], - linkflags = ["-Wl,-rpath,$ORIGIN"]) + linkflags = ["-Wl,-rpath,$ORIGIN"], + install_path = None) + + bld.install_files( + "${PREFIX}", + bld.path.ant_glob("include/**"), + relative_trick = True)