diff options
author | Rob Norris <rw_norris@hotmail.com> | 2016-03-17 22:40:39 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-03-17 19:01:12 -0400 |
commit | 8aac71f976a86a384f27a471a34bda68ca1ce8c9 (patch) | |
tree | aea82dced0ec9978e00a15825b7bbebd9a65fb90 | |
parent | 5c738bb9f1dea8aa16794a81948b863ea0f0dec4 (diff) | |
download | gpsd-8aac71f976a86a384f27a471a34bda68ca1ce8c9.tar.gz |
Enable building only libgps by making gpsd and gpsdclients optional.
The default is still to build everything and ensure when minimal is specified that gpsd and client programs are generated.
TESTED:
scons minimal=True
==> still generates all programs + libraries as before
scons gpsd=False gpsdclients=False minimal=True
==> generates only libgps.a
scons shared=True gpsd=False gpsdclients=False minimal=True
==> generates only libgps.so
scons build-all check
==> still passes
-rw-r--r-- | SConstruct | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -158,6 +158,8 @@ boolopts = ( ("nofloats", False, "float ops are expensive, suppress error estimates"), ("squelch", False, "squelch gpsd_log/gpsd_hexdump to save cpu"), # Build control + ("gpsd", True, "gpsd itself"), + ("gpsdclients", True, "gspd client programs"), ("shared", True, "build shared libraries, not static"), ("implicit_link", imloads, "implicit linkage is supported in shared libs"), ("python", True, "build Python support and modules."), @@ -244,7 +246,8 @@ env.SConsignFile(".sconsign.dblite") # Minimal build turns off every option not set on the command line, if env['minimal']: for (name, default, help) in boolopts: - if default is True and not ARGUMENTS.get(name): + # Ensure gpsd and gpsdclients are always enabled unless explicitly turned off. + if default is True and not ARGUMENTS.get(name) and not (name is "gpsd" or name is "gpsdclients"): env[name] = False # NTPSHM requires NTP @@ -1081,7 +1084,11 @@ ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'], LIBS=['gps_static'], LIBPATH='.', parse_flags=gpsflags) -binaries = [gpsd, gpsdecode, gpsctl, gpsdctl, gpspipe, gps2udp, gpxlogger, lcdgps, ntpshmmon] +binaries = [] +if env["gpsd"]: + binaries += [gpsd] +if env["gpsdclients"]: + binaries += [gpsdecode, gpsctl, gpsdctl, gpspipe, gps2udp, gpxlogger, lcdgps, ntpshmmon] if env["ncurses"]: binaries += [cgps, gpsmon] |