Skip to content

Commit 76f6769

Browse files
committed
Fix build with static ecmult altroot and make dist.
Gen_context was unable to find the required headers without some autotools fixups. Make dist was also broken without the extra sources for the host side table builder utility.
1 parent 5133f78 commit 76f6769

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pkgconfigdir = $(libdir)/pkgconfig
4343
pkgconfig_DATA = libsecp256k1.pc
4444

4545
libsecp256k1_la_SOURCES = src/secp256k1.c
46-
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include $(SECP_INCLUDES)
46+
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
4747
libsecp256k1_la_LIBADD = $(SECP_LIBS)
4848

4949

@@ -68,14 +68,14 @@ endif
6868
if USE_TESTS
6969
noinst_PROGRAMS += tests
7070
tests_SOURCES = src/tests.c
71-
tests_CPPFLAGS = -DVERIFY $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
71+
tests_CPPFLAGS = -DVERIFY -I$(top_srcdir)/src $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
7272
tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS)
7373
tests_LDFLAGS = -static
7474
TESTS = tests
7575
endif
7676

7777
if USE_ECMULT_STATIC_PRECOMPUTATION
78-
CPPFLAGS_FOR_BUILD +=-I.
78+
CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)/
7979
CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function
8080

8181
gen_context_OBJECTS = gen_context.o
@@ -92,4 +92,4 @@ src/ecmult_static_context.h: gen_context
9292
./gen_context
9393
endif
9494

95-
EXTRA_DIST = autogen.sh
95+
EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h

0 commit comments

Comments
 (0)