зеркало из https://github.com/mozilla/pow-wow.git
Switching to scons buildsystem
This commit is contained in:
Родитель
0ef1eb4036
Коммит
d6bcd104af
|
@ -0,0 +1,8 @@
|
|||
This is a little native events c library that can be called from JS using
|
||||
JS ctypes. In order to build the library, you need to install
|
||||
scons: http://www.scons.org/doc/production/HTML/scons-user.html#chap-build-install
|
||||
|
||||
Then, in this directory type:
|
||||
scons
|
||||
|
||||
This is obviously, still under construction. More info to come.
|
|
@ -0,0 +1,49 @@
|
|||
import sys
|
||||
# TODO: I'm quite certain the Configuration settings can handle this, but
|
||||
# I can't seem to make it work, so punting for now...
|
||||
def is_mac():
|
||||
if sys.platform == 'darwin':
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_linux():
|
||||
if sys.platform == 'linux2':
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_windows():
|
||||
if (sys.platform == 'win32' or
|
||||
sys.platform == 'cygwin'):
|
||||
return True
|
||||
return False
|
||||
|
||||
subdirs = []
|
||||
env = Environment()
|
||||
|
||||
if is_mac():
|
||||
print "No Mac Support"
|
||||
elif is_linux():
|
||||
subdirs.append('linux')
|
||||
|
||||
# This is necessary to get gtk to compile and link properly
|
||||
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
||||
elif is_windows():
|
||||
print "No Windows Support"
|
||||
else:
|
||||
print "Your OS is not recognized"
|
||||
|
||||
# Export the environment to our dependent SConscripts
|
||||
Export('env')
|
||||
|
||||
# Make our subdirectories
|
||||
objs = []
|
||||
for subdir in subdirs:
|
||||
o = SConscript('%s/SConscript' % subdir)
|
||||
objs.append(o)
|
||||
|
||||
# Append our files in the top level directory:
|
||||
objs.append('native_events.c')
|
||||
|
||||
# Make the library
|
||||
env.Library('native_events', objs)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
Import('env')
|
||||
|
||||
objs = []
|
||||
objs.append(env.Object('linux_events.cpp'))
|
||||
objs.append(env.Object('linux_utils.cpp'))
|
||||
Return('objs')
|
Загрузка…
Ссылка в новой задаче