diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in index b942b55..90598a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,12 +20,13 @@ LIBTOM_LIBS=@LIBTOM_LIBS@ ifeq (@BUNDLED_LIBTOM@, 1) LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ -LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) +LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) endif +OPTION_HEADERS = default_options_guard.h sysoptions.h ifneq ($(wildcard localoptions.h),) CFLAGS+=-DLOCALOPTIONS_H_EXISTS -LOCALOPTIONS_H=localoptions.h +OPTION_HEADERS += localoptions.h endif COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ @@ -103,7 +104,6 @@ ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z) CFLAGS+= -DDROPBEAR_CLIENT endif - # these are exported so that libtomcrypt's makefile will use them export CC export CFLAGS @@ -126,9 +126,16 @@ endif all: $(TARGETS) -# a bit lazy, but safer -HEADERS=$(wildcard $(srcdir)/*.h *.h) -*.o: $(HEADERS) +# for simplicity assume all source depends on all headers +HEADERS=$(wildcard $(srcdir)/*.h *.h) $(OPTION_HEADERS) +%.o : %.c $(HEADERS) + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + +default_options_guard.h: 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 + @mv $@.tmp $@ strip: $(TARGETS) $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) @@ -202,10 +209,10 @@ link%: -rm -f $*$(EXEEXT) -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) -$(STATIC_LTC): +$(STATIC_LTC): $(OPTION_HEADERS) $(MAKE) -C libtomcrypt -$(STATIC_LTM): +$(STATIC_LTM): $(OPTION_HEADERS) $(MAKE) -C libtommath .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean @@ -229,18 +236,11 @@ thisclean: distclean: clean tidy -rm -f config.h -rm -f Makefile + -rm -f default_options_guard.h tidy: -rm -f *~ *.gcov */*~ -# default_options.h is stored in version control, could not find a workaround -# for parallel "make -j" and dependency rules. -default_options.h: default_options.h.in - @echo Creating $@ - @echo "/*\n > > > Do not edit this file (default_options.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > $@.tmp - @$(srcdir)/ifndef_wrapper.sh < $^ >> $@.tmp - @mv $@.tmp $@ - ## Fuzzing targets # list of fuzz targets |