diff Makefile.in @ 585:d194db6f9453

Use system libtomcrypt/libtommath if available. Doesn't currently build due to clash in rsa_key identifier.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Jul 2010 12:38:46 +0000
parents fb9a341e4454
children 1151059c5eff
line wrap: on
line diff
--- a/Makefile.in	Tue Jul 20 13:54:20 2010 +0000
+++ b/Makefile.in	Wed Jul 21 12:38:46 2010 +0000
@@ -16,6 +16,12 @@
 LTC=libtomcrypt/libtomcrypt.a
 LTM=libtommath/libtommath.a
 
+ifeq (@[email protected], 1)
+LIBTOM_DEPS=$(LTC) $(LTM)
+CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ 
+LIBS+=$(LTC) $(LTM)
+endif
+
 COMMONOBJS=dbutil.o buffer.o \
 		dss.o bignum.o \
 		signkey.o rsa.o random.o \
@@ -70,8 +76,8 @@
 [email protected]@
 [email protected]@
 [email protected]@
-CFLAGS=-I. -I$(srcdir) -I$(srcdir)/libtomcrypt/src/headers/ $(CPPFLAGS) @[email protected]
-LIBS=$(LTC) $(LTM) @[email protected]
+CFLAGS=-I. -I$(srcdir) $(CPPFLAGS) @[email protected]
[email protected]@
 [email protected]@
 
 [email protected]@
@@ -107,10 +113,6 @@
 	CFLAGS+=-DPROGRESS_METER
 endif
 
-#%: $(HEADERS)
-#%: $(HEADERS) Makefile
-# TODO
-
 all: $(TARGETS)
 
 strip: $(TARGETS)
@@ -154,8 +156,7 @@
 dropbearkey: $(dropbearkeyobjs)
 dropbearconvert: $(dropbearconvertobjs)
 
-dropbear dbclient dropbearkey dropbearconvert: $(HEADERS)  $(LTC) $(LTM) \
-													Makefile
+dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
 	$(CC) $(LDFLAGS) -o [email protected]$(EXEEXT) $([email protected]) $(LIBS)
 
 # scp doesn't use the libs so is special.
@@ -172,7 +173,7 @@
 
 dropbearmulti: multilink 
 
-multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
+multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
 	$(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
 
 multilink: multibinary $(addprefix link, $(PROGRAMS))