Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8712fbca8d
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 45 lines (38 sloc) 1.39 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#
## This file contains proprietary software owned by Motorola Mobility, Inc.
## No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
##
## (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
#

import Options
import sys
from os import unlink, symlink, popen, environ
from os.path import exists

top='.'
srcdir = "."
blddir = "build"
VERSION = "0.1.0"

def set_options(opt):
  opt.tool_options('compiler_cxx')

def configure(conf):
  conf.check_tool("compiler_cxx")
  conf.check_tool('node_addon')
  conf.check(lib=['sfml-system','sfml-window','sfml-graphics','sfml-audio'], uselib_store='SFML')
  #conf.check(lib='openal', uselib_store='AL')
  #conf.check(lib='sndfile', uselib_store='SNDFILE')

def build(bld):
  obj = bld.new_task_gen("cxx", "shlib", "node_addon")
  obj.target = "sfml"
  obj.source = bld.path.ant_glob('src/*.cc')
  obj.cxxflags = ["-g"]
  obj.uselib=['SFML']
  if sys.platform.startswith('darwin'):
    framework=['OpenGL','OpenAL']
  elif sys.platform.startswith('linux'):
    obj.ldflags = [ "-lsfml-window.2.0","-lsfml-graphics.2.0","-lsfml-system.2.0" ]

def shutdown():
  if Options.commands['clean']:
    if exists('sfml.node'): unlink('sfml.node')
  else:
    if exists('build/Release/sfml.node') and not exists('sfml.node'):
      symlink('build/Release/sfml.node', 'sfml.node')
Something went wrong with that request. Please try again.