diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-19 22:16:50 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-19 22:16:50 +0800 |
commit | 3f3f3992315ae73670127ce2a3c2216c4313604d (patch) | |
tree | 24e3d795f36ffb9d718d74a0d7a9a410555d9d9c /Makefile.in | |
parent | 316c923188bd5d1f835cf3a5e22ee39e89b8e8d5 (diff) |
- Fix dependencies and remove old default_options.h from version control
- Rename default_options.h.in -> default_options.h, and
default_options.h -> default_options_guard.h
- Fix newlines in default_options.h
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Makefile.in b/Makefile.in index 8c9fbfe..1d5f7ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,9 +23,10 @@ CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ 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 \ @@ -98,7 +99,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 @@ -121,9 +121,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)) @@ -197,10 +204,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 @@ -224,14 +231,7 @@ 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 $@ |