From 6bc125e6c3c99307c2fb52e59e4f7f4562ac84a1 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 19 Apr 2023 22:24:52 +0800 Subject: Fix out-of-tree builds Broke in the src directory move --- Makefile.in | 5 ++++- libtomcrypt/Makefile.in | 2 +- libtommath/Makefile.in | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 026e8c9..7800407 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,7 +23,7 @@ LIBTOM_LIBS=@LIBTOM_LIBS@ ifeq (@BUNDLED_LIBTOM@, 1) LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) LIBTOM_CLEAN=ltc-clean ltm-clean - CPPFLAGS+=-I./libtomcrypt/src/headers/ -I./libtommath + CPPFLAGS+=-I$(srcdir)/../libtomcrypt/src/headers/ LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) endif @@ -167,6 +167,9 @@ $(OBJ_DIR): $(OBJ_DIR)/%.o: $(srcdir)/%.c $(HEADERS) | $(OBJ_DIR) $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ +fuzz/%.o: $(srcdir)/../fuzz/%.c $(HEADERS) + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + default_options_guard.h: $(srcdir)/default_options.h @echo Creating $@ @printf "/*\n > > > Do not edit this file (default_options_guard.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > $@.tmp diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in index 15777d2..ec135c5 100644 --- a/libtomcrypt/Makefile.in +++ b/libtomcrypt/Makefile.in @@ -42,7 +42,7 @@ ARFLAGS = r EXTRALIBS = ../libtommath/libtommath.a #Compilation flags -LTC_CFLAGS = -Isrc/headers/ -I$(srcdir)/src/headers/ -I$(srcdir)/.. -I$(srcdir)/../src -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/ $(CFLAGS) $(CPPFLAGS) +LTC_CFLAGS = -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../src -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/ $(CFLAGS) $(CPPFLAGS) LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS) VERSION=1.18.1 diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in index d44fc38..3cacdd8 100644 --- a/libtommath/Makefile.in +++ b/libtommath/Makefile.in @@ -6,7 +6,7 @@ VPATH=@srcdir@ srcdir=@srcdir@ # So that libtommath can include Dropbear headers for options and m_burn() -CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/.. -I$(srcdir)/../src +CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../src CFLAGS += -Wno-deprecated CFLAGS += $(CPPFLAGS) -- cgit v1.2.1