summaryrefslogtreecommitdiff
path: root/devtools/sizes
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-29 10:24:47 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-29 10:24:47 -0400
commit7e753e02514e46ae59f4e532c854b764b876ce0a (patch)
treec1453d654e225942dcd99eb825bf1613cc6d2f3c /devtools/sizes
parentc6440261b4dae165b689ef2c3db833086c4a0afa (diff)
downloadgpsd-7e753e02514e46ae59f4e532c854b764b876ce0a.tar.gz
Add the sizes tool for looking at normal and minimal build sizes.
Diffstat (limited to 'devtools/sizes')
-rwxr-xr-xdevtools/sizes73
1 files changed, 73 insertions, 0 deletions
diff --git a/devtools/sizes b/devtools/sizes
new file mode 100755
index 00000000..7b6407dc
--- /dev/null
+++ b/devtools/sizes
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+#
+# sizes -- explore the sizes of static gpsd binaries
+#
+import os
+
+# NMEA variants other than vanilla NMEA
+nmea_variants = [
+ "--disable-fv18",
+ "--disable-mtk3301",
+ "--disable-tnt",
+ "--disable-oceanserver",
+ "--disable-gpsclock",
+]
+
+# Binary GPS protocols
+binary_gps = [
+ "--disable-oncore",
+ "--disable-sirf",
+ "--disable-superstar2",
+ "--disable-tsip",
+ "--disable-tripmate",
+ "--disable-earthmate",
+ "--disable-itrax",
+ "--disable-ashtech",
+ "--disable-navcom",
+ "--disable-garmin",
+ "--disable-garmintxt",
+ "--disable-ubx",
+ "--disable-geostar",
+ "--disable-evermore",
+]
+
+# Differential correction and AIVDM
+non_gps = [
+ "--disable-rtcm104v2",
+ "--disable-rtcm104v3",
+ "--disable-ntrip",
+ "--disable-aivdm",
+ ]
+
+# Time service
+time_service = ["--disable-ntpshm", "--disable-pps"]
+
+# Debugging and profiling
+debugging = [
+ "--disable-timing",
+ "--disable-clientdebug",
+ "--disable-oldstyle",
+ ]
+
+def sizeit(legend, tag, options):
+ print legend + ":"
+ print "Options:", " ".join(options)
+ os.system("make clean >/dev/null")
+ os.system("configure --disable-shared " + " ".join(options) + " >/dev/null")
+ os.system("make gpsd >/dev/null")
+ os.rename("gpsd", "gpsd-" + tag + "-build")
+
+# Main sequence
+os.system("uname -a")
+sizeit("Minimalist build, stripped to NMEA only with shm interface",
+ "minimalist",
+ ["--disable-socket-export",
+ "--disable-control-socket",
+ "--disable-ipv6"] +
+ nmea_variants+binary_gps+non_gps+time_service+debugging)
+sizeit("Normal build, configure options defaulted", "normal", [])
+os.system("size gpsd-*-build")
+os.system("rm gpsd-*-build")
+
+#end
+