diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-09-10 16:37:57 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-08 19:29:07 +0200 |
commit | 91d9c3c5d3ab466732636c9f1206053f8dcc5742 (patch) | |
tree | 805a48829e738239ce7c07221316ed04b7f86c8d /pugl/.svn/pristine/09 | |
parent | 21c9747b3a672d75caff5c2b78c309f481465b93 (diff) |
Remove checked in pugl files.
Diffstat (limited to 'pugl/.svn/pristine/09')
-rw-r--r-- | pugl/.svn/pristine/09/0941e2033558edd90840bdb0cd9904dae31321b5.svn-base | 155 |
1 files changed, 0 insertions, 155 deletions
diff --git a/pugl/.svn/pristine/09/0941e2033558edd90840bdb0cd9904dae31321b5.svn-base b/pugl/.svn/pristine/09/0941e2033558edd90840bdb0cd9904dae31321b5.svn-base deleted file mode 100644 index 3682d14..0000000 --- a/pugl/.svn/pristine/09/0941e2033558edd90840bdb0cd9904dae31321b5.svn-base +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python -import glob -import os -import sys - -from waflib.extras import autowaf as autowaf -import waflib.Logs as Logs, waflib.Options as Options - -# Version of this package (even if built as a child) -PUGL_VERSION = '0.2.0' -PUGL_MAJOR_VERSION = '0' - -# Library version (UNIX style major, minor, micro) -# major increment <=> incompatible changes -# minor increment <=> compatible changes (additions) -# micro increment <=> no interface changes -# Pugl uses the same version number for both library and package -PUGL_LIB_VERSION = PUGL_VERSION - -# Variables for 'waf dist' -APPNAME = 'pugl' -VERSION = PUGL_VERSION - -# Mandatory variables -top = '.' -out = 'build' - -def options(opt): - opt.load('compiler_c') - if Options.platform == 'win32': - opt.load('compiler_cxx') - autowaf.set_options(opt) - opt.add_option('--test', action='store_true', default=False, dest='build_tests', - help="Build unit tests") - opt.add_option('--static', action='store_true', default=False, dest='static', - help="Build static library") - opt.add_option('--shared', action='store_true', default=False, dest='shared', - help="Build shared library") - -def configure(conf): - conf.load('compiler_c') - if Options.platform == 'win32': - conf.load('compiler_cxx') - autowaf.configure(conf) - autowaf.display_header('Pugl Configuration') - - if conf.env['MSVC_COMPILER']: - conf.env.append_unique('CFLAGS', ['-TP', '-MD']) - else: - conf.env.append_unique('CFLAGS', '-std=c99') - - # Shared library building is broken on win32 for some reason - conf.env['BUILD_TESTS'] = Options.options.build_tests - conf.env['BUILD_SHARED'] = (Options.platform != 'win32' or - Options.options.shared) - conf.env['BUILD_STATIC'] = (Options.options.build_tests or - Options.options.static) - - autowaf.define(conf, 'PUGL_VERSION', PUGL_VERSION) - conf.write_config_header('pugl_config.h', remove=False) - - conf.env['INCLUDES_PUGL'] = ['%s/pugl-%s' % (conf.env['INCLUDEDIR'], - PUGL_MAJOR_VERSION)] - conf.env['LIBPATH_PUGL'] = [conf.env['LIBDIR']] - conf.env['LIB_PUGL'] = ['pugl-%s' % PUGL_MAJOR_VERSION]; - - autowaf.display_msg(conf, "Static library", str(conf.env['BUILD_STATIC'])) - autowaf.display_msg(conf, "Unit tests", str(conf.env['BUILD_TESTS'])) - print('') - -def build(bld): - # C Headers - includedir = '${INCLUDEDIR}/pugl-%s/pugl' % PUGL_MAJOR_VERSION - bld.install_files(includedir, bld.path.ant_glob('pugl/*.h')) - - # Pkgconfig file - autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [], - {'PUGL_MAJOR_VERSION' : PUGL_MAJOR_VERSION}) - - libflags = [ '-fvisibility=hidden' ] - framework = [] - libs = [] - if Options.platform == 'win32': - lang = 'cxx' - lib_source = ['pugl/pugl_win.cpp'] - libs = ['opengl32', 'glu32', 'gdi32', 'user32'] - defines = [] - elif Options.platform == 'darwin': - lang = 'c' # Objective C, actually - lib_source = ['pugl/pugl_osx.m'] - framework = ['Cocoa', 'OpenGL'] - defines = [] - else: - lang = 'c' - lib_source = ['pugl/pugl_x11.c'] - libs = ['X11', 'GL', 'GLU'] - defines = [] - if bld.env['MSVC_COMPILER']: - libflags = [] - - # Shared Library - if bld.env['BUILD_SHARED']: - obj = bld(features = '%s %sshlib' % (lang, lang), - export_includes = ['.'], - source = lib_source, - includes = ['.', './src'], - lib = libs, - framework = framework, - name = 'libpugl', - target = 'pugl-%s' % PUGL_MAJOR_VERSION, - vnum = PUGL_LIB_VERSION, - install_path = '${LIBDIR}', - defines = defines, - cflags = libflags + [ '-DPUGL_SHARED', - '-DPUGL_INTERNAL' ]) - - # Static library - if bld.env['BUILD_STATIC']: - obj = bld(features = '%s %sstlib' % (lang, lang), - export_includes = ['.'], - source = lib_source, - includes = ['.', './src'], - lib = libs, - framework = framework, - name = 'libpugl_static', - target = 'pugl-%s' % PUGL_MAJOR_VERSION, - vnum = PUGL_LIB_VERSION, - install_path = '${LIBDIR}', - defines = defines, - cflags = ['-DPUGL_INTERNAL']) - - if bld.env['BUILD_TESTS']: - test_libs = libs - test_cflags = [''] - - # Unit test program - obj = bld(features = 'c cprogram', - source = 'pugl_test.c', - includes = ['.', './src'], - use = 'libpugl_static', - lib = test_libs, - framework = framework, - target = 'pugl_test', - install_path = '', - defines = defines, - cflags = test_cflags) - -def lint(ctx): - subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-readability/todo,-build/include src/* pugl/*', shell=True) - -from waflib import TaskGen -@TaskGen.extension('.m') -def m_hook(self, node): - "Alias .m files to be compiled the same as .c files, gcc will do the right thing." - return self.create_compiled_task('c', node) |