diff --git a/.gitignore b/.gitignore index 99f6cfe8..059987b5 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ libtool .deps .libs +.dirstamp #netbeans nbproject diff --git a/Makefile.am b/Makefile.am index f44b06ee..ac24c6b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = build ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = subdir-objects pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(top_builddir)/libtoxcore.pc diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc index bd883a79..199b61e9 100644 --- a/auto_tests/Makefile.inc +++ b/auto_tests/Makefile.inc @@ -5,7 +5,7 @@ TESTS = messenger_autotest crypto_test check_PROGRAMS = messenger_autotest crypto_test messenger_autotest_SOURCES = \ - $(top_srcdir)/auto_tests/messenger_test.c + ../auto_tests/messenger_test.c messenger_autotest_CFLAGS = \ $(LIBSODIUM_CFLAGS) \ @@ -18,7 +18,7 @@ messenger_autotest_LDADD = \ $(CHECK_LIBS) -crypto_test_SOURCES = $(top_srcdir)/auto_tests/crypto_test.c +crypto_test_SOURCES = ../auto_tests/crypto_test.c crypto_test_CFLAGS = $(LIBSODIUM_CFLAGS) \ $(CHECK_CFLAGS) diff --git a/build/Makefile.am b/build/Makefile.am index 5cc735f9..631ec111 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -3,8 +3,8 @@ noinst_PROGRAMS = noinst_bindir = $(top_builddir)/build EXTRA_DIST= -include $(top_srcdir)/toxcore/Makefile.inc -include $(top_srcdir)/other/Makefile.inc -include $(top_srcdir)/testing/Makefile.inc -include $(top_srcdir)/other/bootstrap_serverdaemon/Makefile.inc -include $(top_srcdir)/auto_tests/Makefile.inc +include ../toxcore/Makefile.inc +include ../other/Makefile.inc +include ../testing/Makefile.inc +include ../other/bootstrap_serverdaemon/Makefile.inc +include ../auto_tests/Makefile.inc diff --git a/configure.ac b/configure.ac index a16f6a4f..e82fe1f0 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_INIT([tox], [0.0.0], [http://tox.im]) AC_CONFIG_AUX_DIR(configure_aux) AC_CONFIG_SRCDIR([toxcore/net_crypto.c]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.10 -Wall]) +AM_INIT_AUTOMAKE([1.10 -Wall subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) @@ -107,6 +107,7 @@ AC_ARG_WITH(libsodium-libs, # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL diff --git a/other/Makefile.inc b/other/Makefile.inc index 7442fb39..2703f26a 100644 --- a/other/Makefile.inc +++ b/other/Makefile.inc @@ -1,8 +1,8 @@ noinst_PROGRAMS += DHT_bootstrap -DHT_bootstrap_SOURCES = $(top_srcdir)/other/DHT_bootstrap.c \ - $(top_srcdir)/toxcore/DHT.h \ - $(top_srcdir)/toxcore/friend_requests.h +DHT_bootstrap_SOURCES = ../other/DHT_bootstrap.c \ + ../toxcore/DHT.h \ + ../toxcore/friend_requests.h DHT_bootstrap_CFLAGS = -I$(top_srcdir)/other \ $(LIBSODIUM_CFLAGS) diff --git a/other/bootstrap_serverdaemon/Makefile.inc b/other/bootstrap_serverdaemon/Makefile.inc index 1320b761..2eaf7b9c 100644 --- a/other/bootstrap_serverdaemon/Makefile.inc +++ b/other/bootstrap_serverdaemon/Makefile.inc @@ -3,7 +3,7 @@ if BUILD_DHT_BOOTSTRAP_DAEMON noinst_PROGRAMS += DHT_bootstrap_daemon DHT_bootstrap_daemon_SOURCES = \ - $(top_srcdir)/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c + ../other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c DHT_bootstrap_daemon_CFLAGS = \ -I$(top_srcdir)/other/bootstrap_serverdaemon \ diff --git a/testing/Makefile.inc b/testing/Makefile.inc index 99c203c8..b63e715a 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc @@ -2,8 +2,8 @@ if BUILD_NTOX bin_PROGRAMS += nTox -nTox_SOURCES = $(top_srcdir)/testing/nTox.h \ - $(top_srcdir)/testing/nTox.c +nTox_SOURCES = ../testing/nTox.h \ + ../testing/nTox.c nTox_CFLAGS = $(LIBSODIUM_CFLAGS) \ $(NCURSES_CFLAGS) @@ -22,7 +22,7 @@ noinst_PROGRAMS += DHT_test \ Messenger_test \ crypto_speed_test -DHT_test_SOURCES = $(top_srcdir)/testing/DHT_test.c +DHT_test_SOURCES = ../testing/DHT_test.c DHT_test_CFLAGS = $(LIBSODIUM_CFLAGS) @@ -33,7 +33,7 @@ DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \ Lossless_UDP_testclient_SOURCES = \ - $(top_srcdir)/testing/Lossless_UDP_testclient.c + ../testing/Lossless_UDP_testclient.c Lossless_UDP_testclient_CFLAGS = \ $(LIBSODIUM_CFLAGS) @@ -46,7 +46,7 @@ Lossless_UDP_testclient_LDADD = \ Lossless_UDP_testserver_SOURCES = \ - $(top_srcdir)/testing/Lossless_UDP_testserver.c + ../testing/Lossless_UDP_testserver.c Lossless_UDP_testserver_CFLAGS = \ $(LIBSODIUM_CFLAGS) @@ -59,7 +59,7 @@ Lossless_UDP_testserver_LDADD = \ Messenger_test_SOURCES = \ - $(top_srcdir)/testing/Messenger_test.c + ../testing/Messenger_test.c Messenger_test_CFLAGS = $(LIBSODIUM_CFLAGS) @@ -70,7 +70,7 @@ Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ crypto_speed_test_SOURCES = \ - $(top_srcdir)/testing/crypto_speed_test.c + ../testing/crypto_speed_test.c crypto_speed_test_CFLAGS = \ $(LIBSODIUM_CFLAGS) @@ -81,3 +81,4 @@ crypto_speed_test_LDADD = \ $(LIBSODIUM_LIBS) \ $(WINSOCK2_LIBS) +EXTRA_DIST += $(top_srcdir)/testing/misc_tools.c diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index d79a7e1c..23584953 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -1,31 +1,31 @@ lib_LTLIBRARIES = libtoxcore.la libtoxcore_la_include_HEADERS = \ - $(top_srcdir)/toxcore/tox.h + ../toxcore/tox.h libtoxcore_la_includedir = $(includedir)/tox -libtoxcore_la_SOURCES = $(top_srcdir)/toxcore/DHT.h \ - $(top_srcdir)/toxcore/DHT.c \ - $(top_srcdir)/toxcore/network.h \ - $(top_srcdir)/toxcore/network.c \ - $(top_srcdir)/toxcore/Lossless_UDP.h \ - $(top_srcdir)/toxcore/Lossless_UDP.c \ - $(top_srcdir)/toxcore/net_crypto.h \ - $(top_srcdir)/toxcore/net_crypto.c \ - $(top_srcdir)/toxcore/friend_requests.h \ - $(top_srcdir)/toxcore/friend_requests.c \ - $(top_srcdir)/toxcore/LAN_discovery.h \ - $(top_srcdir)/toxcore/LAN_discovery.c \ - $(top_srcdir)/toxcore/Messenger.h \ - $(top_srcdir)/toxcore/Messenger.c \ - $(top_srcdir)/toxcore/ping.h \ - $(top_srcdir)/toxcore/ping.c \ - $(top_srcdir)/toxcore/tox.h \ - $(top_srcdir)/toxcore/tox.c \ - $(top_srcdir)/toxcore/util.h \ - $(top_srcdir)/toxcore/util.c \ - $(top_srcdir)/toxcore/misc_tools.h +libtoxcore_la_SOURCES = ../toxcore/DHT.h \ + ../toxcore/DHT.c \ + ../toxcore/network.h \ + ../toxcore/network.c \ + ../toxcore/Lossless_UDP.h \ + ../toxcore/Lossless_UDP.c \ + ../toxcore/net_crypto.h \ + ../toxcore/net_crypto.c \ + ../toxcore/friend_requests.h \ + ../toxcore/friend_requests.c \ + ../toxcore/LAN_discovery.h \ + ../toxcore/LAN_discovery.c \ + ../toxcore/Messenger.h \ + ../toxcore/Messenger.c \ + ../toxcore/ping.h \ + ../toxcore/ping.c \ + ../toxcore/tox.h \ + ../toxcore/tox.c \ + ../toxcore/util.h \ + ../toxcore/util.c \ + ../toxcore/misc_tools.h libtoxcore_la_CFLAGS = -I$(top_srcdir) \ -I$(top_srcdir)/toxcore \