mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Simplify AM_CPPFLAGS include setup
We had accumulated a bunch of cruft here. Now let's only include src and src/ext. (exception: src/trunnel is autogenerated code, and need to include src/trunnel.) This commit will break the build hard. The next commit will fix it.
This commit is contained in:
parent
178b738be0
commit
257b280776
@ -15,7 +15,11 @@ TESTS=
|
|||||||
noinst_PROGRAMS=
|
noinst_PROGRAMS=
|
||||||
DISTCLEANFILES=
|
DISTCLEANFILES=
|
||||||
bin_SCRIPTS=
|
bin_SCRIPTS=
|
||||||
AM_CPPFLAGS=
|
AM_CPPFLAGS=\
|
||||||
|
-I$(top_srcdir)/src \
|
||||||
|
-I$(top_srcdir)/src/ext \
|
||||||
|
-I$(top_srcdir)/src/ext/trunnel
|
||||||
|
|
||||||
AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
|
AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
|
||||||
SHELL=@SHELL@
|
SHELL=@SHELL@
|
||||||
|
|
||||||
|
10
configure.ac
10
configure.ac
@ -21,16 +21,6 @@ AC_CANONICAL_HOST
|
|||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
if test -f "/etc/redhat-release"; then
|
|
||||||
if test -f "/usr/kerberos/include"; then
|
|
||||||
CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Not a no-op; we want to make sure that CPPFLAGS is set before we use
|
|
||||||
# the += operator on it in src/or/Makefile.am
|
|
||||||
CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src/common"
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(openbsd-malloc,
|
AC_ARG_ENABLE(openbsd-malloc,
|
||||||
AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only]))
|
AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only]))
|
||||||
AC_ARG_ENABLE(static-openssl,
|
AC_ARG_ENABLE(static-openssl,
|
||||||
|
@ -15,9 +15,6 @@ endif
|
|||||||
|
|
||||||
EXTRA_DIST += src/common/Makefile.nmake
|
EXTRA_DIST += src/common/Makefile.nmake
|
||||||
|
|
||||||
#CFLAGS = -Wall -Wpointer-arith -O2
|
|
||||||
AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
|
|
||||||
|
|
||||||
if USE_OPENBSD_MALLOC
|
if USE_OPENBSD_MALLOC
|
||||||
libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
|
libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
|
||||||
else
|
else
|
||||||
@ -214,4 +211,3 @@ COMMONHEADERS = \
|
|||||||
src/common/workqueue.h
|
src/common/workqueue.h
|
||||||
|
|
||||||
noinst_HEADERS+= $(COMMONHEADERS)
|
noinst_HEADERS+= $(COMMONHEADERS)
|
||||||
|
|
||||||
|
@ -142,7 +142,6 @@ src_or_libtor_testing_a_SOURCES =
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
src_or_tor_SOURCES = src/or/tor_main.c
|
src_or_tor_SOURCES = src/or/tor_main.c
|
||||||
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
|
|
||||||
|
|
||||||
src/or/tor_main.$(OBJEXT) \
|
src/or/tor_main.$(OBJEXT) \
|
||||||
src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i
|
src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i
|
||||||
|
@ -71,10 +71,8 @@ endif
|
|||||||
src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
|
src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
|
||||||
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
|
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
|
||||||
-DBINDIR="\"$(bindir)\"" \
|
-DBINDIR="\"$(bindir)\"" \
|
||||||
-I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext" \
|
-DTOR_UNIT_TESTS \
|
||||||
-I"$(top_srcdir)/src/trunnel" \
|
$(AM_CPPFLAGS)
|
||||||
-I"$(top_srcdir)/src/ext/trunnel" \
|
|
||||||
-DTOR_UNIT_TESTS
|
|
||||||
|
|
||||||
# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
|
# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
|
||||||
# This seems to matter nowhere but on Windows, but I assure you that it
|
# This seems to matter nowhere but on Windows, but I assure you that it
|
||||||
@ -327,7 +325,7 @@ src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
|
|||||||
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
|
||||||
@CURVE25519_LIBS@ @TOR_LZMA_LIBS@
|
@CURVE25519_LIBS@ @TOR_LZMA_LIBS@
|
||||||
src_test_test_ntor_cl_AM_CPPFLAGS = \
|
src_test_test_ntor_cl_AM_CPPFLAGS = \
|
||||||
-I"$(top_srcdir)/src/or"
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
src_test_test_hs_ntor_cl_SOURCES = src/test/test_hs_ntor_cl.c
|
src_test_test_hs_ntor_cl_SOURCES = src/test/test_hs_ntor_cl.c
|
||||||
src_test_test_hs_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
|
src_test_test_hs_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
|
||||||
@ -337,7 +335,7 @@ src_test_test_hs_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
|
|||||||
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
|
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
|
||||||
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
|
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
|
||||||
src_test_test_hs_ntor_cl_AM_CPPFLAGS = \
|
src_test_test_hs_ntor_cl_AM_CPPFLAGS = \
|
||||||
-I"$(top_srcdir)/src/or"
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
|
||||||
noinst_PROGRAMS += src/test/test-bt-cl
|
noinst_PROGRAMS += src/test/test-bt-cl
|
||||||
@ -347,7 +345,7 @@ src_test_test_bt_cl_LDADD = src/common/libor-testing.a \
|
|||||||
src/trace/libor-trace.a \
|
src/trace/libor-trace.a \
|
||||||
$(rust_ldadd) \
|
$(rust_ldadd) \
|
||||||
@TOR_LIB_MATH@ \
|
@TOR_LIB_MATH@ \
|
||||||
@TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@
|
@TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@
|
||||||
src_test_test_bt_cl_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
src_test_test_bt_cl_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
||||||
src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
|
src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# Include the src/ so we can use the trace/events.h statement when including
|
|
||||||
# any file in that directory.
|
|
||||||
AM_CPPFLAGS += -I$(srcdir)/src
|
|
||||||
|
|
||||||
noinst_LIBRARIES += \
|
noinst_LIBRARIES += \
|
||||||
src/trace/libor-trace.a
|
src/trace/libor-trace.a
|
||||||
|
@ -6,8 +6,6 @@ noinst_LIBRARIES += \
|
|||||||
src/trunnel/libor-trunnel-testing.a
|
src/trunnel/libor-trunnel-testing.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS += -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
|
|
||||||
|
|
||||||
TRUNNELINPUTS = \
|
TRUNNELINPUTS = \
|
||||||
src/trunnel/ed25519_cert.trunnel \
|
src/trunnel/ed25519_cert.trunnel \
|
||||||
src/trunnel/link_handshake.trunnel \
|
src/trunnel/link_handshake.trunnel \
|
||||||
@ -39,7 +37,8 @@ TRUNNELHEADERS = \
|
|||||||
src/trunnel/channelpadding_negotiation.h
|
src/trunnel/channelpadding_negotiation.h
|
||||||
|
|
||||||
src_trunnel_libor_trunnel_a_SOURCES = $(TRUNNELSOURCES)
|
src_trunnel_libor_trunnel_a_SOURCES = $(TRUNNELSOURCES)
|
||||||
src_trunnel_libor_trunnel_a_CPPFLAGS = -DTRUNNEL_LOCAL_H $(AM_CPPFLAGS)
|
src_trunnel_libor_trunnel_a_CPPFLAGS = \
|
||||||
|
-DTRUNNEL_LOCAL_H $(AM_CPPFLAGS) -I$(top_srcdir)/src/trunnel
|
||||||
|
|
||||||
if UNITTESTS_ENABLED
|
if UNITTESTS_ENABLED
|
||||||
src_trunnel_libor_trunnel_testing_a_SOURCES = $(TRUNNELSOURCES)
|
src_trunnel_libor_trunnel_testing_a_SOURCES = $(TRUNNELSOURCES)
|
||||||
@ -54,4 +53,3 @@ noinst_HEADERS+= $(TRUNNELHEADERS)
|
|||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
src/trunnel/README
|
src/trunnel/README
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user