File: SConstruct

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (27 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (4)
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
import os
import inspect
import glob

# try to import an environment first
try:
  Import('env')
except:
  exec open("../../build/build-env.py")
  env = Environment()

# on mac we have to tell the linker to link against the C++ library
if env['PLATFORM'] == "darwin":
  env.Append(LINKFLAGS = ["-framework","GLUT", "-framework","OpenGL", "-framework","glew"])
else :
  env.Append(LIBS = ["glut","GL","GLU"])

# find all .cus & .cpps in the current directory
sources = []
extensions = ['*.cu', '*.cpp']
for ext in extensions:
  sources.extend(glob.glob(ext))

# compile examples
for src in sources:
  env.Program(src)