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