comparison Makefile.in @ 1297:5abbecdecba4

Add generated header default_options.h to version control. This is a workaround since I cannot figure how to get dependencies to work properly with "make -j"
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 17:59:34 +0200
parents 750ec4ec4cbe
children 3fdd8c5a0195 b8764eee6bdb
comparison
equal deleted inserted replaced
1296:6959c88c8f13 1297:5abbecdecba4
159 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 159 $(INSTALL) -d $(DESTDIR)$(mandir)/man1
160 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi 160 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi
161 161
162 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) 162 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS))
163 163
164
165 # for some reason the rule further down doesn't like $($@objs) as a prereq. 164 # for some reason the rule further down doesn't like $($@objs) as a prereq.
166 dropbear: $(dropbearobjs) 165 dropbear: $(dropbearobjs)
167 dbclient: $(dbclientobjs) 166 dbclient: $(dbclientobjs)
168 dropbearkey: $(dropbearkeyobjs) 167 dropbearkey: $(dropbearkeyobjs)
169 dropbearconvert: $(dropbearconvertobjs) 168 dropbearconvert: $(dropbearconvertobjs)
198 197
199 link%: 198 link%:
200 -rm -f $*$(EXEEXT) 199 -rm -f $*$(EXEEXT)
201 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) 200 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
202 201
203 $(STATIC_LTC): options.h default_options.h 202 $(STATIC_LTC): options.h
204 cd libtomcrypt && $(MAKE) 203 $(MAKE) -C libtomcrypt
205 204
206 $(STATIC_LTM): options.h default_options.h 205 $(STATIC_LTM): options.h
207 cd libtommath && $(MAKE) 206 $(MAKE) -C libtommath
208
209 %.o: default_options.h
210 207
211 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean 208 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
212 209
213 ltc-clean: 210 ltc-clean:
214 cd libtomcrypt && $(MAKE) clean 211 $(MAKE) -C libtomcrypt clean
215 212
216 ltm-clean: 213 ltm-clean:
217 cd libtommath && $(MAKE) clean 214 $(MAKE) -C libtommath clean
218 215
219 sizes: dropbear 216 sizes: dropbear
220 objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn 217 objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn
221 218
222 clean: ltc-clean ltm-clean thisclean 219 clean: ltc-clean ltm-clean thisclean
223 220
224 thisclean: 221 thisclean:
225 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \ 222 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \
226 dropbearmulti *.o *.da *.bb *.bbg *.prof default_options.h 223 dropbearmulti *.o *.da *.bb *.bbg *.prof
227 224
228 distclean: clean tidy 225 distclean: clean tidy
229 -rm -f config.h 226 -rm -f config.h
230 -rm -f Makefile 227 -rm -f Makefile
231 228
232 tidy: 229 tidy:
233 -rm -f *~ *.gcov */*~ 230 -rm -f *~ *.gcov */*~
234 231
232 # default_options.h is stored in version control, could not find a workaround
233 # for parallel "make -j" and dependency rules.
235 default_options.h: default_options.h.in 234 default_options.h: default_options.h.in
236 echo "# > > > Generated from $^, edit that file instead !" > $@ 235 echo "# > > > Generated from $^, edit that file instead !" > [email protected]
237 echo >> $@ 236 echo >> [email protected]
238 $(srcdir)/ifndef_wrapper.sh < $^ > $@ 237 $(srcdir)/ifndef_wrapper.sh < $^ > [email protected]
238 mv [email protected] $@