From e4ee42ea2063e1b97fc2939140da30b589975773 Mon Sep 17 00:00:00 2001 From: TJ Kolev Date: Thu, 2 Feb 2023 20:26:04 -0600 Subject: Dropbear folder refactoring * Fixed the build target for default_options_guard.h. Previous runs missed it. I guess I didn't clean it up properly. * Fixed the build for the MULTI=1 case. tjk :) --- Makefile.in | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile.in b/Makefile.in index e1c8246..80699c4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,7 @@ STATIC_LTM=libtommath/libtommath.a LIBTOM_LIBS=@LIBTOM_LIBS@ ifeq (@BUNDLED_LIBTOM@, 1) - LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) + LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) LIBTOM_CLEAN=ltc-clean ltm-clean CPPFLAGS+=-I./libtomcrypt/src/headers/ -I./libtommath LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) @@ -55,7 +55,7 @@ SVROBJS = $(patsubst %,$(OBJ_DIR)/%,$(_SVROBJS)) _CLIOBJS=cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \ cli-session.o cli-runopts.o cli-chansession.o \ cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o \ - cli-agentfwd.o + cli-agentfwd.o CLIOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_CLIOBJS)) _CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \ @@ -166,10 +166,10 @@ $(OBJ_DIR): $(OBJ_DIR)/%.o: $(srcdir)/%.c $(HEADERS) | $(OBJ_DIR) $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -default_options_guard.h: default_options.h +$(srcdir)/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 - @$(srcdir)/ifndef_wrapper.sh < $^ >> $@.tmp + @./ifndef_wrapper.sh < $^ >> $@.tmp @mv $@.tmp $@ strip: $(TARGETS) @@ -180,14 +180,14 @@ install: $(addprefix inst_, $(TARGETS)) insmultidropbear: dropbearmulti$(EXEEXT) $(INSTALL) -d $(DESTDIR)$(sbindir) -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) - -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) + -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) $(INSTALL) -d $(DESTDIR)$(mandir)/man8 $(INSTALL) -m 644 $(srcdir)/dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 insmulti%: dropbearmulti$(EXEEXT) $(INSTALL) -d $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) - -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) + -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) + -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) $(INSTALL) -d $(DESTDIR)$(mandir)/man1 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi @@ -204,7 +204,7 @@ inst_%: % $(INSTALL) -d $(DESTDIR)$(mandir)/man1 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi -inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) +inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) # for some reason the rule further down doesn't like $($@objs) as a prereq. dropbear: $(dropbearobjs) @@ -229,7 +229,7 @@ scp: $(SCPOBJS) $(HEADERS) Makefile # multi-binary compilation. MULTIOBJS= ifeq ($(MULTI),1) - MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) + MULTIOBJS=$(OBJ_DIR)/dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) CPPFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI endif @@ -272,7 +272,7 @@ thisclean: distclean: clean tidy -rm -f config.h -rm -f Makefile - -rm -f default_options_guard.h + -rm -f $(srcdir)/default_options_guard.h tidy: -rm -f *~ *.gcov */*~ @@ -302,13 +302,13 @@ fuzzstandalone: FUZZLIB=fuzz/fuzz-harness.o fuzzstandalone: fuzz/fuzz-harness.o fuzz-targets # Build all the fuzzers. Usually like -# make fuzz-targets FUZZLIB=-lFuzzer.a +# make fuzz-targets FUZZLIB=-lFuzzer.a # the library provides main(). Otherwise # make fuzzstandalone # provides a main in fuzz-harness.c fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) -$(FUZZ_TARGETS): $(FUZZ_OBJS) $(allobjs) $(LIBTOM_DEPS) +$(FUZZ_TARGETS): $(FUZZ_OBJS) $(allobjs) $(LIBTOM_DEPS) $(CXX) $(CXXFLAGS) fuzz/$@.o $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ # fuzzers that use the custom mutator - these expect a SSH network stream @@ -325,7 +325,7 @@ fuzzer-%.options: Makefile echo "[libfuzzer]" > $@ echo "max_len = 50000" >> $@ -# run this to update hardcoded hostkeys for for fuzzing. +# run this to update hardcoded hostkeys for for fuzzing. # hostkeys.c is checked in to hg. fuzz-hostkeys: dropbearkey -t rsa -f keyr -- cgit v1.2.1