1# vim:ft=automake 2 3src_tlsdate_SOURCES= 4src_tlsdate_LDADD= 5 6src_tlsdate_helper_CFLAGS= 7src_tlsdate_helper_SOURCES= 8src_tlsdate_helper_LDADD= 9 10include src/compat/include.am 11 12# Our main program 13if TARGET_LINUX 14bin_PROGRAMS+= src/tlsdate 15bin_PROGRAMS+= src/tlsdate-helper 16 17if HAVE_SECCOMP_FILTER 18src_tlsdate_helper_SOURCES+= src/seccomp.c 19endif 20 21sbin_PROGRAMS+= src/tlsdated 22 23src_conf_unittest_SOURCES = src/conf.c 24src_conf_unittest_SOURCES+= src/conf-unittest.c 25 26if HAVE_ANDROID 27src_conf_unittest_SOURCES+= src/common/fmemopen.c 28endif 29 30check_PROGRAMS+= src/conf_unittest 31noinst_PROGRAMS+= src/conf_unittest 32endif # TARGET_LINUX 33 34if TARGET_GNUKFREEBSD 35bin_PROGRAMS+= src/tlsdate 36bin_PROGRAMS+= src/tlsdate-helper 37 38src_conf_unittest_SOURCES = src/conf.c 39src_conf_unittest_SOURCES+= src/conf-unittest.c 40check_PROGRAMS+= src/conf_unittest 41noinst_PROGRAMS+= src/conf_unittest 42endif 43 44if TARGET_FREEBSD 45bin_PROGRAMS+= src/tlsdate 46bin_PROGRAMS+= src/tlsdate-helper 47 48src_conf_unittest_SOURCES = src/conf.c 49src_conf_unittest_SOURCES+= src/conf-unittest.c 50check_PROGRAMS+= src/conf_unittest 51noinst_PROGRAMS+= src/conf_unittest 52endif 53 54if TARGET_NETBSD 55bin_PROGRAMS+= src/tlsdate 56bin_PROGRAMS+= src/tlsdate-helper 57 58src_conf_unittest_SOURCES = src/conf.c 59src_conf_unittest_SOURCES+= src/conf-unittest.c 60 61# XXX This conditional should apply for any system where we're building 62# conf_unittest, but I don't know how to tell that to automake. 63if !HAVE_FMEMOPEN 64if HAVE_FUNOPEN 65src_conf_unittest_SOURCES+= src/common/fmemopen-funopen.c 66endif 67endif 68 69check_PROGRAMS+= src/conf_unittest 70noinst_PROGRAMS+= src/conf_unittest 71endif 72 73if TARGET_OPENBSD 74bin_PROGRAMS+= src/tlsdate 75bin_PROGRAMS+= src/tlsdate-helper 76 77src_conf_unittest_SOURCES = src/conf.c 78src_conf_unittest_SOURCES+= src/conf-unittest.c 79src_conf_unittest_SOURCES+= src/common/fmemopen.c 80check_PROGRAMS+= src/conf_unittest 81noinst_PROGRAMS+= src/conf_unittest 82endif 83 84if TARGET_DRAGONFLYBSD 85bin_PROGRAMS+= src/tlsdate 86bin_PROGRAMS+= src/tlsdate-helper 87 88src_conf_unittest_SOURCES = src/conf.c 89src_conf_unittest_SOURCES+= src/conf-unittest.c 90check_PROGRAMS+= src/conf_unittest 91noinst_PROGRAMS+= src/conf_unittest 92endif 93 94if TARGET_BSD 95if !TARGET_FREEBSD 96if !TARGET_NETBSD 97bin_PROGRAMS+= src/tlsdate 98bin_PROGRAMS+= src/tlsdate-helper 99 100src_conf_unittest_SOURCES = src/conf.c 101src_conf_unittest_SOURCES+= src/conf-unittest.c 102check_PROGRAMS+= src/conf_unittest 103noinst_PROGRAMS+= src/conf_unittest 104endif 105endif 106endif 107 108if TARGET_GNUHURD 109bin_PROGRAMS+= src/tlsdate 110bin_PROGRAMS+= src/tlsdate-helper 111 112src_conf_unittest_SOURCES = src/conf.c 113src_conf_unittest_SOURCES+= src/conf-unittest.c 114check_PROGRAMS+= src/conf_unittest 115noinst_PROGRAMS+= src/conf_unittest 116endif 117 118if TARGET_CYGWIN 119bin_PROGRAMS+= src/tlsdate 120bin_PROGRAMS+= src/tlsdate-helper 121 122src_conf_unittest_SOURCES = src/conf.c 123src_conf_unittest_SOURCES+= src/conf-unittest.c 124check_PROGRAMS+= src/conf_unittest 125noinst_PROGRAMS+= src/conf_unittest 126endif 127 128if TARGET_MINGW 129bin_PROGRAMS+= src/tlsdate 130bin_PROGRAMS+= src/tlsdate-helper 131 132src_conf_unittest_SOURCES = src/conf.c 133src_conf_unittest_SOURCES+= src/conf-unittest.c 134check_PROGRAMS+= src/conf_unittest 135noinst_PROGRAMS+= src/conf_unittest 136endif 137 138if TARGET_HAIKU 139bin_PROGRAMS+= src/tlsdate 140bin_PROGRAMS+= src/tlsdate-helper 141 142src_conf_unittest_SOURCES = src/conf.c 143src_conf_unittest_SOURCES+= src/conf-unittest.c 144check_PROGRAMS+= src/conf_unittest 145noinst_PROGRAMS+= src/conf_unittest 146endif 147 148if TARGET_OSX 149bin_PROGRAMS+= src/tlsdate 150bin_PROGRAMS+= src/tlsdate-helper 151endif 152 153src_tlsdate_SOURCES+= src/tlsdate.c 154src_tlsdate_CFLAGS = -DBUILDING_TLSDATE 155 156src_tlsdate_helper_CFLAGS+= @SSL_CFLAGS@ 157src_tlsdate_helper_LDADD+= @SSL_LIBS@ 158src_tlsdate_helper_LDADD+= src/compat/libtlsdate_compat.la 159src_tlsdate_helper_SOURCES+= src/tlsdate-helper.c 160 161if POLARSSL 162src_tlsdate_helper_SOURCES+= src/proxy-polarssl.c 163else 164# OpenSSL is our default if we're not using PolarSSL 165src_tlsdate_helper_SOURCES+= src/proxy-bio.c 166endif 167src_tlsdate_helper_SOURCES+= src/util.c 168 169if !HAVE_STRNLEN 170src_tlsdate_helper_SOURCES+= src/common/strnlen.c 171endif 172 173# This doesn't work on Mac OS X 174if TARGET_LINUX 175 176src_tlsdated_CFLAGS = $(DBUS_CFLAGS) $(LIBEVENT_CFLAGS) @SSL_CFLAGS@ 177src_tlsdated_CPPFLAGS = -DTLSDATED_MAIN -DWITH_EVENTS 178if SECCOMP_FILTER_DEBUG 179src_tlsdated_CPPFLAGS += -DSECCOMP_FILTER_DEBUG=1 180endif 181src_tlsdated_LDADD = @SSL_LIBS@ $(RT_LIB) $(DBUS_LIBS) $(LIBEVENT_LIBS) 182src_tlsdated_SOURCES = src/conf.c 183 184# This doesn't work on Mac OS X or FreeBSD 185if TARGET_LINUX 186src_tlsdated_SOURCES+= src/routeup.c 187endif 188 189if HAVE_DBUS 190src_tlsdated_SOURCES+= src/dbus.c 191endif 192if HAVE_CROS 193src_tlsdated_SOURCES+= src/platform-cros.c 194endif 195if HAVE_SECCOMP_FILTER 196src_tlsdated_SOURCES+= src/seccomp.c 197endif 198src_tlsdated_SOURCES+= src/tlsdate-monitor.c 199src_tlsdated_SOURCES+= src/tlsdate-setter.c 200src_tlsdated_SOURCES+= src/tlsdated.c 201src_tlsdated_SOURCES+= src/util.c 202src_tlsdated_SOURCES+= src/events/check_continuity.c 203src_tlsdated_SOURCES+= src/events/kickoff_time_sync.c 204src_tlsdated_SOURCES+= src/events/route_up.c 205src_tlsdated_SOURCES+= src/events/run_tlsdate.c 206src_tlsdated_SOURCES+= src/events/sigterm.c 207src_tlsdated_SOURCES+= src/events/sigchld.c 208src_tlsdated_SOURCES+= src/events/save.c 209src_tlsdated_SOURCES+= src/events/time_set.c 210src_tlsdated_SOURCES+= src/events/tlsdate_status.c 211 212src_tlsdated_unittest_CFLAGS = $(DBUS_CFLAGS) $(LIBEVENT_CFLAGS) 213src_tlsdated_unittest_CPPFLAGS = -DWITH_EVENTS 214if SECCOMP_FILTER_DEBUG 215src_tlsdated_unittest_CPPFLAGS += -DSECCOMP_FILTER_DEBUG=1 216endif 217src_tlsdated_unittest_LDADD = @SSL_LIBS@ $(RT_LIB) $(DBUS_LIBS) $(LIBEVENT_LIBS) 218src_tlsdated_unittest_SOURCES = src/tlsdated-unittest.c 219src_tlsdated_unittest_SOURCES+= $(src_tlsdated_SOURCES) 220 221check_PROGRAMS+= src/tlsdated_unittest 222noinst_PROGRAMS+= src/tlsdated_unittest 223endif 224 225# This doesn't work on Mac OS X 226if TARGET_LINUX 227if !POLARSSL 228src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 229src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 230src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 231src_proxy_bio_unittest_SOURCES+= src/test-bio.c 232src_proxy_bio_unittest_SOURCES+= src/util.c 233if HAVE_SECCOMP_FILTER 234src_proxy_bio_unittest_SOURCES+= src/seccomp.c 235endif 236check_PROGRAMS+= src/proxy-bio_unittest 237noinst_PROGRAMS+= src/proxy-bio_unittest 238endif 239endif 240 241if TARGET_FREEBSD 242if !POLARSSL 243src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 244src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 245src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 246src_proxy_bio_unittest_SOURCES+= src/test-bio.c 247src_proxy_bio_unittest_SOURCES+= src/util.c 248check_PROGRAMS+= src/proxy-bio_unittest 249noinst_PROGRAMS+= src/proxy-bio_unittest 250endif 251# XXX This conditional should apply for any system where we're building 252# conf_unittest, but I don't know how to tell that to automake. 253if !HAVE_FMEMOPEN 254if HAVE_FUNOPEN 255src_conf_unittest_SOURCES+= src/common/fmemopen-funopen.c 256endif 257endif 258endif 259 260if TARGET_NETBSD 261if !POLARSSL 262src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 263src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 264src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 265src_proxy_bio_unittest_SOURCES+= src/test-bio.c 266src_proxy_bio_unittest_SOURCES+= src/util.c 267 268# XXX This conditional should apply for any system where we're building 269# proxy_bio_unittest, but I don't know how to tell that to automake. 270if !HAVE_STRNLEN 271src_proxy_bio_unittest_SOURCES+= src/common/strnlen.c 272endif 273 274check_PROGRAMS+= src/proxy-bio_unittest 275noinst_PROGRAMS+= src/proxy-bio_unittest 276endif 277endif 278 279if TARGET_OPENBSD 280if !POLARSSL 281src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 282src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 283src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 284src_proxy_bio_unittest_SOURCES+= src/test-bio.c 285src_proxy_bio_unittest_SOURCES+= src/util.c 286src_proxy_bio_unittest_SOURCES+= src/common/fmemopen.c 287check_PROGRAMS+= src/proxy-bio_unittest 288noinst_PROGRAMS+= src/proxy-bio_unittest 289endif 290endif 291 292if TARGET_DRAGONFLYBSD 293if !POLARSSL 294src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 295src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 296src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 297src_proxy_bio_unittest_SOURCES+= src/test-bio.c 298src_proxy_bio_unittest_SOURCES+= src/util.c 299check_PROGRAMS+= src/proxy-bio_unittest 300noinst_PROGRAMS+= src/proxy-bio_unittest 301endif 302endif 303 304if TARGET_BSD 305if !POLARSSL 306if !TARGET_FREEBSD 307if !TARGET_NETBSD 308src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 309src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 310src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 311src_proxy_bio_unittest_SOURCES+= src/test-bio.c 312src_proxy_bio_unittest_SOURCES+= src/util.c 313check_PROGRAMS+= src/proxy-bio_unittest 314noinst_PROGRAMS+= src/proxy-bio_unittest 315endif 316endif 317endif 318endif 319 320if TARGET_GNUHURD 321if !POLARSSL 322src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 323src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 324src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 325src_proxy_bio_unittest_SOURCES+= src/test-bio.c 326src_proxy_bio_unittest_SOURCES+= src/util.c 327check_PROGRAMS+= src/proxy-bio_unittest 328noinst_PROGRAMS+= src/proxy-bio_unittest 329endif 330endif 331 332if TARGET_CYGWIN 333if !POLARSSL 334src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 335src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 336src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 337src_proxy_bio_unittest_SOURCES+= src/test-bio.c 338src_proxy_bio_unittest_SOURCES+= src/util.c 339check_PROGRAMS+= src/proxy-bio_unittest 340noinst_PROGRAMS+= src/proxy-bio_unittest 341endif 342endif 343 344if TARGET_MINGW 345if !POLARSSL 346src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 347src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 348src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 349src_proxy_bio_unittest_SOURCES+= src/test-bio.c 350src_proxy_bio_unittest_SOURCES+= src/util.c 351check_PROGRAMS+= src/proxy-bio_unittest 352noinst_PROGRAMS+= src/proxy-bio_unittest 353endif 354endif 355 356if TARGET_HAIKU 357if !POLARSSL 358src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 359src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 360src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 361src_proxy_bio_unittest_SOURCES+= src/test-bio.c 362src_proxy_bio_unittest_SOURCES+= src/util.c 363check_PROGRAMS+= src/proxy-bio_unittest 364noinst_PROGRAMS+= src/proxy-bio_unittest 365endif 366endif 367 368# We're not shipping headers 369noinst_HEADERS+= src/routeup.h 370noinst_HEADERS+= src/test_harness.h 371noinst_HEADERS+= src/tlsdate-helper.h 372noinst_HEADERS+= src/seccomp.h 373noinst_HEADERS+= src/seccomp-compat.h 374noinst_HEADERS+= src/tlsdate.h 375noinst_HEADERS+= src/util.h 376noinst_HEADERS+= src/visibility.h 377noinst_HEADERS+= src/proxy-bio.h 378noinst_HEADERS+= src/proxy-polarssl.h 379noinst_HEADERS+= src/test-bio.h 380noinst_HEADERS+= src/conf.h 381noinst_HEADERS+= src/dbus.h 382noinst_HEADERS+= src/platform.h 383 384# This is our explicit target list 385# We do not attempt to build with PolarSSL 386if !POLARSSL 387if !TARGET_LINUX 388if !TARGET_OSX 389if !TARGET_OPENBSD 390if !TARGET_NETBSD 391if !TARGET_FREEBSD 392if !TARGET_DRAGONFLYBSD 393if !TARGET_HAIKU 394if !TARGET_GNUHURD 395if !TARGET_CYGWIN 396if !TARGET_MINGW 397if !TARGET_BSD 398bin_PROGRAMS+= src/tlsdate 399bin_PROGRAMS+= src/tlsdate-helper 400 401src_conf_unittest_SOURCES = src/conf.c 402src_conf_unittest_SOURCES+= src/conf-unittest.c 403check_PROGRAMS+= src/conf_unittest 404noinst_PROGRAMS+= src/conf_unittest 405endif 406endif 407endif 408endif 409endif 410endif 411endif 412endif 413endif 414endif 415endif 416endif 417 418if !POLARSSL 419if !TARGET_LINUX 420if !TARGET_OSX 421if !TARGET_OPENBSD 422if !TARGET_NETBSD 423if !TARGET_FREEBSD 424if !TARGET_GNUKFREEBSD 425if !TARGET_DRAGONFLYBSD 426if !TARGET_HAIKU 427if !TARGET_GNUHURD 428if !TARGET_CYGWIN 429if !TARGET_MINGW 430if !TARGET_BSD 431src_proxy_bio_unittest_LDADD = @SSL_LIBS@ 432src_proxy_bio_unittest_SOURCES = src/proxy-bio.c 433src_proxy_bio_unittest_SOURCES+= src/proxy-bio-unittest.c 434src_proxy_bio_unittest_SOURCES+= src/test-bio.c 435src_proxy_bio_unittest_SOURCES+= src/util.c 436check_PROGRAMS+= src/proxy-bio_unittest 437noinst_PROGRAMS+= src/proxy-bio_unittest 438 439endif 440endif 441endif 442endif 443endif 444endif 445endif 446endif 447endif 448endif 449endif 450endif 451endif 452 453 454check_PROGRAMS+= src/test/proxy-override src/test/check-host-1 \ 455 src/test/check-host-2 src/test/sleep-wrap \ 456 src/test/return-argc src/test/emit 457