CC_ADD = -g BUILDBINS = main OBJ_main = b64.o channels.o cmdline.o hkdb.o keygen.o main.o pkt-util.o\ pollloop.o pp.o remote.o rnd.o small-primes.o stdio-util.o str.o\ transport.o userauth-conn.o ARCH != uname -m .if exists(dequal-$(ARCH).s) || exists(dequal-$(ARCH).S) OBJ_main += dequal-$(ARCH).o .else OBJ_main += dequal-generic.o .endif OBJ_main += algs.a LIBS_main = -larc4 -lblowfish -ldes -ldsa -lgmp -lidea -lmd5 -lsha\ -lsha1 # The algorithm lists below are in order of default preference # Algorithms known to be offered by other implementations but not yet here: # ENC: aes128-cbc cast128-cbc aes192-cbc aes256-cbc # COMP: zlib # MAC: hmac-ripemd160 ENCALGS = arcfour idea_cbc 3des_cbc none blowfish_cbc COMPALGS = none MACALGS = hmac_sha1 hmac_sha1_96 hmac_md5 hmac_md5_96 none KEXALGS = diffie_hellman_group1_sha1 diffie_hellman_group_exchange_sha1 HKALGS = ssh_rsa ssh_dss UAALGS = publickey none # Preferences do not apply here; we are just using the algorithm machinery. HASHALGS = sha1 md5 ENC_O = $(ENCALGS:C/.*/encalg-&.o/) COMP_O = $(COMPALGS:C/.*/compalg-&.o/) MAC_O = $(MACALGS:C/.*/macalg-&.o/) KEX_O = $(KEXALGS:C/.*/kexalg-&.o/) HK_O = $(HKALGS:C/.*/hkalg-&.o/) HASH_O = $(HASHALGS:C/.*/hashalg-&.o/) UA_O = $(UAALGS:C/.*/uaalg-&.o/) ALGS_O = $(ENC_O) $(COMP_O) $(MAC_O) $(KEX_O) $(HK_O) $(HASH_O) $(UA_O) .MAIN: $(BUILDBINS) PREDEPEND += algs-list.c CLEANFILES += algs-list.c algs-list.c: Makefile make-algs-list ./make-algs-list \ $(ENCALGS:C/.*/-e &/) \ $(COMPALGS:C/.*/-c &/) \ $(MACALGS:C/.*/-m &/) \ $(KEXALGS:C/.*/-x &/) \ $(HKALGS:C/.*/-k &/) \ $(HASHALGS:C/.*/-h &/) \ $(UAALGS:C/.*/-u &/) \ > algs-list.c CLEANFILES += algs.a $(ALGS_O) algs.o algs-list.o alg-util.o X = .for f in $(ALGS_O) algs.o algs-list.o alg-util.o algs.a($f): $f ar rv algs.a $f X += algs.a($f) .endfor algs.a: $X ranlib algs.a .include