comparison Makefile.in @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents a90fdd2d2ed8 2d450c1056e3
children bb8eaa26bc93
comparison
equal deleted inserted replaced
1457:32f990cc96b1 1511:5916af64acd4
23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) 23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
24 endif 24 endif
25 25
26 ifneq ($(wildcard localoptions.h),) 26 ifneq ($(wildcard localoptions.h),)
27 CFLAGS+=-DLOCALOPTIONS_H_EXISTS 27 CFLAGS+=-DLOCALOPTIONS_H_EXISTS
28 LOCALOPTIONS_H=localoptions.h
28 endif 29 endif
29 30
30 COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ 31 COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
31 dss.o bignum.o \ 32 dss.o bignum.o \
32 signkey.o rsa.o dbrandom.o \ 33 signkey.o rsa.o dbrandom.o \
58 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o 59 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o
59 60
60 ifeq (@DROPBEAR_FUZZ@, 1) 61 ifeq (@DROPBEAR_FUZZ@, 1)
61 COMMONOBJS += fuzz-common.o fuzz-wrapfd.o 62 COMMONOBJS += fuzz-common.o fuzz-wrapfd.o
62 endif 63 endif
63
64 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \
65 dss.h bignum.h signkey.h rsa.h dbrandom.h service.h auth.h \
66 debug.h channel.h chansession.h config.h queue.h sshpty.h \
67 termcodes.h gendss.h genrsa.h runopts.h includes.h \
68 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
69 listener.h fake-rfc2553.h ecc.h ecdsa.h
70 64
71 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) 65 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS)
72 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) 66 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
73 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) 67 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
74 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) 68 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
100 94
101 STATIC=@STATIC@ 95 STATIC=@STATIC@
102 96
103 # whether we're building client, server, or both for the common objects. 97 # whether we're building client, server, or both for the common objects.
104 # evilness so we detect 'dropbear' by itself as a word 98 # evilness so we detect 'dropbear' by itself as a word
105 space:= $(empty) $(empty)
106 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdropbearZ, Z$(prog)Z)))) 99 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdropbearZ, Z$(prog)Z))))
107 CFLAGS+= -DDROPBEAR_SERVER 100 CFLAGS+= -DDROPBEAR_SERVER
108 endif 101 endif
109 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z)))) 102 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z))))
110 CFLAGS+= -DDROPBEAR_CLIENT 103 CFLAGS+= -DDROPBEAR_CLIENT
130 ifeq ($(SCPPROGRESS), 1) 123 ifeq ($(SCPPROGRESS), 1)
131 CFLAGS+=-DPROGRESS_METER 124 CFLAGS+=-DPROGRESS_METER
132 endif 125 endif
133 126
134 all: $(TARGETS) 127 all: $(TARGETS)
128
129 # a bit lazy, but safer
130 HEADERS=$(wildcard $(srcdir)/*.h *.h)
131 *.o: $(HEADERS)
135 132
136 strip: $(TARGETS) 133 strip: $(TARGETS)
137 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) 134 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS))
138 135
139 install: $(addprefix inst_, $(TARGETS)) 136 install: $(addprefix inst_, $(TARGETS))
203 200
204 link%: 201 link%:
205 -rm -f $*$(EXEEXT) 202 -rm -f $*$(EXEEXT)
206 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) 203 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
207 204
208 $(STATIC_LTC): options.h 205 $(STATIC_LTC):
209 $(MAKE) -C libtomcrypt 206 $(MAKE) -C libtomcrypt
210 207
211 $(STATIC_LTM): options.h 208 $(STATIC_LTM):
212 $(MAKE) -C libtommath 209 $(MAKE) -C libtommath
213 210
214 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean 211 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
215 212
216 ltc-clean: 213 ltc-clean:
237 -rm -f *~ *.gcov */*~ 234 -rm -f *~ *.gcov */*~
238 235
239 # default_options.h is stored in version control, could not find a workaround 236 # default_options.h is stored in version control, could not find a workaround
240 # for parallel "make -j" and dependency rules. 237 # for parallel "make -j" and dependency rules.
241 default_options.h: default_options.h.in 238 default_options.h: default_options.h.in
242 echo "# > > > Generated from $^, edit that file instead !" > [email protected] 239 @echo Creating $@
243 echo >> [email protected] 240 @echo "/*\n > > > Do not edit this file (default_options.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > [email protected]
244 $(srcdir)/ifndef_wrapper.sh < $^ > [email protected] 241 @$(srcdir)/ifndef_wrapper.sh < $^ >> [email protected]
245 mv [email protected] $@ 242 @mv [email protected] $@
246 243
247 ## Fuzzing targets 244 ## Fuzzing targets
248 245
249 # list of fuzz targets 246 # list of fuzz targets
250 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths 247 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths
291 dropbearkey -t ecdsa -size 256 -f keye 288 dropbearkey -t ecdsa -size 256 -f keye
292 echo > hostkeys.c 289 echo > hostkeys.c
293 /usr/bin/xxd -i -a keyr >> hostkeys.c 290 /usr/bin/xxd -i -a keyr >> hostkeys.c
294 /usr/bin/xxd -i -a keye >> hostkeys.c 291 /usr/bin/xxd -i -a keye >> hostkeys.c
295 /usr/bin/xxd -i -a keyd >> hostkeys.c 292 /usr/bin/xxd -i -a keyd >> hostkeys.c
296