makefile

来自「这是用C编写IMAP源代码」· 代码 · 共 1,026 行 · 第 1/2 页

TXT
1,026 行
字号
	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 ACTIVEFILE=/var/lib/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -O"nxt:	# NEXTSTEP	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 BASECFLAGS="-g -O -pipe"nx3:	# NEXTSTEP 3.0 single threaded	$(BUILD) `$(CAT) SPECIALS` OS=nxt \	 CRXTYPE=nfs \	 BASECFLAGS="-g -O -pipe -Wall"	echo "void malloc_singlethreaded (void);" >> linkage.h	echo "  malloc_singlethreaded ();" >> linkage.cosf:	# OSF/1	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 BASECFLAGS="-g3 -w -O2 -Olimit 1500"# Note: sia_become_user() used by LOGINPW=os4 doesn't seem to work right.  The# user doesn't get proper file access, and the process can't be killed.os4:	# OSF/1 (Digital UNIX) 4	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=os4 LOGINPW=os4 CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 BASECFLAGS="-g3 -w -std0 -O2"osx:	# Mac OS X	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 BASECFLAGS="-g -O -Wno-pointer-sign"ptx:	# PTX	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=svo LOGINPW=sv4 CRXTYPE=nfs \	 MAILSPOOL=/usr/mail \	 RSHPATH=/usr/bin/resh \	 BASECFLAGS="-Wc,-O3 -Wc,-seq -Dprivate=PRIVATE" \	 BASELDFLAGS="-lseq -lsec -lsocket -linet -lnsl -lgen" \	 RANLIB=truepyr:	# Pyramid	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 BASECFLAGS="-g -Dconst="qnx:	# QNX	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CHECKPW=psx LOGINPW=old \	 RSHPATH=/usr/ucb/rsh \	 BASECFLAGS="-Otax -g -Dunix=1 -D_POSIX_SOURCE" \	 BASELDFLAGS="-g -N128k -llogin -lsocket -lunix"s40:	# SUN-OS 4.0	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 BASECFLAGS="-g -Dconst="sc5:	# SCO Open Server 5.0	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=sec LOGINPW=sec \	 CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \	 SPOOLDIR=/var/spool \	 ACTIVEFILE=/var/lib/news/active \	 RSHPATH=/usr/bin/rcmd \	 BASECFLAGS="-O3 -s -belf" \	 BASELDFLAGS="-lsocket -lprot -lx -ltinfo -lm" \	 RANLIB=truesco:	# Santa Cruz Operation	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=sv4 CHECKPW=sec LOGINPW=sec \	 CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \	 RSHPATH=/usr/bin/rcmd \	 BASECFLAGS="-O3" \	 BASELDFLAGS="-lsocket -lprot -lcrypt_i -lx -los" \	 RANLIB=true LN=ln# Note: setting _POSIX_SOURCE doesn't seem to build it as of SGI IRIX 5.3sgi:	# Silicon Graphics	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=sv4 CRXTYPE=nfs \	 MAILSPOOL=/usr/mail \	 RSHPATH=/usr/bsd/rsh \	 BASECFLAGS="-g3 -O2 -Olimit 8192" \	 RANLIB=truesg6:	# Silicon Graphics, IRIX 6.5	MAKEFLAGS= $(BUILD) `$(CAT) SPECIALS` OS=sgi \	 SIGTYPE=sv4 CRXTYPE=nfs \	 MAILSPOOL=/usr/mail \	 RSHPATH=/usr/bsd/rsh \	 BASECFLAGS="-g3 -O2 -OPT:Olimit=0 -woff 1110,1116" \	 RANLIB=true# Note: Mark Kaesling says that setluid() isn't in HP-UX with SecureWare.shp:	# HP-UX with Trusted Computer Base	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=sec CRXTYPE=nfs \	 SPOOLDIR=/var \	 ACTIVEFILE=/var/news/active \	 RSHPATH=/usr/bin/remsh \	 BASECFLAGS="-g -Ae" \	 BASELDFLAGS="-lnet -lV3 -lsec" \	 RANLIB=trueslx:	# Secure Linux	@echo You are building for libc6/glibc versions of Secure Linux	@echo If you want libc5 versions you must use sl5 instead!	@echo If you want libc4 versions you must use sl4 instead!	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 ACTIVEFILE=/var/lib/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -fno-omit-frame-pointer $(GCCOPTLEVEL)" \	 BASELDFLAGS="-lcrypt"sl4:	# Secure Linux using libc4	@echo You are building for libc4 versions of Secure Linux	@echo If you want libc6/glibc versions you must use slx instead!	@echo If you want libc5 versions you must use sl5 instead!	$(BUILD) `$(CAT) SPECIALS` OS=slx \	 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 ACTIVEFILE=/var/lib/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -fno-omit-frame-pointer $(GCCOPTLEVEL)" \	 BASELDFLAGS="-lshadow"sl5:	# Secure Linux using libc5	@echo You are building for libc5 versions of Secure Linux	@echo If you want libc6/glibc versions you must use slx instead!	@echo If you want libc4 versions you must use sl4 instead!	$(BUILD) `$(CAT) SPECIALS` OS=slx \	 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool \	 ACTIVEFILE=/var/lib/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -fno-omit-frame-pointer $(GCCOPTLEVEL)"snx:	# Siemens Nixdorf SINIX and Reliant UNIX	$(BUILD) `$(CAT) SPECIALS` OS=sv4 \	 SIGTYPE=psx CHECKPW=sv4 \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 ACTIVEFILE=/usr/share/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -D_SYS_CLOCK_H -Dconst=" \	 BASELDFLAGS="-lsocket -lnsl -lgen" \	 RANLIB=true# Sorry about the -w, but the cretinous SUN Workshop Pro C compiler barfs on# implicit casts between char and unsigned char.soc:	os_sol.h	# Solaris with cc	$(BUILD) `$(CAT) SPECIALS` OS=sol \	 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 ACTIVEFILE=/usr/share/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -O -w" \	 BASELDFLAGS="-lsocket -lnsl -lgen" \	 RANLIB=true CC=/opt/SUNWspro/bin/cc# Note: It is a long and disgusting story about why cc is set to ucbcc.  You# need to invoke the C compiler so that it links with the SVR4 libraries and# not the BSD libraries, otherwise readdir() will return the wrong information.# Of all the names in the most common path, ucbcc is the only name to be found# (on /usr/ccs/bin) that points to a suitable compiler.  cc is likely to be# /usr/ucb/cc which is absolutely not the compiler that you want.  The real# SVR4 cc is probably something like /opt/SUNWspro/bin/cc which is rarely in# anyone's path.## ucbcc is probably a link to acc, e.g. /opt/SUNWspro/SC4.0/bin/acc, and is# the UCB C compiler using the SVR4 libraries.## If ucbcc isn't on your system, then punt on the SUN C compiler and use gcc# instead (the gso port instead of the sol port).# # If, in spite of all the above warnings, you choose to use the "soc" port# instead of the "sol" port, be sure to check the behavior of the LIST command# in imapd.  Also, note that the "soc" port uses -O.  If you want to use the# real SVR4 compiler, you must use -O.  If it works to compile with -O2, then# cc is probably using the UCB compiler with BSD libraries, and will not build# a good binary## To recap:# 1) The sol port is designed to be built using the UCB compiler using the#    SVR4 libraries.  This compiler is "ucbcc", which is lunk to acc.  You#    use -O2 as one of the CFLAGS.# 2) If you build the sol port with the UCB compiler using the BSD libraries,#    you will get no error messages but you will get bad binaries (the most#    obvious symptom is dropping the first two characters return filenames#    from the imapd LIST command.  This compiler also uses -O2, and is very#    often what the user gets from "cc".  BEWARE!!!# 3) If you build the sol port with the real SVR4 compiler, which is often#    hidden away or unavailable on many systems, then you will get errors#    from -O2 and you need to change that to -O.  But you will get a good#    binary.  However, you should try it with -O2 first, to make sure that#    you got this compiler and not the UCB compiler using BSD libraries.sol:	os_sol.h	# Solaris	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 ACTIVEFILE=/usr/share/news/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g -O2" \	 BASELDFLAGS="-lsocket -lnsl -lgen" \	 RANLIB=true CC=ucbccsos:	# Secure OSF/1	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=sce LOGINPW=sec CRXTYPE=nfs \	 BASECFLAGS="-g3 -w -O2 -Olimit 1500" \	 BASELDFLAGS="-lsecurity -laud"ssn:	# Secure SUN-OS	$(BUILD) `$(CAT) SPECIALS` OS=sun \	 CHECKPW=ssn CRXTYPE=nfs \	 BASECFLAGS="-g -Dconst=" \	 BASELDFLAGS="-ldl"sun:	# SUN-OS	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 BASECFLAGS="-g -Dconst=" \	 BASELDFLAGS="-ldl"sv2:	# SVR2	@echo You are being *very* optimistic!	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=sv4 LOGINPW=old \	 MAILSPOOL=/usr/mail \	 RSHPATH=/usr/bin/remsh \	 BASECFLAGS="-Dconst= -DSYSTEM5 -DSHORT_IDENT -I/usr/ethernet/include" \	 BASELDFLAGS="-lnet" \	 RANLIB=true LN=lnsv4:	# SVR4	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=sv4 CHECKPW=sv4 LOGINPW=sv4 \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 ACTIVEFILE=/usr/share/news/active \	 RSHPATH=/usr/bin/resh \	 BASECFLAGS="-g -Dconst=" \	 BASELDFLAGS="-lsocket -lnsl -lgen" \	 RANLIB=trueult:	# Ultrix	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 SIGTYPE=psx CHECKPW=ult CRXTYPE=nfs \	 BASECFLAGS="-g3 -O2 -Olimit 1500 -Dconst=" \	 BASELDFLAGS="-lauth -lc"uw2:	# UnixWare SVR4.2	$(BUILD) `$(CAT) SPECIALS` OS=sv4 \	 SIGTYPE=sv4 CHECKPW=sv4 \	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \	 ACTIVEFILE=/var/news/lib/active \	 RSHPATH=/usr/bin/rsh \	 BASECFLAGS="-g" \	 BASELDFLAGS="-lsocket -lnsl -lgen" \	 RANLIB=truevul:	# VAX Ultrix	$(BUILD) `$(CAT) SPECIALS` OS=ult \	 SIGTYPE=psx CHECKPW=ult CRXTYPE=nfs \	 BASECFLAGS="-O2 -Dconst=" \	 BASELDFLAGS="-lauth -lc"vu2:	# VAX Ultrix 2.3, etc.	$(BUILD) `$(CAT) SPECIALS` OS=$@ \	 CRXTYPE=nfs \	 BASECFLAGS="-O2 -Dconst= -Dvoid=char"# Build it!build:	clean once $(ARCHIVE)all:	$(ARCHIVE)$(ARCHIVE): $(BINARIES)	sh -c '$(RM) $(ARCHIVE) || true'	@$(CAT) ARCHIVE	@$(SH) ARCHIVE.c.o:	`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c# Cleanupclean:	sh -c '$(RM) auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'# Dependenciesdummy.o: mail.h misc.h osdep.h dummy.hfdstring.o: mail.h misc.h osdep.h fdstring.hflstring.o: mail.h misc.h osdep.h flstring.himap4r1.o: mail.h misc.h osdep.h imap4r1.h rfc822.hmail.o: mail.h misc.h osdep.h rfc822.h linkage.hmbx.o: mail.h misc.h osdep.h mbx.h dummy.hmh.o: mail.h misc.h osdep.h mh.h dummy.hmx.o: mail.h misc.h osdep.h mx.h dummy.hmisc.o: mail.h misc.h osdep.hmmdf.o: mail.h misc.h osdep.h pseudo.h dummy.hmtx.o: mail.h misc.h osdep.h dummy.hnetmsg.o: mail.h misc.h osdep.h netmsg.hnews.o: mail.h misc.h osdep.hnewsrc.o: mail.h misc.h osdep.h newsrc.hnntp.o: mail.h misc.h osdep.h netmsg.h smtp.h nntp.h rfc822.hphile.o: mail.h misc.h osdep.h rfc822.h dummy.hpseudo.o: pseudo.hpop3.o: mail.h misc.h osdep.h rfc822.hsmanager.o: mail.h misc.h osdep.hsmtp.o: mail.h misc.h osdep.h smtp.h rfc822.hrfc822.o: mail.h misc.h osdep.h rfc822.htenex.o: mail.h misc.h osdep.h dummy.hunix.o: mail.h misc.h osdep.h unix.h pseudo.h dummy.hutf8.o: mail.h misc.h osdep.h utf8.h# OS-dependentosdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \	osdep.h env_unix.h tcp_unix.h \	osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\	auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c nfstest.c fsync.c \	gethstid.c getspnam.c \	gr_wait.c gr_wait4.c gr_waitp.c \	kerb_mit.c \	auth_gss.c auth_log.c auth_md5.c auth_pla.c \	pmatch.c scandir.c setpgrp.c strerror.c truncate.c write.c \	memmove.c memmove2.c memset.c \	tz_bsd.c tz_nul.c tz_sv4.c \	write.c sslstdio.c \	strerror.c strpbrk.c strstr.c strtok.c strtoul.c \	OSCFLAGS	@echo Building OS-dependent module	@echo If you get No such file error messages for files x509.h, ssl.h,	@echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL	@echo is not installed on your system.  Either install OpenSSL first	@echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none	`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.cosdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c	$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.cosdepbas.c:	@echo osdepbas.c not found...try make clean and new make	@falseosdepckp.c:	@echo osdepckp.c not found...try make clean and new make	@falseosdeplog.c:	@echo osdeplog.c not found...try make clean and new make	@falseosdepssl.c:	@echo osdepssl.c not found...try make clean and new make	@falsenfstest.c:	@echo nfstest.c not found...try make clean and new make	@falsesiglocal.c:	@echo siglocal.c not found...try make clean and new make	@falsecrexcl.c:	@echo crexcl.c not found...do make clean and new make	@falseip_unix.c:	@echo ip_unix.c not found...do make clean and new make	@falseos_sol.h:	sh -c '(strings /lib/libc.a | grep getpassphrase > /dev/null) && $(LN) os_soln.h os_sol.h || $(LN) os_solo.h os_sol.h'# Once-only environment setuponce:	onceenv ckp$(PASSWDTYPE) ssl$(SSLTYPE) osdep.conceenv:	@echo Once-only environment setup...	echo $(CC) > CCTYPE	echo $(BASECFLAGS) '$(EXTRACFLAGS)' > CFLAGS	echo -DCREATEPROTO=$(CREATEPROTO) -DEMPTYPROTO=$(EMPTYPROTO) \	 -DMAILSPOOL=\"$(MAILSPOOL)\" \	 -DANONYMOUSHOME=\"$(MAILSPOOL)/anonymous\" \	 -DACTIVEFILE=\"$(ACTIVEFILE)\" -DNEWSSPOOL=\"$(NEWSSPOOL)\" \	 -DRSHPATH=\"$(RSHPATH)\" -DLOCKPGM=\"$(LOCKPGM)\" > OSCFLAGS	echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS	echo "$(ARRC) $(ARCHIVE) $(BINARIES);$(RANLIB) $(ARCHIVE)" > ARCHIVE	echo $(OS) > OSTYPE	./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy	./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS)	$(LN) os_$(OS).h osdep.h	$(LN) os_$(OS).c osdepbas.c	$(LN) log_$(LOGINPW).c osdeplog.c	$(LN) sig_$(SIGTYPE).c siglocal.c	$(LN) crx_$(CRXTYPE).c crexcl.c	$(LN) ip$(IP)_unix.c ip_unix.c	sh -c '(test -f /usr/include/sys/statvfs.h -a $(OS) != sc5 -a $(OS) != sco) && $(LN) nfstnew.c nfstest.c || $(LN) nfstold.c nfstest.c'# Password checkersckpafs:	# AFS	@echo AFS password authentication	echo $(AFSCFLAGS) >> OSCFLAGS#	echo $(AFSLDFLAGS) >> LDFLAGS# Note: Steve Roseman says that AFS libraries have to be lunk before SSL	echo $(AFSLDFLAGS) `$(CAT) LDFLAGS` > LDFLAGS.tmp	mv LDFLAGS.tmp LDFLAGS	$(LN) ckp_afs.c osdepckp.cckpdce:	# DCE	@echo DCE password authentication	echo $(DCECFLAGS) >> OSCFLAGS	echo $(DCELDFLAGS) >> LDFLAGS	$(LN) ckp_dce.c osdepckp.cckpgss:	# Kerberos V (must have gss EXTRAAUTHENTICATOR as well)	@echo Kerberos V password authentication	$(LN) ckp_gss.c osdepckp.cckpnul:	# NUL authenticator (disables all plaintext authentication)	@echo Plaintext authentication prohibited	echo "  mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 1);" >> linkage.c	$(LN) ckp_nul.c osdepckp.cckppam:	# Pluggable Authentication Modules authenticator	@echo PAM password authentication	echo $(PAMLDFLAGS) >> LDFLAGS	$(LN) ckp_pam.c osdepckp.cckppmb:	# Broken (e.g. SUN) Pluggable Authentication Modules authenticator	@echo Broken PAM password authentication	echo $(PAMLDFLAGS) >> LDFLAGS	$(LN) ckp_pmb.c osdepckp.cckpstd:	# Port standard	@echo Standard password authentication	$(LN) ckp_$(CHECKPW).c osdepckp.cckptwo:	# Something plus standard	@echo $(CHECKPWALT) password authentication first, then standard	$(CAT) ckp_1st.c ckp_$(CHECKPWALT).c ckp_2nd.c ckp_$(CHECKPW).c \	 ckp_3rd.c > osdepckp.c# SSL supportsslnone:# No SSL	@echo Building without SSL support	$(LN) ssl_none.c osdepssl.csslnopwd: sslunix snopwdsslunix.nopwd: sslnopwdsslsco.nopwd: sslsco snopwdsslunix: sbasic sldunixsslsco:	sbasic sldscosbasic:	# UNIX OpenSSL	@echo Building with SSL	$(LN) ssl_unix.c osdepssl.c	echo $(SSLCFLAGS) >> OSCFLAGS	echo "  ssl_onceonlyinit ();" >> linkage.csnopwd:	# Plaintext disable	@echo Building with SSL and plaintext passwords disabled unless SSL/TLS	echo "  mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);" >> linkage.csldunix:# Normal UNIX SSL load flags	echo $(SSLLDFLAGS) >> LDFLAGSsldsco:	# SCO SSL load flags# Note: Tim Rice says that SSL has to be lunk before other libraries on SCO.	echo $(SSLLDFLAGS) `cat LDFLAGS` > LDFLAGS.tmp	mv LDFLAGS.tmp LDFLAGS# A monument to a hack of long ago and far away...love:	@echo not war?

⌨️ 快捷键说明

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