This repository has been archived by the owner on Apr 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSConscript
executable file
·90 lines (72 loc) · 2.17 KB
/
SConscript
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- Python -*-
import os
from CXL_init import *
Import('*')
libName = "CXLApplication"
env = CXL_env.Clone()
env.Append( CPPPATH = [
"./",
"./inc",
env['CXL_commonproj_dir'],
env['CXL_commonproj_dir'] + "/AMDTOSWrappers/Include",
env['CXL_commonproj_dir'] + '/../../CodeXL',
"/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
])
UseGtk(env)
UseTinyXml(env)
UseQScintilla(env)
UseQt4(env)
UseQCustomPlot(env)
env.Append(CPPFLAGS = '-fPIC')
moc_files = Split(
" inc/appMainAppWindow.h"
+ " inc/appMDIArea.h"
+ " src/appQtApplication.h"
)
# Source files:
sources = \
[
# src:
"src/appApplication.cpp",
"src/appApplicationCommands.cpp",
"src/appEventObserver.cpp",
"src/appMainAppWindow.cpp",
"src/appMDIArea.cpp",
"src/appQtApplication.cpp",
]
commonLinkedLibraries = \
[
"CXLBaseTools",
"CXLOSWrappers",
"CXLAPIClasses",
"CXLApplicationComponents",
"CXLAssertionHandlers",
"CXLApplicationFramework",
"CXLRemoteClient"
]
linkedLibraries = commonLinkedLibraries
env.Prepend (LIBS = linkedLibraries)
# Set the ELF hash generation mode:
# - When building on new systems, we would like to generate both sysv and gnu ELF hashes.
# This enables running the executable also on old systems, that support only the sysv ELF hash.
# - When building on old systems, we need to set the GR_GENERATE_ONLY_DEFAULT_ELF_HASH environment
# variable (preferably in the .bashrc file). Otherwise the link will fail when trying to
# generate an ELF hash type that the old linker does not recognize.
# [Yaki 7/7/2009]
linkerFlags = []
shouldGenerateOnlyDefaultELFHash = os.environ.get('GR_GENERATE_ONLY_DEFAULT_ELF_HASH')
if shouldGenerateOnlyDefaultELFHash is None:
linkerFlags += [ "-Wl,--hash-style=both" ]
MOC_Generated = []
for moc_file in moc_files:
MOC_Generated += env.MocBld(moc_file)
# Creating shared libraries
soFiles = env.SharedLibrary(
target = libName,
source = sources + MOC_Generated,
LINKFLAGS = linkerFlags)
# Installing libraries
libInstall = env.Install(
dir = env['CXL_bin_dir'],
source = (soFiles))
Return('libInstall')