comparison Makefile.in @ 366:59531221b846

Fix up separate-directory building for libtomcrypt Use $CC rather than $LD for linking
author Matt Johnston <matt@ucc.asn.au>
date Wed, 11 Oct 2006 16:00:50 +0000
parents 7a11f8de297c
children 0cbe8f6dbf9e
comparison
equal deleted inserted replaced
358:e81d3bc1dc78 366:59531221b846
62 exec_prefix=${prefix} 62 exec_prefix=${prefix}
63 bindir=${exec_prefix}/bin 63 bindir=${exec_prefix}/bin
64 sbindir=${exec_prefix}/sbin 64 sbindir=${exec_prefix}/sbin
65 65
66 CC=@CC@ 66 CC=@CC@
67 LD=@LD@
68 AR=@AR@ 67 AR=@AR@
69 RANLIB=@RANLIB@ 68 RANLIB=@RANLIB@
70 STRIP=@STRIP@ 69 STRIP=@STRIP@
71 INSTALL=@INSTALL@ 70 INSTALL=@INSTALL@
72 CPPFLAGS=@CPPFLAGS@ 71 CPPFLAGS=@CPPFLAGS@
73 CFLAGS=-I. -I$(srcdir)/libtomcrypt/src/headers/ $(CPPFLAGS) @CFLAGS@ 72 CFLAGS=-I. -I$(srcdir) -I$(srcdir)/libtomcrypt/src/headers/ $(CPPFLAGS) @CFLAGS@
74 LIBS=$(LTC) $(LTM) @LIBS@ 73 LIBS=$(LTC) $(LTM) @LIBS@
75 LDFLAGS=@LDFLAGS@ 74 LDFLAGS=@LDFLAGS@
76 75
77 EXEEXT=@EXEEXT@ 76 EXEEXT=@EXEEXT@
78 77
154 dropbearkey: $(dropbearkeyobjs) 153 dropbearkey: $(dropbearkeyobjs)
155 dropbearconvert: $(dropbearconvertobjs) 154 dropbearconvert: $(dropbearconvertobjs)
156 155
157 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \ 156 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \
158 Makefile 157 Makefile
159 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS) 158 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
160 159
161 # scp doesn't use the libs so is special. 160 # scp doesn't use the libs so is special.
162 scp: $(SCPOBJS) $(HEADERS) Makefile 161 scp: $(SCPOBJS) $(HEADERS) Makefile
163 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) 162 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS)
164 163
165 164
166 # multi-binary compilation. 165 # multi-binary compilation.
167 MULTIOBJS= 166 MULTIOBJS=
168 ifeq ($(MULTI),1) 167 ifeq ($(MULTI),1)
171 endif 170 endif
172 171
173 dropbearmulti: multilink 172 dropbearmulti: multilink
174 173
175 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile 174 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
176 $(LD) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) 175 $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
177 176
178 multilink: multibinary $(addprefix link, $(PROGRAMS)) 177 multilink: multibinary $(addprefix link, $(PROGRAMS))
179 178
180 link%: 179 link%:
181 -rm -f $*$(EXEEXT) 180 -rm -f $*$(EXEEXT)
185 cd libtomcrypt && $(MAKE) clean && $(MAKE) 184 cd libtomcrypt && $(MAKE) clean && $(MAKE)
186 185
187 $(LTM): options.h 186 $(LTM): options.h
188 cd libtommath && $(MAKE) 187 cd libtommath && $(MAKE)
189 188
189 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
190
190 ltc-clean: 191 ltc-clean:
191 cd libtomcrypt && $(MAKE) clean 192 cd libtomcrypt && $(MAKE) clean
192 193
193 ltm-clean: 194 ltm-clean:
194 cd libtommath && $(MAKE) clean 195 cd libtommath && $(MAKE) clean