-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.py
More file actions
29 lines (21 loc) · 786 Bytes
/
configure.py
File metadata and controls
29 lines (21 loc) · 786 Bytes
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
import os
import sipconfig
# The name of the SIP build file generated by SIP and used by the build
# system.
#build_dir = "."
build_file = "vns.sbf"
#dir = os.path.dirname(build_dir)
#if not os.path.exists(dir):
# os.makedirs(dir)
# Get the SIP configuration information.
config = sipconfig.Configuration()
# Run SIP to generate the code.
os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "vns/vns.sip"]))
# Create the Makefile.
makefile = sipconfig.SIPModuleMakefile(config, build_file)
# Add the library we are wrapping. The name doesn't include any platform
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
# ".dll" extension on Windows).
makefile.extra_libs = ["vns","vns-omnetpp"]
# Generate the Makefile itself.
makefile.generate()