comparison Makefile.in @ 1546:bb8eaa26bc93 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Mon, 26 Feb 2018 22:44:48 +0800
parents 5916af64acd4 198e2ee0f4b1
children 61a793b6e471
comparison
equal deleted inserted replaced
1530:63fa53d3b6c7 1546:bb8eaa26bc93
18 LIBTOM_LIBS=@LIBTOM_LIBS@ 18 LIBTOM_LIBS=@LIBTOM_LIBS@
19 19
20 ifeq (@BUNDLED_LIBTOM@, 1) 20 ifeq (@BUNDLED_LIBTOM@, 1)
21 LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) 21 LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM)
22 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ 22 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) 23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
24 endif 24 endif
25 25
26 OPTION_HEADERS = default_options_guard.h sysoptions.h
26 ifneq ($(wildcard localoptions.h),) 27 ifneq ($(wildcard localoptions.h),)
27 CFLAGS+=-DLOCALOPTIONS_H_EXISTS 28 CFLAGS+=-DLOCALOPTIONS_H_EXISTS
28 LOCALOPTIONS_H=localoptions.h 29 OPTION_HEADERS += localoptions.h
29 endif 30 endif
30 31
31 COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ 32 COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
32 dss.o bignum.o \ 33 dss.o bignum.o \
33 signkey.o rsa.o dbrandom.o \ 34 signkey.o rsa.o dbrandom.o \
101 endif 102 endif
102 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z)))) 103 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z))))
103 CFLAGS+= -DDROPBEAR_CLIENT 104 CFLAGS+= -DDROPBEAR_CLIENT
104 endif 105 endif
105 106
106
107 # these are exported so that libtomcrypt's makefile will use them 107 # these are exported so that libtomcrypt's makefile will use them
108 export CC 108 export CC
109 export CFLAGS 109 export CFLAGS
110 export RANLIB AR STRIP 110 export RANLIB AR STRIP
111 111
124 CFLAGS+=-DPROGRESS_METER 124 CFLAGS+=-DPROGRESS_METER
125 endif 125 endif
126 126
127 all: $(TARGETS) 127 all: $(TARGETS)
128 128
129 # a bit lazy, but safer 129 # for simplicity assume all source depends on all headers
130 HEADERS=$(wildcard $(srcdir)/*.h *.h) 130 HEADERS=$(wildcard $(srcdir)/*.h *.h) $(OPTION_HEADERS)
131 *.o: $(HEADERS) 131 %.o : %.c $(HEADERS)
132 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
133
134 default_options_guard.h: default_options.h
135 @echo Creating $@
136 @printf "/*\n > > > Do not edit this file (default_options_guard.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > [email protected]
137 @$(srcdir)/ifndef_wrapper.sh < $^ >> [email protected]
138 @mv [email protected] $@
132 139
133 strip: $(TARGETS) 140 strip: $(TARGETS)
134 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) 141 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS))
135 142
136 install: $(addprefix inst_, $(TARGETS)) 143 install: $(addprefix inst_, $(TARGETS))
200 207
201 link%: 208 link%:
202 -rm -f $*$(EXEEXT) 209 -rm -f $*$(EXEEXT)
203 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) 210 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
204 211
205 $(STATIC_LTC): 212 $(STATIC_LTC): $(OPTION_HEADERS)
206 $(MAKE) -C libtomcrypt 213 $(MAKE) -C libtomcrypt
207 214
208 $(STATIC_LTM): 215 $(STATIC_LTM): $(OPTION_HEADERS)
209 $(MAKE) -C libtommath 216 $(MAKE) -C libtommath
210 217
211 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean 218 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
212 219
213 ltc-clean: 220 ltc-clean:
227 dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof 234 dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof
228 235
229 distclean: clean tidy 236 distclean: clean tidy
230 -rm -f config.h 237 -rm -f config.h
231 -rm -f Makefile 238 -rm -f Makefile
239 -rm -f default_options_guard.h
232 240
233 tidy: 241 tidy:
234 -rm -f *~ *.gcov */*~ 242 -rm -f *~ *.gcov */*~
235
236 # default_options.h is stored in version control, could not find a workaround
237 # for parallel "make -j" and dependency rules.
238 default_options.h: default_options.h.in
239 @echo Creating $@
240 @echo "/*\n > > > Do not edit this file (default_options.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > [email protected]
241 @$(srcdir)/ifndef_wrapper.sh < $^ >> [email protected]
242 @mv [email protected] $@
243 243
244 ## Fuzzing targets 244 ## Fuzzing targets
245 245
246 # list of fuzz targets 246 # list of fuzz targets
247 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths 247 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths