Permalink
Browse files

Show some love to build scripts. Now things are properly installed.

  • Loading branch information...
nsf committed Aug 5, 2013
1 parent e19e0d0 commit 27f9b277a80624b7d0e48e86c58f6a7dcad58e9f
Showing with 22 additions and 5 deletions.
  1. +2 −1 src/demo/wscript
  2. +7 −2 src/wscript
  3. +13 −2 wscript
View
@@ -4,5 +4,6 @@ def build(bld):
bld.program(
source = [d],
target = d.name[:-2],
- use = 'termbox',
+ use = 'termbox_static',
+ install_path = None,
)
View
@@ -1,11 +1,16 @@
def build(bld):
sources = bld.path.ant_glob("*.c")
bld.shlib(
- source = bld.path.ant_glob("*.c"),
+ source = sources,
target = 'termbox',
+ name = 'termbox_shared',
+ vnum = bld.env.VERSION,
)
bld.stlib(
- source = bld.path.ant_glob("*.c"),
+ source = sources,
target = 'termbox',
+ name = 'termbox_static',
+ install_path = '${LIBDIR}',
)
+ bld.install_files('${PREFIX}/include', 'termbox.h')
bld.recurse("demo")
View
15 wscript
@@ -1,5 +1,5 @@
APPNAME = 'termbox'
-VERSION = '1.1'
+VERSION = '1.0.0'
top = '.'
out = 'build'
@@ -8,10 +8,21 @@ import sys
def options(opt):
opt.load('compiler_c')
+ opt.add_option(
+ '--debug',
+ action = 'store_true',
+ default = False,
+ help = 'Enable debug build',
+ )
def configure(conf):
+ conf.env.VERSION = VERSION
conf.load('compiler_c')
- conf.env.append_unique('CFLAGS', ['-Wall', '-Wextra', '-g', '-O0'])
+ conf.env.append_unique('CFLAGS', ['-std=gnu99', '-Wall', '-Wextra'])
+ if conf.options.debug:
+ conf.env.append_unique('CFLAGS', ['-g', '-Og'])
+ else:
+ conf.env.append_unique('CFLAGS', '-O3')
def build(bld):
bld.recurse('src')

0 comments on commit 27f9b27

Please sign in to comment.