Makefile.am 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. ## Process this file with automake to produce Makefile.in
  2. AUTOMAKE_OPTIONS= foreign subdir-objects
  3. #
  4. # What to build and install
  5. #
  6. noinst_LIBRARIES= libarchive/libarchive.a lib/libtarsnap.a \
  7. lib/libtarsnap_aesni.a lib/libtarsnap_rdrand.a \
  8. lib/libtarsnap_shani.a lib/libtarsnap_sse2.a \
  9. lib/libtarsnap_arm_aes.a lib/libtarsnap_arm_sha256.a
  10. bin_PROGRAMS= tarsnap tarsnap-keygen tarsnap-keyregen tarsnap-recrypt tarsnap-keymgmt
  11. noinst_PROGRAMS= tests/valgrind/potential-memleaks
  12. man_MANS=$(tarsnap_man_MANS) $(tarsnap_keygen_man_MANS) $(tarsnap_keyregen_man_MANS) $(tarsnap_recrypt_man_MANS) $(tarsnap_keymgmt_man_MANS)
  13. CLEANFILES= $(man_MANS)
  14. #
  15. # Libarchive headers, source, etc.
  16. #
  17. #
  18. libarchive_libarchive_a_SOURCES= \
  19. libarchive/archive.h \
  20. libarchive/archive_check_magic.c \
  21. libarchive/archive_endian.h \
  22. libarchive/archive_entry.c \
  23. libarchive/archive_entry.h \
  24. libarchive/archive_entry_copy_stat.c \
  25. libarchive/archive_entry_link_resolver.c \
  26. libarchive/archive_entry_private.h \
  27. libarchive/archive_entry_stat.c \
  28. libarchive/archive_entry_strmode.c \
  29. libarchive/archive_platform.h \
  30. libarchive/archive_private.h \
  31. libarchive/archive_read.c \
  32. libarchive/archive_read_data_into_fd.c \
  33. libarchive/archive_read_disk.c \
  34. libarchive/archive_read_disk_entry_from_file.c \
  35. libarchive/archive_read_disk_private.h \
  36. libarchive/archive_read_disk_set_standard_lookup.c \
  37. libarchive/archive_read_extract.c \
  38. libarchive/archive_read_open_fd.c \
  39. libarchive/archive_read_open_file.c \
  40. libarchive/archive_read_open_filename.c \
  41. libarchive/archive_read_open_memory.c \
  42. libarchive/archive_read_private.h \
  43. libarchive/archive_read_support_compression_all.c \
  44. libarchive/archive_read_support_compression_bzip2.c \
  45. libarchive/archive_read_support_compression_compress.c \
  46. libarchive/archive_read_support_compression_gzip.c \
  47. libarchive/archive_read_support_compression_none.c \
  48. libarchive/archive_read_support_compression_program.c \
  49. libarchive/archive_read_support_compression_xz.c \
  50. libarchive/archive_read_support_format_all.c \
  51. libarchive/archive_read_support_format_ar.c \
  52. libarchive/archive_read_support_format_cpio.c \
  53. libarchive/archive_read_support_format_empty.c \
  54. libarchive/archive_read_support_format_iso9660.c \
  55. libarchive/archive_read_support_format_mtree.c \
  56. libarchive/archive_read_support_format_tar.c \
  57. libarchive/archive_read_support_format_zip.c \
  58. libarchive/archive_string.c \
  59. libarchive/archive_string.h \
  60. libarchive/archive_string_sprintf.c \
  61. libarchive/archive_util.c \
  62. libarchive/archive_virtual.c \
  63. libarchive/archive_write.c \
  64. libarchive/archive_write_disk.c \
  65. libarchive/archive_write_disk_private.h \
  66. libarchive/archive_write_disk_set_standard_lookup.c \
  67. libarchive/archive_write_open_fd.c \
  68. libarchive/archive_write_open_file.c \
  69. libarchive/archive_write_open_filename.c \
  70. libarchive/archive_write_open_memory.c \
  71. libarchive/archive_write_private.h \
  72. libarchive/archive_write_set_compression_none.c \
  73. libarchive/archive_write_set_format_pax.c \
  74. libarchive/archive_write_set_format_ustar.c \
  75. libarchive/config_freebsd.h \
  76. libarchive/config_windows.h \
  77. libarchive/filter_fork.c \
  78. libarchive/filter_fork.h
  79. if INC_WINDOWS_FILES
  80. libarchive_libarchive_a_SOURCES+= \
  81. libarchive/archive_windows.h \
  82. libarchive/archive_windows.c \
  83. libarchive/filter_fork_windows.c
  84. endif
  85. libarchive_libarchive_a_CPPFLAGS=-I$(top_builddir)/libarchive
  86. #
  87. # Tarsnap internal library code
  88. #
  89. #
  90. # Don't include crypto_aesctr_shared.c in this list, as it should be included
  91. # directly into other translation unit(s), and not compiled on its own.
  92. lib_libtarsnap_a_SOURCES= \
  93. lib/crypto/crypto.h \
  94. lib/crypto/crypto_compat.c \
  95. lib/crypto/crypto_compat.h \
  96. lib/crypto/crypto_file.c \
  97. lib/crypto/crypto_hash.c \
  98. lib/crypto/crypto_internal.h \
  99. lib/crypto/crypto_keys.c \
  100. lib/crypto/crypto_keys_server.c \
  101. lib/crypto/crypto_keys_subr.c \
  102. lib/crypto/crypto_passwd_to_dh.c \
  103. lib/crypto/crypto_rsa.c \
  104. lib/crypto/crypto_scrypt_smix.c \
  105. lib/crypto/crypto_scrypt_smix.h \
  106. lib/crypto/crypto_scrypt_smix_sse2.h \
  107. lib/crypto/crypto_session.c \
  108. lib/datastruct/patricia.c \
  109. lib/datastruct/patricia.h \
  110. lib/datastruct/rwhashtab.c \
  111. lib/datastruct/rwhashtab.h \
  112. lib/keyfile/keyfile.c \
  113. lib/keyfile/keyfile.h \
  114. lib/netpacket/netpacket.h \
  115. lib/netpacket/netpacket_delete.c \
  116. lib/netpacket/netpacket_directory.c \
  117. lib/netpacket/netpacket_hmac.c \
  118. lib/netpacket/netpacket_internal.h \
  119. lib/netpacket/netpacket_op.c \
  120. lib/netpacket/netpacket_read.c \
  121. lib/netpacket/netpacket_register.c \
  122. lib/netpacket/netpacket_transaction.c \
  123. lib/netpacket/netpacket_write.c \
  124. lib/netproto/netproto.c \
  125. lib/netproto/netproto.h \
  126. lib/netproto/netproto_connect.c \
  127. lib/netproto/netproto_internal.h \
  128. lib/netproto/netproto_keyexchange.c \
  129. lib/netproto/netproto_packet.c \
  130. lib/network/tsnetwork.h \
  131. lib/network/tsnetwork_buf.c \
  132. lib/network/tsnetwork_bwlimit.c \
  133. lib/network/tsnetwork_connect.c \
  134. lib/network/tsnetwork_internal.h \
  135. lib/network/tsnetwork_register.c \
  136. lib/network/tsnetwork_select.c \
  137. lib/network/tsnetwork_sleep.c \
  138. lib/network/tsnetwork_writeq.c \
  139. lib/scryptenc/scryptenc.c \
  140. lib/scryptenc/scryptenc.h \
  141. lib/scryptenc/scryptenc_cpuperf.c \
  142. lib/scryptenc/scryptenc_cpuperf.h \
  143. lib/util/dirutil.c \
  144. lib/util/dirutil.h \
  145. lib/util/hexlink.c \
  146. lib/util/hexlink.h \
  147. lib/util/passphrase_entry.c \
  148. lib/util/passphrase_entry.h \
  149. lib/util/sigquit.c \
  150. lib/util/sigquit.h \
  151. lib/util/tvmath.c \
  152. lib/util/tvmath.h \
  153. lib-platform/crypto/crypto_scrypt.c \
  154. lib-platform/crypto/crypto_scrypt.h \
  155. lib-platform/platform.h \
  156. lib-platform/network/tsnetwork_cork.c \
  157. lib-platform/network/tsnetwork_cork.h \
  158. lib-platform/util/memlimit.c \
  159. lib-platform/util/memlimit.h \
  160. lib-platform/util/ts_getfstype.c \
  161. lib-platform/util/ts_getfstype.h \
  162. libcperciva/alg/sha256.c \
  163. libcperciva/alg/sha256.h \
  164. libcperciva/alg/sha256_arm.h \
  165. libcperciva/alg/sha256_shani.h \
  166. libcperciva/alg/sha256_sse2.h \
  167. libcperciva/cpusupport/cpusupport.h \
  168. libcperciva/cpusupport/cpusupport_arm_aes.c \
  169. libcperciva/cpusupport/cpusupport_arm_sha256.c \
  170. libcperciva/cpusupport/cpusupport_x86_aesni.c \
  171. libcperciva/cpusupport/cpusupport_x86_rdrand.c \
  172. libcperciva/cpusupport/cpusupport_x86_shani.c \
  173. libcperciva/cpusupport/cpusupport_x86_sse2.c \
  174. libcperciva/cpusupport/cpusupport_x86_ssse3.c \
  175. libcperciva/crypto/crypto_aes.c \
  176. libcperciva/crypto/crypto_aes.h \
  177. libcperciva/crypto/crypto_aes_aesni.h \
  178. libcperciva/crypto/crypto_aes_aesni_m128i.h \
  179. libcperciva/crypto/crypto_aes_arm.h \
  180. libcperciva/crypto/crypto_aes_arm_u8.h \
  181. libcperciva/crypto/crypto_aesctr.c \
  182. libcperciva/crypto/crypto_aesctr.h \
  183. libcperciva/crypto/crypto_aesctr_aesni.h \
  184. libcperciva/crypto/crypto_aesctr_arm.h \
  185. libcperciva/crypto/crypto_dh.c \
  186. libcperciva/crypto/crypto_dh.h \
  187. libcperciva/crypto/crypto_dh_group14.c \
  188. libcperciva/crypto/crypto_dh_group14.h \
  189. libcperciva/crypto/crypto_entropy.c \
  190. libcperciva/crypto/crypto_entropy.h \
  191. libcperciva/crypto/crypto_entropy_rdrand.h \
  192. libcperciva/crypto/crypto_verify_bytes.c \
  193. libcperciva/crypto/crypto_verify_bytes.h \
  194. libcperciva/datastruct/elasticarray.c \
  195. libcperciva/datastruct/elasticarray.h \
  196. libcperciva/datastruct/mpool.h \
  197. libcperciva/datastruct/ptrheap.c \
  198. libcperciva/datastruct/ptrheap.h \
  199. libcperciva/datastruct/timerqueue.c \
  200. libcperciva/datastruct/timerqueue.h \
  201. libcperciva/events/events.c \
  202. libcperciva/events/events.h \
  203. libcperciva/events/events_immediate.c \
  204. libcperciva/events/events_internal.h \
  205. libcperciva/events/events_network.c \
  206. libcperciva/events/events_network_selectstats.c \
  207. libcperciva/events/events_timer.c \
  208. libcperciva/network/network.h \
  209. libcperciva/network/network_accept.c \
  210. libcperciva/network/network_connect.c \
  211. libcperciva/network/network_read.c \
  212. libcperciva/network/network_write.c \
  213. libcperciva/util/align_ptr.h \
  214. libcperciva/util/asprintf.c \
  215. libcperciva/util/asprintf.h \
  216. libcperciva/util/b64encode.c \
  217. libcperciva/util/b64encode.h \
  218. libcperciva/util/ctassert.h \
  219. libcperciva/util/entropy.c \
  220. libcperciva/util/entropy.h \
  221. libcperciva/util/getopt.c \
  222. libcperciva/util/getopt.h \
  223. libcperciva/util/hexify.c \
  224. libcperciva/util/hexify.h \
  225. libcperciva/util/humansize.c \
  226. libcperciva/util/humansize.h \
  227. libcperciva/util/imalloc.h \
  228. libcperciva/util/insecure_memzero.c \
  229. libcperciva/util/insecure_memzero.h \
  230. libcperciva/util/monoclock.c \
  231. libcperciva/util/monoclock.h \
  232. libcperciva/util/parsenum.h \
  233. libcperciva/util/readpass.c \
  234. libcperciva/util/readpass.h \
  235. libcperciva/util/readpass_file.c \
  236. libcperciva/util/sock.c \
  237. libcperciva/util/sock.h \
  238. libcperciva/util/sock_internal.h \
  239. libcperciva/util/sock_util.c \
  240. libcperciva/util/sock_util.h \
  241. libcperciva/util/sysendian.h \
  242. libcperciva/util/ttyfd.c \
  243. libcperciva/util/ttyfd.h \
  244. libcperciva/util/warnp.c \
  245. libcperciva/util/warnp.h
  246. nodist_lib_libtarsnap_a_SOURCES= \
  247. cpusupport-config.h
  248. lib_libtarsnap_a_CPPFLAGS= \
  249. -I$(top_srcdir)/tar \
  250. -I$(top_srcdir)/libarchive \
  251. -I$(top_srcdir)/lib \
  252. -I$(top_srcdir)/lib/crypto \
  253. -I$(top_srcdir)/lib/datastruct \
  254. -I$(top_srcdir)/lib/keyfile \
  255. -I$(top_srcdir)/lib/netpacket \
  256. -I$(top_srcdir)/lib/netproto \
  257. -I$(top_srcdir)/lib/network \
  258. -I$(top_srcdir)/lib/scryptenc \
  259. -I$(top_srcdir)/lib/util \
  260. -I$(top_srcdir)/lib-platform \
  261. -I$(top_srcdir)/lib-platform/crypto \
  262. -I$(top_srcdir)/lib-platform/network \
  263. -I$(top_srcdir)/lib-platform/util \
  264. -I$(top_srcdir)/libcperciva/alg \
  265. -I$(top_srcdir)/libcperciva/cpusupport \
  266. -I$(top_srcdir)/libcperciva/crypto \
  267. -I$(top_srcdir)/libcperciva/datastruct \
  268. -I$(top_srcdir)/libcperciva/events \
  269. -I$(top_srcdir)/libcperciva/external/queue \
  270. -I$(top_srcdir)/libcperciva/network \
  271. -I$(top_srcdir)/libcperciva/util \
  272. -DCPUSUPPORT_CONFIG_FILE=\"cpusupport-config.h\" \
  273. -D_POSIX_C_SOURCE=200809L \
  274. -D_XOPEN_SOURCE=700 \
  275. -DTSSERVER=\"$(TSSERVER)\" \
  276. ${CFLAGS_POSIX}
  277. LIBTARSNAP_A= lib/libtarsnap.a
  278. cpusupport-config.h:
  279. ( export CC="${CC}"; export CFLAGS="${CFLAGS}"; command -p sh $(srcdir)/libcperciva/cpusupport/Build/cpusupport.sh "$$PATH" ) > cpusupport-config.h.tmp && command -p mv cpusupport-config.h.tmp cpusupport-config.h
  280. # crypto_aesctr_shared.c is in this list because it can't be included in the
  281. # _SOURCES because it should only be included as part of another translation
  282. # unit.
  283. EXTRA_DIST= \
  284. libcperciva/cpusupport/Build/cpusupport.sh \
  285. libcperciva/cpusupport/Build/cpusupport-ARM-SHA256.c \
  286. libcperciva/cpusupport/Build/cpusupport-HWCAP-ELF_AUX_INFO.c \
  287. libcperciva/cpusupport/Build/cpusupport-HWCAP-GETAUXVAL.c \
  288. libcperciva/cpusupport/Build/cpusupport-X86-AESNI.c \
  289. libcperciva/cpusupport/Build/cpusupport-X86-CPUID.c \
  290. libcperciva/cpusupport/Build/cpusupport-X86-CPUID_COUNT.c \
  291. libcperciva/cpusupport/Build/cpusupport-X86-SHANI.c \
  292. libcperciva/cpusupport/Build/cpusupport-X86-SSE2.c \
  293. libcperciva/cpusupport/Build/cpusupport-X86-SSSE3.c \
  294. libcperciva/crypto/crypto_aesctr_shared.c
  295. BUILT_SOURCES= cpusupport-config.h
  296. CLEANFILES+= cpusupport-config.h cpusupport-config.h.tmp
  297. lib_libtarsnap_aesni_a_SOURCES= \
  298. libcperciva/crypto/crypto_aes_aesni.c \
  299. libcperciva/crypto/crypto_aesctr_aesni.c
  300. nodist_lib_libtarsnap_aesni_a_SOURCES= \
  301. cpusupport-config.h
  302. lib_libtarsnap_aesni_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  303. lib_libtarsnap_aesni_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_AESNI}`
  304. LIBTARSNAP_A+= lib/libtarsnap_aesni.a
  305. lib_libtarsnap_arm_aes_a_SOURCES= \
  306. libcperciva/crypto/crypto_aes_arm.c \
  307. libcperciva/crypto/crypto_aesctr_arm.c
  308. nodist_lib_libtarsnap_arm_aes_a_SOURCES= \
  309. cpusupport-config.h
  310. lib_libtarsnap_arm_aes_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  311. lib_libtarsnap_arm_aes_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_ARM_AES}`
  312. LIBTARSNAP_A+= lib/libtarsnap_arm_aes.a
  313. lib_libtarsnap_rdrand_a_SOURCES= \
  314. libcperciva/crypto/crypto_entropy_rdrand.c
  315. nodist_lib_libtarsnap_rdrand_a_SOURCES= \
  316. cpusupport-config.h
  317. lib_libtarsnap_rdrand_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  318. lib_libtarsnap_rdrand_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_RDRAND}`
  319. LIBTARSNAP_A+= lib/libtarsnap_rdrand.a
  320. lib_libtarsnap_sse2_a_SOURCES= \
  321. libcperciva/alg/sha256_sse2.c \
  322. lib/crypto/crypto_scrypt_smix_sse2.c
  323. nodist_lib_libtarsnap_sse2_a_SOURCES= \
  324. cpusupport-config.h
  325. lib_libtarsnap_sse2_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  326. lib_libtarsnap_sse2_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SSE2}`
  327. LIBTARSNAP_A+= lib/libtarsnap_sse2.a
  328. lib_libtarsnap_shani_a_SOURCES= \
  329. libcperciva/alg/sha256_shani.c
  330. nodist_lib_libtarsnap_shani_a_SOURCES= \
  331. cpusupport-config.h
  332. lib_libtarsnap_shani_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  333. lib_libtarsnap_shani_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SHANI} $${CFLAGS_X86_SSSE3}`
  334. LIBTARSNAP_A+= lib/libtarsnap_shani.a
  335. lib_libtarsnap_arm_sha256_a_SOURCES= \
  336. libcperciva/alg/sha256_arm.c
  337. nodist_lib_libtarsnap_arm_sha256_a_SOURCES= \
  338. cpusupport-config.h
  339. lib_libtarsnap_arm_sha256_a_CPPFLAGS=$(lib_libtarsnap_a_CPPFLAGS)
  340. lib_libtarsnap_arm_sha256_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_ARM_SHA256}`
  341. LIBTARSNAP_A+= lib/libtarsnap_arm_sha256.a
  342. #
  343. #
  344. # tarsnap source, docs, etc.
  345. #
  346. #
  347. tarsnap_SOURCES= \
  348. tar/bsdtar.c \
  349. tar/bsdtar.h \
  350. tar/bsdtar_platform.h \
  351. tar/ccache/ccache.h \
  352. tar/ccache/ccache_entry.c \
  353. tar/ccache/ccache_internal.h \
  354. tar/ccache/ccache_read.c \
  355. tar/ccache/ccache_write.c \
  356. tar/chunks/chunks.h \
  357. tar/chunks/chunks_delete.c \
  358. tar/chunks/chunks_directory.c \
  359. tar/chunks/chunks_internal.h \
  360. tar/chunks/chunks_read.c \
  361. tar/chunks/chunks_stats.c \
  362. tar/chunks/chunks_stats_internal.c \
  363. tar/chunks/chunks_transaction.c \
  364. tar/chunks/chunks_write.c \
  365. tar/cmdline.c \
  366. tar/getdate.c \
  367. tar/glue/archive_multitape.c \
  368. tar/glue/archive_multitape.h \
  369. tar/glue/tape.c \
  370. tar/matching.c \
  371. tar/multitape/chunkify.c \
  372. tar/multitape/chunkify.h \
  373. tar/multitape/multitape.h \
  374. tar/multitape/multitape_chunkiter.c \
  375. tar/multitape/multitape_delete.c \
  376. tar/multitape/multitape_fsck.c \
  377. tar/multitape/multitape_internal.h \
  378. tar/multitape/multitape_metadata.c \
  379. tar/multitape/multitape_metaindex.c \
  380. tar/multitape/multitape_nuke.c \
  381. tar/multitape/multitape_read.c \
  382. tar/multitape/multitape_recover.c \
  383. tar/multitape/multitape_stats.c \
  384. tar/multitape/multitape_transaction.c \
  385. tar/multitape/multitape_write.c \
  386. tar/read.c \
  387. tar/siginfo.c \
  388. tar/storage/storage.h \
  389. tar/storage/storage_delete.c \
  390. tar/storage/storage_directory.c \
  391. tar/storage/storage_internal.h \
  392. tar/storage/storage_read.c \
  393. tar/storage/storage_read_cache.c \
  394. tar/storage/storage_read_cache.h \
  395. tar/storage/storage_transaction.c \
  396. tar/storage/storage_write.c \
  397. tar/subst.c \
  398. tar/tarsnap_opt.h \
  399. tar/tree.c \
  400. tar/tree.h \
  401. tar/util.c \
  402. tar/write.c
  403. if INC_WINDOWS_FILES
  404. tarsnap_SOURCES+= \
  405. tar/bsdtar_windows.h \
  406. tar/bsdtar_windows.c
  407. endif
  408. if INC_CYGWIN_FILES
  409. tarsnap_SOURCES+= \
  410. tar/bsdtar_cygwin.h \
  411. tar/bsdtar_cygwin.c
  412. endif
  413. tarsnap_DEPENDENCIES = libarchive/libarchive.a \
  414. libarchive/archive_entry.h \
  415. libarchive/archive.h \
  416. $(LIBTARSNAP_A)
  417. tarsnap_LDADD= libarchive/libarchive.a $(LIBTARSNAP_A)
  418. tarsnap_CPPFLAGS= \
  419. -I$(top_srcdir)/libarchive \
  420. -DLIBARCHIVE_STATIC \
  421. -I$(top_srcdir)/tar \
  422. -I$(top_srcdir)/tar/ccache \
  423. -I$(top_srcdir)/tar/chunks \
  424. -I$(top_srcdir)/tar/glue \
  425. -I$(top_srcdir)/tar/multitape \
  426. -I$(top_srcdir)/tar/storage \
  427. -I$(top_srcdir)/lib \
  428. -I$(top_srcdir)/lib/crypto \
  429. -I$(top_srcdir)/lib/datastruct \
  430. -I$(top_srcdir)/lib/keyfile \
  431. -I$(top_srcdir)/lib/netpacket \
  432. -I$(top_srcdir)/lib/netproto \
  433. -I$(top_srcdir)/lib/network \
  434. -I$(top_srcdir)/lib/util \
  435. -I$(top_srcdir)/lib-platform \
  436. -I$(top_srcdir)/lib-platform/util \
  437. -I$(top_srcdir)/libcperciva/crypto \
  438. -I$(top_srcdir)/libcperciva/datastruct \
  439. -I$(top_srcdir)/libcperciva/util \
  440. "-DETC_TARSNAP_CONF=\"${sysconfdir}/tarsnap.conf\"" \
  441. -DUSERAGENT=\"tarsnap-${VERSION}\"
  442. tarsnap_man_MANS= tar/tarsnap.1 tar/tarsnap.conf.5
  443. #
  444. # tarsnap-keygen source, docs, etc.
  445. #
  446. #
  447. tarsnap_keygen_SOURCES= keygen/keygen.c \
  448. keygen/keygen.h \
  449. keygen/keygen_actual.c \
  450. keygen/keygen_network.c
  451. tarsnap_keygen_LDADD= $(LIBTARSNAP_A)
  452. tarsnap_keygen_CPPFLAGS= \
  453. -I$(top_srcdir)/libarchive \
  454. -I$(top_srcdir)/tar \
  455. -I$(top_srcdir)/keygen \
  456. -I$(top_srcdir)/lib \
  457. -I$(top_srcdir)/lib/crypto \
  458. -I$(top_srcdir)/lib/datastruct \
  459. -I$(top_srcdir)/lib/keyfile \
  460. -I$(top_srcdir)/lib/netpacket \
  461. -I$(top_srcdir)/lib/netproto \
  462. -I$(top_srcdir)/lib/network \
  463. -I$(top_srcdir)/lib/util \
  464. -I$(top_srcdir)/lib-platform \
  465. -I$(top_srcdir)/libcperciva/crypto \
  466. -I$(top_srcdir)/libcperciva/util \
  467. -DUSERAGENT=\"tarsnap-keygen-${VERSION}\"
  468. tarsnap_keygen_man_MANS= keygen/tarsnap-keygen.1
  469. #
  470. # tarsnap-keyregen source, docs, etc.
  471. #
  472. #
  473. tarsnap_keyregen_SOURCES= keyregen/keyregen.c \
  474. keygen/keygen.h \
  475. keygen/keygen_actual.c \
  476. keygen/keygen_network.c
  477. tarsnap_keyregen_LDADD= $(LIBTARSNAP_A)
  478. tarsnap_keyregen_CPPFLAGS= \
  479. -I$(top_srcdir)/libarchive \
  480. -I$(top_srcdir)/tar \
  481. -I$(top_srcdir)/keygen \
  482. -I$(top_srcdir)/lib \
  483. -I$(top_srcdir)/lib/crypto \
  484. -I$(top_srcdir)/lib/datastruct \
  485. -I$(top_srcdir)/lib/keyfile \
  486. -I$(top_srcdir)/lib/netpacket \
  487. -I$(top_srcdir)/lib/netproto \
  488. -I$(top_srcdir)/lib/network \
  489. -I$(top_srcdir)/lib/util \
  490. -I$(top_srcdir)/lib-platform \
  491. -I$(top_srcdir)/libcperciva/crypto \
  492. -I$(top_srcdir)/libcperciva/util \
  493. -DUSERAGENT=\"tarsnap-keyregen-${VERSION}\"
  494. tarsnap_keyregen_man_MANS= keyregen/tarsnap-keyregen.1
  495. #
  496. #
  497. # tarsnap-recrypt source, docs, etc.
  498. #
  499. #
  500. tarsnap_recrypt_SOURCES= recrypt/recrypt.c \
  501. tar/chunks/chunks_delete.c \
  502. tar/chunks/chunks_directory.c \
  503. tar/chunks/chunks_stats.c \
  504. tar/chunks/chunks_stats_internal.c \
  505. tar/chunks/chunks_transaction.c \
  506. tar/chunks/chunks_write.c \
  507. tar/multitape/multitape_metadata.c \
  508. tar/multitape/multitape_transaction.c \
  509. tar/storage/storage_delete.c \
  510. tar/storage/storage_directory.c \
  511. tar/storage/storage_read.c \
  512. tar/storage/storage_read_cache.c \
  513. tar/storage/storage_read_cache.h \
  514. tar/storage/storage_transaction.c \
  515. tar/storage/storage_write.c
  516. tarsnap_recrypt_LDADD= $(LIBTARSNAP_A)
  517. tarsnap_recrypt_CPPFLAGS= \
  518. -I$(top_srcdir)/tar \
  519. -I$(top_srcdir)/libarchive \
  520. -I$(top_srcdir)/tar/chunks \
  521. -I$(top_srcdir)/tar/multitape \
  522. -I$(top_srcdir)/tar/storage \
  523. -I$(top_srcdir)/lib \
  524. -I$(top_srcdir)/lib/crypto \
  525. -I$(top_srcdir)/lib/datastruct \
  526. -I$(top_srcdir)/lib/keyfile \
  527. -I$(top_srcdir)/lib/netpacket \
  528. -I$(top_srcdir)/lib/netproto \
  529. -I$(top_srcdir)/lib/network \
  530. -I$(top_srcdir)/lib/util \
  531. -I$(top_srcdir)/lib-platform \
  532. -I$(top_srcdir)/libcperciva/crypto \
  533. -I$(top_srcdir)/libcperciva/util \
  534. -DUSERAGENT=\"tarsnap-recrypt-${VERSION}\"
  535. tarsnap_recrypt_man_MANS= recrypt/tarsnap-recrypt.1
  536. #
  537. #
  538. # tarsnap-keymgmt source, docs, etc.
  539. #
  540. #
  541. tarsnap_keymgmt_SOURCES= keymgmt/keymgmt.c
  542. tarsnap_keymgmt_LDADD= $(LIBTARSNAP_A)
  543. tarsnap_keymgmt_CPPFLAGS= \
  544. -I$(top_srcdir)/tar \
  545. -I$(top_srcdir)/libarchive \
  546. -I$(top_srcdir)/lib \
  547. -I$(top_srcdir)/lib/crypto \
  548. -I$(top_srcdir)/lib/datastruct \
  549. -I$(top_srcdir)/lib/keyfile \
  550. -I$(top_srcdir)/lib/util \
  551. -I$(top_srcdir)/lib-platform \
  552. -I$(top_srcdir)/libcperciva/crypto \
  553. -I$(top_srcdir)/libcperciva/util
  554. tarsnap_keymgmt_man_MANS= keymgmt/tarsnap-keymgmt.1
  555. #
  556. # Test framework and support programs
  557. #
  558. #
  559. .PHONY: test
  560. test: all
  561. $(top_srcdir)/tests/test_tarsnap.sh .
  562. # Detect potential memory leaks from libraries.
  563. tests_valgrind_potential_memleaks_SOURCES = tests/valgrind/potential-memleaks.c
  564. tests_valgrind_potential_memleaks_CPPFLAGS = \
  565. -D_POSIX_C_SOURCE=200809L \
  566. -D_XOPEN_SOURCE=700 \
  567. ${CFLAGS_POSIX}
  568. # Tarsnap configuration file
  569. if INSTALL_CONF_NO_SAMPLE
  570. tar/tarsnap.conf: tar/tarsnap.conf.sample
  571. cp $< $@
  572. sysconf_DATA = tar/tarsnap.conf
  573. CLEANFILES += tar/tarsnap.conf
  574. else
  575. sysconf_DATA = tar/tarsnap.conf.sample
  576. endif
  577. # Use the right version of the man pages depending on whether we have mdoc
  578. # macros available on this system.
  579. tar/tarsnap.1-man tar/tarsnap.1-mdoc \
  580. tar/tarsnap.conf.5-man tar/tarsnap.conf.5-mdoc: tar/tarsnap.1-man.in \
  581. tar/tarsnap.1-mdoc.in tar/tarsnap.conf.5-man.in \
  582. tar/tarsnap.conf.5-mdoc.in
  583. sed -e 's|@sysconfdir[@]|${sysconfdir}|g' ${srcdir}/$@.in > $@.tmp
  584. mv $@.tmp $@
  585. tar/tarsnap.1: tar/tarsnap.1-@MANVER@
  586. cat tar/tarsnap.1-@MANVER@ > tar/tarsnap.1.tmp
  587. mv $@.tmp $@
  588. tar/tarsnap.conf.5: tar/tarsnap.conf.5-@MANVER@
  589. cat tar/tarsnap.conf.5-@MANVER@ > tar/tarsnap.conf.5.tmp
  590. mv $@.tmp $@
  591. keygen/tarsnap-keygen.1: keygen/tarsnap-keygen.1-@MANVER@
  592. cat $(top_srcdir)/keygen/tarsnap-keygen.1-@MANVER@ > keygen/tarsnap-keygen.1.tmp
  593. mv $@.tmp $@
  594. keyregen/tarsnap-keyregen.1: keyregen/tarsnap-keyregen.1-@MANVER@
  595. cat $(top_srcdir)/keyregen/tarsnap-keyregen.1-@MANVER@ > keyregen/tarsnap-keyregen.1.tmp
  596. mv $@.tmp $@
  597. recrypt/tarsnap-recrypt.1: recrypt/tarsnap-recrypt.1-@MANVER@
  598. cat $(top_srcdir)/recrypt/tarsnap-recrypt.1-@MANVER@ > recrypt/tarsnap-recrypt.1.tmp
  599. mv $@.tmp $@
  600. keymgmt/tarsnap-keymgmt.1: keymgmt/tarsnap-keymgmt.1-@MANVER@
  601. cat $(top_srcdir)/keymgmt/tarsnap-keymgmt.1-@MANVER@ > keymgmt/tarsnap-keymgmt.1.tmp
  602. mv $@.tmp $@
  603. EXTRA_DIST+= keygen/tarsnap-keygen.1-man \
  604. keygen/tarsnap-keygen.1-mdoc \
  605. keymgmt/tarsnap-keymgmt.1-man \
  606. keymgmt/tarsnap-keymgmt.1-mdoc \
  607. keyregen/tarsnap-keyregen.1-man \
  608. keyregen/tarsnap-keyregen.1-mdoc \
  609. recrypt/tarsnap-recrypt.1-man \
  610. recrypt/tarsnap-recrypt.1-mdoc \
  611. tar/tarsnap.1-man.in \
  612. tar/tarsnap.1-mdoc.in \
  613. tar/tarsnap.conf.5-man.in \
  614. tar/tarsnap.conf.5-mdoc.in \
  615. tar/tarsnap.conf.sample
  616. CLEANFILES+= tar/tarsnap.1-mdoc tar/tarsnap.conf.5-mdoc
  617. #
  618. # Misc helper scripts
  619. #
  620. #
  621. if INSTALL_BASH_COMPLETION
  622. bashcompdir = $(BASH_COMPLETION_DIR)
  623. dist_bashcomp_DATA = misc/bash_completion.d/tarsnap \
  624. misc/bash_completion.d/tarsnap-keygen \
  625. misc/bash_completion.d/tarsnap-keymgmt \
  626. misc/bash_completion.d/tarsnap-keyregen \
  627. misc/bash_completion.d/tarsnap-recrypt
  628. endif
  629. if INSTALL_ZSH_COMPLETION
  630. zshcompdir = $(ZSH_COMPLETION_DIR)
  631. dist_zshcomp_DATA = misc/zsh_completion/_tarsnap
  632. endif