diff options
author | David Robillard <d@drobilla.net> | 2012-04-29 23:25:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-29 23:25:15 +0000 |
commit | e427c8510d56058550bf516f637d07f39676012c (patch) | |
tree | 273334bb8fded69aeff82a37605e8a12461b73d7 /wscript | |
parent | d9732fbc106a6ac228912078888fbac65e78d26d (diff) | |
download | pugl-e427c8510d56058550bf516f637d07f39676012c.tar.gz pugl-e427c8510d56058550bf516f637d07f39676012c.tar.bz2 pugl-e427c8510d56058550bf516f637d07f39676012c.zip |
OSX implementation.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -77,12 +77,19 @@ def build(bld): autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [], {'PUGL_MAJOR_VERSION' : PUGL_MAJOR_VERSION}) - libflags = [ '-fvisibility=hidden' ] + 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'] @@ -98,6 +105,7 @@ def build(bld): source = lib_source, includes = ['.', './src'], lib = libs, + framework = framework, name = 'libpugl', target = 'pugl-%s' % PUGL_MAJOR_VERSION, vnum = PUGL_LIB_VERSION, @@ -113,6 +121,7 @@ def build(bld): source = lib_source, includes = ['.', './src'], lib = libs, + framework = framework, name = 'libpugl_static', target = 'pugl-%s' % PUGL_MAJOR_VERSION, vnum = PUGL_LIB_VERSION, @@ -130,6 +139,7 @@ def build(bld): includes = ['.', './src'], use = 'libpugl_static', lib = test_libs, + framework = framework, target = 'pugl_test', install_path = '', defines = defines, @@ -138,3 +148,8 @@ def build(bld): 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) |