⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile.in

📁 伯克利做的SFTP安全文件传输协议
💻 IN
字号:
# Makefile.in# template Makefile for SafeTP; ./configure generates final# Makefile from this one# main targetall: gnumaketest libs execs success-report# --- debugging flags ---#diagnostics = -DSFTPD_DIAGNOSTICS -DSFTPC_DIAGNOSTICS \#              -DSOCKUTIL_DIAGNOSTICSdiagnostics =# SAFETP: enable my modifications to Wei Dai's libcryptodefines = -DSAFETP ${diagnostics}includes = -Icrypto## libgmp.a is the GNU Multi-Precision math library, available# from prep.ai.mit.edu; if it's not installed into a directory# where g++ will find it (e.g. /usr/local/lib), create a symlink# in sftpd's directory (.) to wherever it actually resides#libraries = -L. -lsftp -lsmcrypto -lextras @LDFLAGS@ccflags = @CXXFLAGS@ @CPPFLAGS@compile = @CXX@ -c ${ccflags} ${defines} ${includes}link = @CXX@ ${ccflags} ${defines} ${includes}linkend = ${libraries}makelib = ar -rranlib = ranlib# method to compile .cpp to .o (more reliable than ".cpp.o" method)%.o : %.cpp	${compile} $< -o $@# main debugging targetalldb: libs tests execs success-report# check that the Makefile isn't out of dateMakefile: Makefile.in	./config.status# libraries, necessary for most executableslibdep1 = libextras.alibdep2 = ${libdep1} libsmcrypto.alibdep3 = ${libdep2} libsftp.alibs: ${libdep3}# main executables:#   makekeys: make user's keys#   viewkey:  display user's keys (DSA public key is one of primary interest)#   sftpc:    command-line SafeTP client#   sftpd:    SafeTP proxy server#   myinetd:  for running the server as non-root#   addent:   stand-alone entropy-gathering toolexecs-files = makekeys viewkey sftpc sftpd myinetd addentexecs: ${execs-files}# test programs, only necessary during debugging# 'provider' is the most important test; if it is# successful, it's most likely all else would pass tootests-files = datablok tsint sdsa selgamal tdes tsha texcept crc \              blokutil nonport tpool sec_de3s provider sockutiltests: ${tests-files}# printed after a successful 'make'success-report:	@echo ""	@echo "Finished SafeTP build."	@echo "The important binaries are sftpd, sftpc, makekeys and viewkey"	@echo "You may want to do '$(MAKE) check', which will compile and run"	@echo "unit tests for each of the major modules."# test for GNU make (without it the CFLAGS aren't used, among other things)gnumaketest:	@if [ "x${MAKE_VERSION}" = "x" ]; then \	  echo "You need to use GNU make, which can be retrieved from" ; \	  echo "  ftp://ftp.gnu.org/pub/gnu/make/" ; \	  echo "(Sometimes GNU make is installed as 'gmake'.)" ; \	  exit 1 ; \	fi# delete compiling byproducts# (don't kill *.a because that kills my libgmp.a symlink)clean:	rm -f lib{extras,smcrypto,sftp}.a *~ */*~	rm -f *.o *.ii *.vti *.ti	cd crypto; rm -f *.o *.ii *.vti *.ti# delete executablesclean-execs:	rm -f ${execs-files}clean-tests:	rm -f ${tests-files} tempfile.blk	rm -rf test.dir weak.keys testconfig check.pl.out testinstall.log# clean the docs directory (which isn't "built" by# this makefile, but accumulates garbage during development)clean-docs:	rm -f doc/*.gif doc/*~veryclean: clean clean-execs clean-tests clean-docs	@echo Done verycleaning.distclean: veryclean	rm -f Makefile config.status config.cache config.log	cp Makefile.dummy Makefile# ------------------- libraries -------------------------# extras: library of low-dependency utilitiesextras-objs = \  breaker.o crc.o datablok.o exc.o missing.o nonport.o str.o \  strtokp.o syserr.o warn.olibextras.a: ${extras-objs}	${makelib} libextras.a ${extras-objs}	${ranlib} $@# smcrypto: cryptographic primitives, dependent only on extrassmcrypto-objs = \  gmp_si.o intutils.o \  blokutil.o sdsa.o security.o selgamal.o shmac.o ssha.o \  trans.o crypto/asn.o crypto/cryptlib.o crypto/des.o \  crypto/dessp.o \  crypto/md5.o crypto/misc.o crypto/modes.o \  crypto/queue.o crypto/randpool.o crypto/rng.olibsmcrypto.a: ${smcrypto-objs}	${makelib} libsmcrypto.a ${smcrypto-objs}	${ranlib} $@# sftp: protocol primitives and utilities, dependent on extras & smcryptosftp-objs = \  base64.o base64t.o cryputil.o digt.o entropy.o filesrc.o \  filkeydb.o globrand.o keydb.o keyutils.o lineread.o \  memsrc.o provider.o reply.o request.o sec_clr.o sec_de3s.o \  sftp.o sftpver.o socksrc.o sockutil.olibsftp.a: ${sftp-objs}	${makelib} libsftp.a ${sftp-objs}	${ranlib} $@# ----------- tool-generated ---------------------------# line-ending conversions# (the .cpp files are in dist, so these rules usually won't be used)# (also, note that the .lex files contain the output file names)crlf2lf.cpp: crlf2lf.lex	flex crlf2lf.lexlf2crlf.cpp: lf2crlf.lex	flex lf2crlf.lexcrlfthru.cpp: crlfthru.lex	flex crlfthru.lex# ---------- main executables -------------# displays user's keys (DSA public key is one of primary interest)# (Bug workaround: even though viewkey does not use any of the# functions in addent.o or weakkey.o, if I don't link with them,# gcc-2.95.{1,2} will die with a cryptic linker error due to very# stupid template instantiation mechanism)viewkey: libextras.a libsmcrypto.a libsftp.a viewkey.cpp addent.o weakkey.o	${link} -o viewkey viewkey.cpp addent.o weakkey.o ${linkend}# makes user's keysmakekeys-objs = \  addent.o makekeys.cpp usercfg.o weakkey.omakekeys: libextras.a libsmcrypto.a libsftp.a ${makekeys-objs}	${link} -o makekeys -DMAKEKEYS_MAIN ${makekeys-objs} ${linkend}# unix SafeTP clientsftpc-objs = \  addent.o crlf2lf.o crlfthru.o glob.o lf2crlf.o makekeys.o \  sftpc.cpp sftpcdoc.o usercfg.o weakkey.osftpc: libextras.a libsmcrypto.a libsftp.a ${sftpc-objs}	${link} ${no-warnings} -o sftpc ${sftpc-objs} ${linkend}# SafeTP proxy serversftpd: libextras.a libsmcrypto.a libsftp.a sftpd.cpp	${link} ${no-warnings} -o sftpd sftpd.cpp ${linkend}# for running the server as non-rootmyinetd: ${libdep3} myinetd.cpp	${link} -o myinetd myinetd.cpp ${linkend}# add entropy directlyaddent: libextras.a libsmcrypto.a libsftp.a addent.cpp usercfg.o	${link} -o addent -DADDENT_MAIN addent.cpp usercfg.o ${linkend}# ----------- important test programs ------------------# tests whether crypto library (in particular, Integer# class) is happytsint: libextras.a libsmcrypto.a tsint.cpp	${link} -o tsint tsint.cpp -L. -lsmcrypto -lextras ${linkend}# test DSA# (Bug workaround: usercfg.o required under gcc-2.95.{1,2})sdsa: libextras.a libsmcrypto.a sdsa.cpp usercfg.o	${link} -o sdsa sdsa.cpp -DTEST_SDSA usercfg.o ${linkend}# test ElGamalselgamal: libextras.a libsmcrypto.a selgamal.cpp	${link} -o selgamal selgamal.cpp -DTEST_SELGAMAL ${linkend}# test Triple-DEStdes: libextras.a libsmcrypto.a tdes.cpp	${link} -o tdes tdes.cpp ${linkend}# test DES alonedes: libextras.a libsmcrypto.a crypto/des.cpp usercfg.o	${link} -o des -DDES_TEST crypto/des.cpp usercfg.o ${linkend}# test SHAtsha: libextras.a libsmcrypto.a tsha.cpp	${link} -o tsha tsha.cpp ${linkend}# test the runtime's exception-handling ability# (many runtimes still have deficiencies that I# am unable to isolate in a test program)texcept: libextras.a texcept.cpp	${link} -o texcept texcept.cpp libextras.a @LDFLAGS@# test the nonportable routinesnonport: nonport.cpp	${link} -o nonport -DTEST_NONPORT nonport.cpp ${platform_libraries}# tests the X-SafeTP1 protocol negotiation and communication,# all within the safety of a single address space# (NOTE: requires that 'makekeys' has already been run.)provider: libextras.a libsmcrypto.a libsftp.a provider.cpp usercfg.o	${link} -o provider -DTEST_PROVIDER provider.cpp usercfg.o ${linkend}# to be safe, make sure this outputs random bytes... (an early# bug manifested itself on a Linux system by only outputting# one of 4 or 5 values)tpool: libextras.a libsmcrypto.a libsftp.a tpool.cpp usercfg.o	${link} -o tpool tpool.cpp usercfg.o ${linkend}# ---------- less-important tests --------------# test datablok moduledatablok: libextras.a datablok.cpp	${link} -o datablok -DDATABLOK_TEST datablok.cpp ${linkend}# test blokutil moduleblokutil: libextras.a libsmcrypto.a blokutil.cpp	${link} -o blokutil -DTEST_BLOKUTIL blokutil.cpp -L. \		-lsmcrypto -lextras ${linkend}# this tests Triple-DES in CBC mode, but 'provider' does that# more convincinglysec_de3s: libextras.a libsmcrypto.a libsftp.a sec_de3s.cpp usercfg.o	${link} -o sec_de3s -DTEST_SEC_DE3S sec_de3s.cpp usercfg.o ${linkend}# this includes the endian check...socktest: socktest.cpp libextras.a sockutil.o	${link} -o socktest socktest.cpp sockutil.o libextras.a ${linkend}# tests in sockutil itselfsockutil: sockutil.cpp libextras.a	${link} -o sockutil -DTEST_SOCKUTIL sockutil.cpp ${linkend}# test that CRC32 is working correctlycrc: crc.cpp	${link} -o crc -DTEST_CRC crc.cpp @LDFLAGS@# ----------- experimenting with inetd stuff ---------------# testing exec handofftestanon: libextras.a testanon.cpp	${link} -o testanon testanon.cpp ${linkend}# listen, accept, dup2, read/write, all in one processsiminetd: libextras.a libsftp.a siminetd.cpp	${link} -o siminetd siminetd.cpp ${linkend}# copy stdin to stdout using socket calls (recv/send)myecho: ${libdep3} myecho.cpp	${link} -o myecho myecho.cpp ${linkend}# map service name to port numbergetserv: getserv.cpp	${link} -o getserv getserv.cpp# same as getserv, but using sockutil's getServByNamegetserv2: ${libdep3} getserv2.cpp	${link} -o getserv2 getserv2.cpp ${linkend}# forwarderforward: ${libdep3} forward.cpp	${link} -o forward forward.cpp ${linkend}# socket serversktsrvr: ${libdep3} sktsrvr.cpp	${link} -o sktsrvr sktsrvr.cpp ${linkend}# syslog testertsyslog: tsyslog.cpp	${link} -o tsyslog tsyslog.cpp# string hex format testerstr: libextras.a str.cpp	${link} -o str -DTEST_STR str.cpp -L. -lextras# -------------------- "installation" -----------------------install:	@echo Please read install.txt for instructions.	exit# --------------- automatic self-test --------------------# just the noninteractive testscheck: gnumaketest libs execs ${tests-files}	perl sc/check.pl	@echo "SafeTP's subsystems all seem to be working."	@echo "See install.txt for info on installation."# sample session testcheck-ses: makekeys	./sc/basictests	@echo "Sample session appears to work."

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -