All pastes #10061 Raw Edit

Untitled

public text v1 · immutable
#10061 ·published 2005-04-22 03:57 UTC
rendered paste body
# -*- mode: python -*-

opts = Options()
opts.Add('DESTDIR',        'Destination Directory', '')
opts.Add('INSTALL_PREFIX', 'Installation Prefix',   '')
opts.Add('LIBDIR',         'Library Directory',     '${INSTALL_PREFIX}/usr/lib')
opts.Add('INCLUDEDIR',     'Include Directory',     '${INSTALL_PREFIX}/usr/include')

env = Environment(options = opts)

env.Append(SONAME = '1')

# Uncomment if you want libpri not send PROGRESS_INDICATOR w/ALERTING
#env.Append(CPPDEFINES = ['-DALERTING_NO_PROGRESS'])

# Uncomment if you want libpri to count number of Q921/Q931 sent/received
#env.Append(CPPDEFINES = ['-DLIBPRI_COUNTERS'])

library_sources = ['pri.c',
                   'q921.c',
                   'prisched.c',
                   'q931.c',
                   'pri_facility.c']

libpri_static = env.StaticLibrary('pri', library_sources)
libpri_shared = env.SharedLibrary('pri', library_sources, LINKFLAGS = ['-Wl,-soname,libpri.so.${SONAME}'], SHLIBSUFFIX = '.so.${SONAME}')

libpri_symlink = env.Command('libpri.so', libpri_shared, 'ln -sf $SOURCE $TARGET')

env.Alias('install', [env.Install('${DESTDIR}${LIBDIR}', [libpri_shared, libpri_static, libpri_symlink]),
                      env.Install('${DESTDIR}${INCLUDEDIR}', 'libpri.h')])