Commit 6f3130de authored by Jens Korinth's avatar Jens Korinth
Browse files

tapasco-build-libs update

parent b7da9605
......@@ -16,19 +16,8 @@ driver_debug = args.mode == 'driver_debug'
print 'Build mode: ' + args.mode
if not 'TAPASCO_PLATFORM' in os.environ:
print('Environment variable TAPASCO_PLATFORM is not set, guessing Platform ...')
if gethostname() in ['zed', 'zedboard', 'zc706', 'zynq', 'pynq']:
os.environ['TAPASCO_PLATFORM'] = 'zynq'
elif gethostname() in ['zynqmp']:
os.environ['TAPASCO_PLATFORM'] = 'zynqmp'
else:
os.environ['TAPASCO_PLATFORM'] = 'pcie'
print('Platform: ' + os.environ['TAPASCO_PLATFORM'])
moddir = os.environ['TAPASCO_HOME'] + '/platform/' + os.environ['TAPASCO_PLATFORM'] + '/module'
pdir = os.environ['TAPASCO_HOME'] + '/platform/' + os.environ['TAPASCO_PLATFORM'] + '/build'
mdir = os.environ['TAPASCO_HOME'] + '/tlkm'
pdir = os.environ['TAPASCO_HOME'] + '/platform/build'
adir = os.environ['TAPASCO_HOME'] + '/arch/axi4mm/build'
tdir = os.environ['TAPASCO_HOME'] + '/arch/tests/build'
......@@ -37,21 +26,17 @@ if clean or args.rebuild:
subprocess.call(['rm -rf ' + adir], shell=True)
subprocess.call(['rm -rf ' + tdir], shell=True)
subprocess.call(['rm -rf $TAPASCO/home/arch/lib $TAPASCO_HOME/platform/lib'], shell=True)
subprocess.call(['cd ' + moddir + ' && make clean'], shell=True)
subprocess.call(['cd ' + mdir + ' && make clean'], shell=True)
if not clean:
if debug:
print('Building debug mode libraries...')
else:
print('Building release mode libraries, pass "debug" as first argument to build debug libs...')
print('Building release mode libraries...')
if 'LINUX_HOME' in os.environ:
subprocess.call(['make -C ' + os.environ['LINUX_HOME'] + ' scripts'], shell=True)
if os.environ['TAPASCO_PLATFORM'] is 'pcie':
print 'cd ' + moddir + ' && make ' + ('DEBUG_VERBOSE=y ' if driver_debug else ' ')
subprocess.call(['cd ' + moddir + ' && make ' + ('DEBUG_VERBOSE=y ' if driver_debug else ' ')], shell=True)
else:
subprocess.call(['cd ' + moddir + ' && make ' + ('' if driver_debug else 'release ')], shell=True)
subprocess.call(['cd ' + mdir + ' && make ' + ('' if driver_debug else 'release ')], shell=True)
subprocess.call(['mkdir -p ' + pdir + ' && cd ' + pdir + ' && cmake ' + ('' if debug else '-DCMAKE_BUILD_TYPE=Release') + ' .. && make && make install'], shell=True)
subprocess.call(['mkdir -p ' + adir + ' && cd ' + adir + ' && cmake ' + ('' if debug else '-DCMAKE_BUILD_TYPE=Release') + ' .. && make && make install'], shell=True)
subprocess.call(['mkdir -p ' + tdir + ' && cd ' + tdir + ' && cmake ' + ('' if debug else '-DCMAKE_BUILD_TYPE=Release') + ' .. && make && make install'], shell=True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment