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

📄 makefile

📁 Linux下的socks的程序源程序,用于socks的代理服务
💻
字号:
# Be sure to check the file include/socks.h also and make# modifications as necessary.SHELL=/bin/sh#SOCKS=-DSOCKS# orSOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect# If the second definition of SOCKS is used, you MUST also# define SHORTENED_RBIND# Define SHORTENED_RBIND to make Rbind() take exactly the same# argument list as the regular bind(), i.e., without the additional# 'remhost' argument.SHORTENED_RBIND=-DSHORTENED_RBIND# If your system doesn't have PWD defined, define it here:#PWD=/projects/insg/socks.cstc.4.2beta# It should be this current directory.# If your system has getcwd() but no getwd(), uncomment the next line:#GETCWD=-DGETCWD# Define FASCIST if you want ftp (rftp) to log names of all files transferred#FASCIST=-DFASCIST# Define RCMD and SUPPORT_RCMD if you want to support Rrcmd, which is required# for SOCKSified rlogin, rsh, and rcp.#RCMD=Rrcmd.o#SUPPORT_RCMD=-DSUPPORT_RCMD# Define FOR_PS if your system is not SYSV and you want to have the# command 'ps' show some details of sockd's activity.#FOR_PS=-DFOR_PS# optimization flag for ccOPTIMIZE=-g#OPTIMIZE=-O# Be careful with the OPTIMIZE flag. SunPro's SC2.0.1, for example, is# knwon to produce incorrect code when -O is used.# Define NO_CLIENT_LOG if you don't want SOCKS clients to produce# log entries of its activities.#NO_CLIENT_LOG= -Dopenlog=socks_0openlog -Dsyslog=socks_0syslog -Dcloselog=socks_0closelog# Define DNS_THROUGH_NIS if your SOCKS client hosts let their NIS# servers do the DNS loopkup for them. You are in this category if# your client hosts has no /etc/resolv.conf but can resolve all# internal and external names.#DNS_THROUGH_NIS=-DDNS_THROUGH_NIS# If you get 'herror undefined', 'h_errno undefined', 'herror redefined'# or 'h_errno redefined' error message,# this is the macro to change. Define it or undefine it, whichever# works. The reasons are too messy to explain.#BIND_RESOLVER=-DBIND_RESOLVER# Directory into which to install the man pagesMAN_DEST_DIR = /usr/local/man# Directory into which the SOCKS server should be installedSERVER_BIN_DIR = /usr/etc# Directory into the client programs should be installedCLIENTS_BIN_DIR = /usr/local/bin# SunOS 4.1.x should useCC=cc#CC=gccOTHER_CFLAGS= $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT $(DEBUG)RANLIB=ranlibOS=sun4.1INSTALL=installGETPASS=getpass.oRESOLV_LIB=-lresolv# ... or #RESOLV_LIB=# IRIX 4 should use#CC=cc#RESOLV_LIB=-lsun#OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT#RANLIB=/bin/true#OS=irix4#INSTALL=bsdinstall#GETPASS=getpass.o# IRIX 5 should use#CC=cc#RESOLV_LIB=-lsun#OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS#RANLIB=/bin/true#OS=irix5#INSTALL=bsdinstall#GETPASS=getpass.o# Ultrix 4.0 should use#CC=cc#OTHER_CFLAGS= $(GETCWD) $(SHORTENED_RBIND) $(FASCIST)#RANLIB=ranlib#OS=ultrix4.0#INSTALL=install#GETPASS=getpass.o#RESOLV_LIB=-lresolv# Ultrix 4.3 should use the one below instead#RESOLV_LIB=# Ultrix 4.4 should use the one below instead#RESOLV_LIB=-lresolv -l44bsd# HP-UX should use#CC=cc#OTHER_CFLAGS= $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT#RANLIB=/bin/true#OS=hpux9#INSTALL=install#GETPASS=#RESOLV_LIB=# HPUX does not allow 'nobody' to be used as the user in /etc/inetd.conf,# unless it has a gid between 0 and 60000, which it normally doe not. So# you either have to use a different user in /etc/inetd.conf or change# the gid of 'nobody'.# RS/6000 AIX 3.2 should use#CC=cc#RESOLV_LIB=-lbsd#OTHER_CFLAGS=-D_BSD -D_NONSTD_TYPES -D_NO_PROTO -DAIX $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT#RANLIB=ranlib#OS=aix3.2#INSTALL=bsdinstall#GETPASS=# PS/2 AIX 1.2 should use#CC=cc#RESOLV_LIB=-lbsd#OTHER_CFLAGS=-D_BSD -D_NONSTD_TYPES -D_NO_PROTO -DAIX $(GETCWD) $(FASCIST) -DCOMPAT -I/usr/local/include -DAIX_PS2#RANLIB=ranlib#OS=aix_ps2#INSTALL=install#GETPASS=# SOLARIS should use#CC=cc#RESOLV_LIB=-lresolv -lnsl -lsocket#OTHER_CFLAGS=-DSOLARIS -Dindex=strchr -Drindex=strrchr $(SHORTENED_RBIND) -DUSE_DIRENT $(GETCWD) $(FASCIST) -DCOMPAT#RANLIB=/bin/true#OS=solaris2.2#INSTALL=install#GETPASS=getpass.o# Interactive Systems Unix should use#OTHER_CFLAGS = -DISC -DSVR3 -Dindex=strchr -Drindex=strrchr -D_XOPEN_SOURCE -DGETCWD $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT#CC=cc#RANLIB=:#OS=isc#INSTALL=$(PWD)/bsdinstall#GETPASS=#RESOLV_LIB=-linet -lc_s# netBSD should use#OTHER_CFLAGS = $(GETCWD) $(SHORTENED_RBIND) $(FASCIST)#CC=cc#RANLIB=ranlib#OS=netbsd0.9#INSTALL=install#GETPASS=#RESOLV_LIB=# FreeBSD should use:#CC=cc#OS=freebsd1.1#RESOLV_LIB=#OTHER_CFLAGS= $(GETCWD) $(SHORTENED_RBIND) $(FASCIST)#RANLIB=ranlib#GETPASS=#INSTALL=install# LINUX should use#CC=gcc#RANLIB=ranlib#RESOLV_LIB=# NOTE: Older versions of Linux may need to define the following variable,#       as their <sys/socket.h> files do not define "struct linger".#NEED_STRUCT_LINGER = -DNEED_STRUCT_LINGER#OTHER_CFLAGS=-traditional -DLINUX  $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT $(NEED_STRUCT_LINGER) -DCONST=""#OS=linux#INSTALL=install#GETPASS=getpass.o# Additional notes for Linux:# 1) There is a bug in getsockname() which returns address 127.0.0.1 when#    the result should be 0.0.0.0. Because of this, the non multi-homed#    version of sockd doesn't work. The multi-homed version works fine#    and can be used even on a single-homed Linux box. Just set up the#    /etc/sockd.route file to direct all traffic through the one and only#    interface.# 2) Linux doesn't define user 'nobody' in its distribution. To run sockd on#    linux, you must either add 'nobody' (give it minimum privileges) or#    run it under an existing userid (i.e., replace 'nobody' in the#    /etc/inetd.conf entry by an existing userid).# UnixWare should use#CC=cc#RESOLV_LIB=-lresolv -lnsl -lsocket#OTHER_CFLAGS= -DSOLARIS -Dindex=strchr -Drindex=strrchr -DUSE_DIRENT $(SHORTENED_RBIND) $(GETCWD) $(FASCIST) -DCOMPAT#RANLIB=/bin/true#INSTALL=/usr/ucb/install#OS=UnixWare#GETPASS=getpass.o# Alpha OSF should use:#CC=cc#RESOLV_LIB=-lresolv#OS=alphaOSF#OTHER_CFLAGS= $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT#RANLIB=ranlib#INSTALL=install#GETPASS=# SCO UNIX/ODT should use:#CC=cc#OS=sco#RESOLV_LIB=-lsocket#OTHER_CFLAGS= $(GETCWD) $(FASCIST) -DSCO -DSVR3 -Dindex=strchr -Drindex=strrchr $(SHORTENED_RBIND) -DUSE_DIRENT#RANLIB=/bin/true#GETPASS=#You MUST define PWD; see explanation earlier in this file.# >>> Thomas Essebier <tom@stallion.oz.au>#SERVER_BIN_DIR = /etc# sco install does not work like 'other' installs.# assuming all calls to install here are: install -m xxx file dir# sco uses the convention: install -c dir -m xxx file# create scoinstall in a directory in the normal path (eg. /usr/local/bin)# its a 1 line script to munge the parameters to fit SCO's conventions# -> install -c $4 $1 $2 $3#INSTALL=scoinstall# <<< Thomas Essebier <tom@stallion.oz.au># BSD/386 should use:#CC=cc#OS=bsdi#RESOLV_LIB=#OTHER_CFLAGS= $(GETCWD) $(SHORTENED_RBIND) $(FASCIST)#RANLIB=ranlib#GETPASS=# BSDI forgot to put appropriate lines in their /usr/include/netinet/in.h# to prevent the code from being processed multiple times. This causes# compiler to complain. You have to fix their oversight by adding#	#ifndef _netinet_in_h#	#define _netinet_in_h# at the beginning of the file, and adding#	#endif# at the end of the file.# NextStep 3.2, SOCKS server and library only# (William Lewis, wiml@omnigroup.com)#CC=cc#OTHER_CFLAGS= $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT $(DEBUG) -Dstrdup=NXCopyStringBuffer#RANLIB=ranlib#GETPASS=getpass.o#RESOLV_LIB=-lresolv# ... or #RESOLV_LIB=# DG/UX 5.4 should use#CC=cc#RESOLV_LIB=#OTHER_CFLAGS=-DDGUX $(SHORTENED_RBIND) -DUSE_DIRENT $(GETCWD) $(FASCIST) -DCOMPAT#RANLIB=/bin/true#OS=dgux5.4#INSTALL=bsdinstall#GETPASS=  # >>>---------------- Others:# Define RESOLV_LIB if your system doesn't search resolver# library automatically.# Leave it undefined otherwise.#RESOLV_LIB=-lresolv# If your compiler or loader complains about _res_init being# an undefined symbol, then you must define RESOLV_LIB.#RANLIB=ranlib# Systems (e.g., IRIX) that do not need (and thus don't have) ranlib should use#RANLIB=/bin/true# Comment out defintion of GETPASS if your system has problems# compiling it, the version built into your system will then be used.# The getpass() function in most Unix systems truncates passwords# after 8 characters; the version provided here does not.# This only affects ftp with non-anonymous login, and telnet.# Ftp with anonymous login allows long passwords regardless# of whether GETPASS is defined or not.#GETPASS=getpass.o# The 'install' command is assumed to be the BSD variety (using -m to# set the file mode). If the default 'install' on your system doesn't# do that, you have to either specify an alternative one in the line below# (e.g., /usr/ucb/install) or modify the other Makefile.#INSTALL= install# Macro OS is used in making rtelnet. See the list near top of# rtelnet/telnet/Makefile for available choices.# Remember to include -Dindex=strchr -Drindex=strrchr in OTHER_CFLAGS if# you don't have index() and rindex() (Sys-V camp)# <<<----------------# The Internet Whois server; used to be nic.ddn.mil.WHOIS_SERVER= WHOIS_SERVER=-DWHOIS_SERVER\'=\"rs.internic.net\"\'SOCKS_LIB=$(PWD)/lib/libsocks.aIDENT_LIB=$(PWD)/libident/libident.a#==============================================================================all: LIB LIBIDENT server clientsserver: LIB LIBIDENT	(cd sockd; $(MAKE) CC="$(CC)" RESOLV_LIB="$(RESOLV_LIB)" \		OPTIMIZE="$(OPTIMIZE)" \		SOCKS_LIB="$(SOCKS_LIB)" SUPPORT_RCMD="$(SUPPORT_RCMD)" \		IDENT_LIB="$(IDENT_LIB)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(FOR_PS)")clients: RFINGER RFTP RTELNETLIB:	(cd lib; $(MAKE) CC="$(CC)" GETPASS="$(GETPASS)" \		OPTIMIZE="$(OPTIMIZE)" \		RCMD="$(RCMD)" SUPPORT_RCMD="$(SUPPORT_RCMD)" \		DNS_THROUGH_NIS="$(DNS_THROUGH_NIS)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(NO_CLIENT_LOG) $(BIND_RESOLVER)" \		RANLIB="$(RANLIB)")LIBIDENT:	(cd libident; $(MAKE) CC="$(CC)" OTHER_CFLAGS="$(OTHER_CFLAGS)" \		OPTIMIZE="$(OPTIMIZE)" RANLIB="$(RANLIB)")# This also build rwhoisRFINGER: LIB	(cd rfinger; $(MAKE) CC="$(CC)" $(WHOIS_SERVER) \		OPTIMIZE="$(OPTIMIZE)" SOCKS="$(SOCKS)" \		RESOLV_LIB="$(RESOLV_LIB)" SOCKS_LIB="$(SOCKS_LIB)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(NO_CLIENT_LOG)")RTELNET: LIB	(cd rtelnet; $(MAKE) CC="$(CC)" OS="$(OS)" SOCKS_LIB="$(SOCKS_LIB)" \		OPTIMIZE="$(OPTIMIZE)" SOCKS="$(SOCKS)" \		RESOLV_LIB="$(RESOLV_LIB)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(NO_CLIENT_LOG)")RFTP: LIB	(cd rftp; $(MAKE) CC="$(CC)" SOCKS_LIB="$(SOCKS_LIB)" \		OPTIMIZE="$(OPTIMIZE)" SOCKS="$(SOCKS)" \		RESOLV_LIB="$(RESOLV_LIB)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(NO_CLIENT_LOG) $(BIND_RESOLVER)")install.server:	(cd sockd; $(MAKE) INSTALL="$(INSTALL)" MAN_DEST_DIR="$(MAN_DEST_DIR)" \		CC="$(CC)" RESOLV_LIB="$(RESOLV_LIB)" \		OPTIMIZE="$(OPTIMIZE)" \		SOCKS_LIB="$(SOCKS_LIB)" SUPPORT_RCMD="$(SUPPORT_RCMD)" \		IDENT_LIB="$(IDENT_LIB)" \		OTHER_CFLAGS="$(OTHER_CFLAGS) $(FOR_PS)" \		SERVER_BIN_DIR="$(SERVER_BIN_DIR)" install install.man)install.clients: install.man	for i in rfinger rftp rtelnet; do \		(cd $$i ; $(MAKE) INSTALL="$(INSTALL)" \			CC="$(CC)" OS="$(OS)" SOCKS_LIB="$(SOCKS_LIB)" \			OPTIMIZE="$(OPTIMIZE)" SOCKS="$(SOCKS)" \			RCMD="$(RCMD)" SUPPORT_RCMD="$(SUPPORT_RCMD)" \			DNS_THROUGH_NIS="$(DNS_THROUGH_NIS)" \			RESOLV_LIB="$(RESOLV_LIB)" \			OTHER_CFLAGS="$(OTHER_CFLAGS) $(NO_CLIENT_LOG)" \			CLIENTS_BIN_DIR="$(CLIENTS_BIN_DIR)" \			install) doneinstall.man:	(cd doc; $(MAKE) INSTALL="$(INSTALL)" MAN_DEST_DIR="$(MAN_DEST_DIR)" \		install)clean:	for i in lib libident sockd rfinger rftp rtelnet ; do \		( cd $$i ; $(MAKE) clean) done

⌨️ 快捷键说明

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