"Fossies" - the Fresh Open Source Software Archive

Member "delegate9.9.13/src/Makefile" (30 Oct 2014, 22737 Bytes) of package /linux/misc/old/delegate9.9.13.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # /*////////////////////////////////////////////////////////////////////////
    2 # Copyright (c) 1994-2000 Yutaka Sato and ETL,AIST,MITI
    3 # Copyright (c) 2001-2004 National Institute of Advanced Industrial Science and Technology (AIST)
    4 #
    5 # Permission to use this material for noncommercial and/or evaluation
    6 # purpose, copy this material for your own use, and distribute the copies
    7 # via publicly accessible on-line media, without fee, is hereby granted
    8 # provided that the above copyright notice and this permission notice
    9 # appear in all copies.
   10 # AIST MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS
   11 # MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS
   12 # OR IMPLIED WARRANTIES.
   13 # ////////////////////////////////////////////////////////////////////////*/
   14 # Content-Type:	program/C; charset=US-ASCII
   15 # Program:	Makefile for DeleGate
   16 # Author:	Yutaka Sato <ysato@delegate.org>
   17 # Description:
   18 # History:
   19 #	Mar.94	created
   20 #	970105	rewriten to port to Windows
   21 #//////////////////////////////////////////////////////////////////////#*/
   22 
   23 #####
   24 ##### You MUST define the following ADMIN.  It MUST be the 
   25 ##### mail address of yourself or the administrator of your delegated.
   26 #####
   27 
   28 ADMIN = undef
   29 ADMINPASS =
   30 IMPSIZE = 10000
   31 
   32 #####
   33 ##### Don't change the following LICENSEE line if you don't have your
   34 ##### commercial license granted by AIST
   35 #####
   36 ##### LICENSEE = "anyone for evaluation or non-commercial purpose"
   37 LICENSEE = ""
   38 
   39 #
   40 #
   41 #
   42 
   43 SRCSIGN =	../srcsign
   44 
   45 HLFILES =	Makefile \
   46 		auth.h \
   47 		hostlist.h \
   48 		param.h \
   49 		param.h \
   50 		service.h \
   51 		filter.h
   52 
   53 LFILES =	Makefile mkmkmk.c \
   54 		sample.shio \
   55 		version.c \
   56 		editconf.c admin.c notify.c shutter.c abort.c \
   57 		form2conf.c \
   58 		process.c \
   59 		vaddr.c conf.c ddi.c textconv.c \
   60 		auth.h \
   61 		syslog.c log.c svstat.c \
   62 		iotimeout.c \
   63 		misc.c msg.c \
   64 		yshell.c \
   65 		shio.c \
   66 		db.c \
   67 		hostlist.h hostlist.c cond.c \
   68 		script.c param.h param.c env.c \
   69 		delegated.c svport.c remote.c \
   70 		thmain.c \
   71 		commands.c croncom.c \
   72 		qstest.c \
   73 		delegate.c \
   74 		service.h service.c svconf.c \
   75 		filter.h filter.c \
   76 		master.c \
   77 		spinach.c \
   78 		caps.c \
   79 		stls.c \
   80 		tsp.c \
   81 		sudo.c \
   82 		gacl.c access.c ident.c dgauth.c dgsign.c \
   83 		ccache.c cache.c distrib.c \
   84 		bcounter.c \
   85 		ipno.c \
   86 		inets.c uns.c rident.c \
   87 		utmpident.c \
   88 		inetd.c \
   89 		thruwayd.c dget.c urlfind.c \
   90 		mount.c url.c \
   91 		gopher.c \
   92 		icp.c \
   93 		icap.c \
   94 		http.c httpx.c httplog.c httphead.c \
   95 		httpd.c cgi.c ssi.c htaccept.c \
   96 		htccx.c \
   97 		htswitch.c \
   98 		htmlgen.c \
   99 		htfilter.c \
  100 		nntp.c nntplist.c nntpgw.c enews.c \
  101 		pop.c smtp.c telnet.c ftp.c xferlog.c X.c wais.c whois.c \
  102 		xflash.c \
  103 		imap.c \
  104 		ldap.c smtpgate.c alias.c \
  105 		domain.c \
  106 		lpr.c \
  107 		sftp.c \
  108 		socks.c socks4.c sox.c \
  109 		cuseeme.c coupler.c vsap.c tcprelay.c udprelay.c \
  110 		ftpgw.c filetype.c \
  111 		embed.c builtin.c \
  112 		dtot.c \
  113 		smtp_lib.c inets_lib.c
  114 
  115 #		WhatIsDeleGate NOTE\
  116 #		delegate_access \
  117 
  118 FILES =		$(LFILES) builtin randld
  119 
  120 INC_DEPEND_COMMON = \
  121 		../include/config.h \
  122 		../include/log.h \
  123 		../include/vaddr.h \
  124 		../include/vsocket.h \
  125 		../include/ysocket.h
  126 
  127 SRCINC_DEPEND =	../include/delegate.h ../include/dgctx.h ../include/vaddr.h ../include/ysocket.h
  128 SRCGEN_DEPEND =	../gen/delegate.h ../gen/vaddr.h
  129 SRC_DEPEND =	$(SRCINC_DEPEND)
  130 
  131 GENHDR =	../gen/dglib.h \
  132 		../gen/delegate.h \
  133 		../gen/htswitch.h \
  134 		../gen/ystrvec.h \
  135 		../gen/vaddr.h \
  136 		../gen/http.h \
  137 		../gen/url.h \
  138 		../gen/mime.h \
  139 		../gen/htadmin.h
  140 
  141 OPT_S_OBJS =	opt_s_htaccept.o \
  142 		opt_s_sox.o \
  143 		opt_s_stls.o \
  144 		opt_s_vsap.o \
  145 		opt_s_caps.o \
  146 
  147 DOBJS =		builtin.o delegated.o commands.o croncom.o remote.o
  148 
  149 NETYOBJS =	inets_lib.o \
  150 		smtp_lib.o
  151 
  152 LIBOBJS	=	version.o \
  153 		$(SRCSIGN).o \
  154 		editconf.o admin.o notify.o shutter.o abort.o \
  155 		form2conf.o \
  156 		process.o \
  157 		vaddr.o conf.o svport.o ddi.o textconv.o \
  158 		script.o param.o env.o \
  159 		thmain.o \
  160 		syslog.o log.o svstat.o \
  161 		iotimeout.o \
  162 		misc.o msg.o \
  163 		yshell.o \
  164 		shio.o \
  165 		db.o \
  166 		hostlist.o cond.o \
  167 		service.o svconf.o filter.o \
  168 		master.o \
  169 		qstest.o \
  170 		delegate.o \
  171 		caps.o \
  172 		spinach.o \
  173 		stls.o \
  174 		tsp.o \
  175 		sudo.o \
  176 		gacl.o access.o ident.o dgauth.o dgsign.o \
  177 		ccache.o cache.o distrib.o \
  178 		bcounter.o \
  179 		ipno.o \
  180 		inets.o uns.o rident.o \
  181 		inetd.o \
  182 		thruwayd.o dget.o urlfind.o \
  183 		mount.o url.o \
  184 		gopher.o \
  185 		icp.o \
  186 		icap.o \
  187 		http.o httpx.o httplog.o httphead.o \
  188 		httpd.o cgi.o ssi.o htaccept.o \
  189 		htccx.o \
  190 		htswitch.o \
  191 		htmlgen.o \
  192 		htfilter.o \
  193 		nntp.o nntplist.o nntpgw.o enews.o \
  194 		pop.o smtp.o telnet.o ftp.o xferlog.o X.o wais.o whois.o \
  195 		xflash.o \
  196 		imap.o \
  197 		ldap.o smtpgate.o alias.o \
  198 		domain.o \
  199 		lpr.o \
  200 		sftp.o \
  201 		socks.o socks4.o sox.o \
  202 		cuseeme.o coupler.o vsap.o tcprelay.o udprelay.o \
  203 		ftpgw.o filetype.o
  204 
  205 LIBSRCS =	TELEPORT=../teleport \
  206 		FSX=../fsx \
  207 		RESOLVY=../resolvy \
  208 		RARY=../rary \
  209 		MIMEKIT=../mimekit \
  210 		CFI=../filters \
  211 		MD5=../pds/md5 \
  212 		REGEX=../pds/regex \
  213 		SUBST=../maker
  214 
  215 MYLIBDIR =	../lib
  216 
  217 LIBNETYF =	$(MYLIBDIR)/libnety.a
  218 LIBDGF =	$(MYLIBDIR)/libdelegate.a
  219 LIBGATESF =	$(MYLIBDIR)/libgates.a
  220 LIBOPT_SF =	$(MYLIBDIR)/libopt_s.a
  221 RESOLVYF =	$(MYLIBDIR)/libresolvy.a
  222 LIBMKITF =	$(MYLIBDIR)/libmimekit.a
  223 TELEPORTF =	$(MYLIBDIR)/libteleport.a
  224 LIBMD5F =	$(MYLIBDIR)/libmd5.a
  225 LIBREGEXF =	$(MYLIBDIR)/libregex.a
  226 LIBCFIF =	$(MYLIBDIR)/libcfi.a
  227 LIBRARYF =	$(MYLIBDIR)/library.a
  228 
  229 LIBSUBSTF =	$(MYLIBDIR)/libsubst.a
  230 LIBSUBSTXF =	$(MYLIBDIR)/libsubstx.a
  231 TYPEDEF =	typedefs
  232 LIBFSX =	$(MYLIBDIR)/libfsx.a
  233 
  234 MYLIBS0 =	$(RESOLVYF) \
  235 		$(LIBMKITF) \
  236 		$(LIBMD5F) \
  237 		$(LIBREGEXF) \
  238 		$(LIBRARYF) \
  239 		$(LIBGATESF) \
  240 		$(LIBCFIF) \
  241 		$(LIBFSX)
  242 
  243 MYLIBS =	$(TELEPORTF) \
  244 		$(MYLIBS0)
  245 
  246 EXE_DEPEND =	Makefile Makefile.go $(MYLIBS) $(LIBSUBST)
  247 
  248 ######## if you use external libresolv.a
  249 #RESLIB =	-lresolv
  250 ######## else
  251 RESLIB =	$(RESOLVYF)
  252 RESLIBF =	$(RESOLVYF)
  253 ######## endif
  254 
  255 LIBMKIT =	$(LIBMKITF)
  256 LIBSUBST =	$(LIBSUBSTF)
  257 
  258 #
  259 # WSOCK32.LIB      ... socket library on Win32
  260 # ADVAPI32.LIB     ... running as a Service on WindowsNT
  261 #
  262 #NETLIB =	-lnsl -lsocket WSOCK32.LIB ADVAPI32.LIB -llwp
  263 #NETLIB =	-lnsl -lsocket WSOCK32.LIB ADVAPI32.LIB -pthread
  264 SOLLIB =	-lnsl -lsocket -ldl -lutil -lpthread -lunalign
  265 #SOLLIB =	-lnsl -lsocket
  266 
  267 #ifdef MSWIN ######################################################
  268 WINLIB =	WS2_32.LIB ADVAPI32.LIB OLE32.LIB SHELL32.LIB UUID.LIB \
  269 		USER32.LIB \
  270 		GDI32.LIB \
  271 		-MT
  272 CCLD_WIN32 =	sh ../link-win32_win8.sh
  273 #endif ############################################################
  274 
  275 SSLDIR =	../../SSL
  276 SSLLIB =	$(SSLDIR)/libcrypto.a $(SSLDIR)/libssl.a -lcrypto -lssl \
  277 		$(SSLDIR)/LIBEAY32.LIB $(SSLDIR)/SSLEAY32.LIB
  278 NETLIB =	$(SOLLIB) $(WINLIB) -lpam -lstdc++
  279 #NETLIB =	$(SOLLIB) $(WINLIB) -lstdc++
  280 
  281 #IF UNIX ##########################################################
  282  #NETLIB =	$(SOLLIB) -lpam -lstdc++
  283  #CCLD_WIN32 =	-@echo ""
  284 #FI ###############################################################
  285 
  286 HDRDIRS =	-I../gen -I../include
  287 LIBDIRS =	-L$(MYLIBDIR)
  288 
  289 #ifdef MSWIN ######################################################
  290 CFLAGSPLUS =	-nologo -DQS
  291 EMBED =		.\embed.exe
  292 DGEXE =		.\dg.exe
  293 COPY =		copy
  294 CFLAGS =	-O2 -MT -D_USE_32BIT_TIME_T
  295 #CFLAGS =	-O2 -MT
  296 #CFLAGS =	-O2
  297 CCINX =		.cpp
  298 CCINOUT =	$*$(CCINX) -Fo$*.o
  299 MKCPPF =	..\mkcpp.exe
  300 MKMKCPP =	$(MKCPPF)
  301 MKCPP =		$(MKCPPF) < $*.c > $*.cpp
  302 GENHDR_DEPEND =	$(MKCPPF) $(GENHDR)
  303 ARC =		lib /out:$@
  304 LDFLAGS =
  305 RANLIB =	dir
  306 TAR =		echo
  307 RM =		del
  308 EXE =		.exe
  309 #endif #############
  310 #ifdef OS2EMX #####################################################
  311 EMBED =		embed.exe
  312 LDOPTS =	-s -Zbin-files -Zbsd-signals
  313 EXE =		.exe
  314 #endif #############
  315 #ifdef UNIX #######################################################
  316 EMBED =		./embed
  317 EXE =
  318 SUBIN = subin
  319 #endif #############
  320 #ifdef UNIX,OS2EMX ################################################
  321 CFLAGSPLUS =	if(WITHCPLUS,UNIX,OS2EMX) -x c++ -DQS
  322 DGEXE =		./dg.exe
  323 COPY =		cp -f -p
  324 CFLAGS =	if(UNIX,OS2EMX) -O2
  325 CCINX =		.c
  326 CCINOUT =	$*$(CCINX)
  327 MKCPP =		-@$(MKMAKE) -noop
  328 MKCPPF =	../mkcpp
  329 LIBC =		-lc
  330 ARC =		$(AR) cr $@
  331 #RANLIB =	ranlib
  332 RANLIB =	$(AR) ts
  333 LDFLAGS =
  334 TAR =		tar
  335 RM =		rm -f
  336 #endif #############
  337 #IF QSC ####
  338  #CFLAGSPLUS =
  339 #FI ########
  340 #IF NONC99 ########################################################
  341  #MKMKCPP =	$(MKCPPF)
  342  #CCINOUT =	$*._.c -o $*.o
  343  #MKCPP =	$(MKCPPF) $*.c $*._.c
  344  #GENHDR_DEPEND = $(MKCPPF) $(GENHDR)
  345  #SRC_DEPEND =	$(SRCINC_DEPEND) $(SRCGEN_DEPEND)
  346 #FI #################
  347 #IF NONCPLUS ######## .cc will be ignored #########################
  348  #CFLAGSPLUS =
  349  #CCINOUT =	$*._.c -o $*.o
  350  #MKCPP =	$(MKCPPF) $*.c $*._.c
  351  #MKCPPFF =	$(MKCPPF)
  352  #SRC_DEPEND =	$(SRCINC_DEPEND) $(SRCGEN_DEPEND)
  353 #FI #################
  354 
  355 SRC_LOG_DEPEND = $(SRC_DEPEND) ../include/log.h
  356 
  357 
  358 XDG = $(DGEXE)
  359 XEMBED = $(EMBED)
  360 TARGET = $(MKCPPFF) delegated$(EXE) $(SUBIN) $(LIBSUBSTXF)
  361 XTARGET = $(TARGET)
  362 
  363 MKMAKE =	../mkmake.exe
  364 MKMKMK =	../mkmkmk.exe
  365 LNCONF =	"$(MKMAKE)" +r -lnconf
  366 MAKEIT =	"$(MKMAKE)"    -makeit
  367 MAKEAT =	"$(MKMAKE)"    -makeat
  368 CKCONF =	"$(MKMAKE)" +r -ckconf
  369 CKSUM =		-@"$(MKMAKE)" -cksum
  370 
  371 MAKEALL =	$(MAKEIT) "$(MAKE)" -f Makefile.go start2 \
  372 		SHELL="$(SHELL)" HDRDIRS="$(HDRDIRS)" LIBDIRS="$(LIBDIRS)"
  373 
  374 #---BGN---
  375 start0:		$(MKMAKE) Makefile.go
  376 		@$(MAKEALL)
  377 #---END---
  378 start1:;	$(MAKEALL)
  379 start2:		$(XTARGET)
  380 
  381 LDFLAGS =	$(LDOPTS) $(LIBDIRS)
  382 XCFLAGS =	$(CFLAGS) $(CFLAGSPLUS) $(YCFLAGS)
  383 
  384 MAKEENV0 =	MAKE="$(MAKE)" SHELL="$(SHELL)" \
  385 		CC="$(CC)" HDRDIR="$(HDRDIRS)" \
  386 		RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" LIBDIR="$(LIBDIRS)" \
  387 		NETLIB="$(NETLIB)" \
  388 		AR="$(AR)" TAR="$(TAR)"
  389 
  390 MAKEENV =	$(MAKEENV0) CFLAGS="$(XCFLAGS)"
  391 
  392 LIBSC0 =	$(RESLIB) $(LIBS) \
  393 		$(TELEPORTF) $(LIBMD5F) $(LIBCFIF) $(LIBRARYF) \
  394 		$(LIBGATESF) $(LIBMKIT) $(LIBFSX) $(NETLIB)
  395 
  396 #LIBSC =	$(LIBSC0) $(LIBC) $(LIBREGEXF) $(LIBSUBST)
  397 # fix-130627a added NETLIB after LIBSUBST for forkpty (Ubuntu)
  398 LIBSC =		$(LIBSC0) $(LIBC) $(LIBREGEXF) $(LIBSUBST) $(NETLIB)
  399 
  400 CCCO =		$(CC) $(XCFLAGS) $(HDRDIRS) -c $(CCINOUT)
  401 CCLD =		$(CC) $(LDFLAGS) -o $@
  402 
  403 .c.o:;		$(MKCPP)
  404 		$(CCCO)
  405 		$(CKSUM) $*.c
  406 
  407 MKMAKE_SRC =	Makefile mkmkmk.c ../maker/mkmake.c ../rary/cksum.c
  408 
  409 $(MKMAKE):	Makefile $(MKMAKE_SRC)
  410 		-@echo "making $(MKMAKE)"
  411 		-@ls -lt $(MKMAKE) $(MKMAKE_SRC)
  412 		$(CC) -DMKMKMK -DDEFCC=\"$(CC)\" $(HDRDIRS) $(LIBDIRS) mkmkmk.c -o "$(MKMKMK)"
  413 		-"$(MKMKMK)" -mkmkmk "$(CC)" $(HDRDIRS) $(LIBDIRS) ../maker/mkmake.c -o "$(MKMAKE)"
  414 		"$(MKMAKE)" -touch ../maker/mkmake.c
  415 
  416 DELEGATE_CONF:
  417 		-@echo "searching $@ ..."
  418 		$(LNCONF) $@
  419 
  420 #CONF_IS_GOT:	$(MKMAKE) DELEGATE_CONF
  421 CONF_IS_GOT:	DELEGATE_CONF
  422 		echo "GOT by MKMAKE=$(MKMAKE)" > $@
  423 
  424 Makefile.tst:	CONF_IS_GOT Makefile
  425 		@echo "creating $@ ..."
  426 		-@$(RM) $@
  427 		"$(MKMAKE)" -mkmake "$(MAKE)" $@ "$(CC)" "$(CFLAGS)" "$(CFLAGSPLUS)" "$(LDFLAGS)" "$(RANLIB)" "$(NETLIB)" NETLIB "" "$(SSLLIB)" SSLLIB
  428 		"$(MKMAKE)" -touch Makefile
  429 
  430 check_conf:
  431 		$(CKCONF) Makefile.chk Makefile.tst DELEGATE_CONF "$(AR)" "$(ADMIN)" "$(ADMINPASS)"
  432 
  433 Makefile.chk:	Makefile.tst
  434 		-@$(RM) $@
  435 		"$(MKMAKE)" -makeit "$(MAKE)" -f Makefile.tst check_conf SHELL="$(SHELL)"
  436 
  437 dgsign.o:	Makefile.go $(SRC_LOG_DEPEND) dgsign.c
  438 		$(MKCPP)
  439 		$(CCCO) -DADMIN=\"$(ADMIN)\"
  440 		$(CKSUM) dgsign.c
  441 
  442 conf.o:		Makefile.go $(SRC_LOG_DEPEND) conf.c
  443 		$(MKCPP)
  444 		$(CCCO) \
  445 			-DADMIN=\"$(ADMIN)\" \
  446 			-DADMINPASS=\"$(ADMINPASS)\"
  447 		$(CKSUM) conf.c
  448 
  449 version.o:	Makefile.go $(SRC_LOG_DEPEND) version.c
  450 		$(MKCPP)
  451 		$(CCCO) \
  452 			-DLICENSEE=\"$(LICENSEE)\"
  453 		$(CKSUM) version.c
  454 
  455 caps.o:		Makefile.go $(SRC_DEPEND) caps.c ../gen/caps.h ../include/file.h ../include/log.h
  456 		$(MKCPP)
  457 		$(CCCO) \
  458 			-DADMIN=\"$(ADMIN)\" \
  459 			-DLICENSEE=\"$(LICENSEE)\"
  460 		$(CKSUM) caps.c
  461 
  462 #### optional insecure ####
  463 opt_s_caps.c:	caps.c
  464 		cp -p caps.c opt_s_caps.c
  465 opt_s_caps.o:	Makefile.go $(SRC_DEPEND) opt_s_caps.c ../gen/caps.h ../include/file.h ../include/log.h
  466 		$(MKCPP)
  467 		$(CCCO) -DOPT_S
  468 
  469 opt_s_htaccept.c:	htaccept.c
  470 		cp -p htaccept.c opt_s_htaccept.c
  471 opt_s_htaccept.o:	$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h opt_s_htaccept.c ../gen/htaccept.h
  472 		$(MKCPP)
  473 		$(CCCO) -DOPT_S
  474 
  475 opt_s_sox.c:	sox.c
  476 		cp -p sox.c opt_s_sox.c
  477 opt_s_sox.o:	$(SRC_LOG_DEPEND) ../include/credhy.h opt_s_sox.c ../gen/sox.h
  478 		$(MKCPP)
  479 		$(CCCO) -DOPT_S
  480 
  481 opt_s_stls.c:	stls.c
  482 		cp -p stls.c opt_s_stls.c
  483 opt_s_stls.o:	$(SRC_LOG_DEPEND) ../include/dglib.h opt_s_stls.c  ../gen/stls.h
  484 		$(MKCPP)
  485 		$(CCCO) -DOPT_S
  486 
  487 opt_s_vsap.c:	vsap.c
  488 		cp -p vsap.c opt_s_vsap.c
  489 opt_s_vsap.o:	$(SRC_LOG_DEPEND) opt_s_vsap.c ../gen/vsap.h
  490 		$(MKCPP)
  491 		$(CCCO) -DOPT_S
  492 
  493 param.o:	$(SRC_LOG_DEPEND) param.h param.c
  494 
  495 MKBUILTIN =	$(XEMBED) -IMPSIZE=$(IMPSIZE) > _builtin.c \
  496 		"../COPYRIGHT" \
  497 		"builtin/**/*.gif" \
  498 		"builtin/**/*.ico" \
  499 		"builtin/**/*.bmp" \
  500 		"builtin/**/*.dll" \
  501 		"builtin/**/*.dhtml" \
  502 		"builtin/**/*.pem" \
  503 		"builtin/**/*.cnf" \
  504 		"builtin/**/*.cnv" \
  505 		"builtin/config/smtpgate/**/conf"
  506 
  507 dg.exe:		$(GENHDR_DEPEND) $(EXE_DEPEND) $(LIBDGF) $(DOBJS) $(LIBNETYF)
  508 		"$(MKMAKE)" -randtext ../include/randtext.c
  509 		$(MKBUILTIN)
  510 		$(CCLD) $(DOBJS) $(LIBDGF) $(LIBSC)
  511 		$(CCLD_WIN32)
  512 		@echo "################"
  513 		-$(DGEXE) -Fver
  514 		@echo "################"
  515 		"$(MKMAKE)" -cksum $(HLFILES)
  516 		"$(MKMAKE)" -cksum ../maker/mkmake.c
  517 
  518 delegated$(EXE): dg.exe
  519 		$(COPY) dg.exe $@.sign
  520 		-$(XDG) -Fesign -s -w $@.sign
  521 		mv -f $@.sign $@
  522 
  523 wince-dg.exe:	$(GENHDR_DEPEND) $(EXE_DEPEND) $(LIBDGF) $(DOBJS) $(LIBNETYF)
  524 		sh ../link-wince.sh $@
  525 		"$(MKMAKE)" -cksum $(HLFILES)
  526 		"$(MKMAKE)" -cksum ../maker/mkmake.c
  527 
  528 delegatedp:	delegated
  529 		$(CCLD) -p $(DOBJS) $(LIBDGF) $(LIBSC)
  530 
  531 dgp:		delegated
  532 		$(CCLD) -pg $(DOBJS) $(LIBDGF) $(LIBSC)
  533 
  534 url.o:		$(SRC_LOG_DEPEND) ../include/url.h url.c
  535 		$(MKCPP)
  536 		$(CCCO)
  537 		$(CKSUM) url.c
  538 
  539 qstest.o:	$(SRC_LOG_DEPEND) qstest.c
  540 		$(MKCPP)
  541 		$(CCCO) -DNONE
  542 		-$(CCCO)
  543 		$(CKSUM) qstest.c
  544 
  545 $(LIBNETYF):	Makefile $(NETYOBJS)
  546 		-$(RM) $@
  547 		$(ARC) $(NETYOBJS)
  548 		-$(RANLIB) $@
  549 
  550 $(LIBDGF):	Makefile $(LIBOBJS)
  551 		-$(RM) $@
  552 		$(ARC) $(LIBOBJS)
  553 		-$(RANLIB) $@
  554 		"$(MKMAKE)" -touch "$@"
  555 
  556 $(SRCSIGN).o:	Makefile $(SRCSIGN).c
  557 		$(MKCPP)
  558 		$(CCCO) -o $(SRCSIGN).o
  559 		$(CKSUM) $(SRCSIGN).c
  560 
  561 embed.o:	Makefile embed.c
  562 		$(MKCPP)
  563 		$(CCCO) -DADMINPASS=\"$(ADMINPASS)\" -DADMIN=\"$(ADMIN)\" \
  564 			-DIMPSIZE=$(IMPSIZE)
  565 		$(CKSUM) embed.c
  566 
  567 $(EMBED):	embed.o version.o $(SRCSIGN).o $(LIBRARYF) $(LIBGATESF)
  568 		$(CCLD) embed.o version.o $(SRCSIGN).o \
  569 			$(LIBRARYF) $(LIBGATESF) $(LIBCFIF) $(LIBMKITF) $(LIBMD5F) \
  570 			$(NETLIB) $(LIBC) $(LIBSUBST) $(NETLIB)
  571 
  572 new:;		-@$(RM) _builtin.c
  573 
  574 _builtin.c:	$(XEMBED) $(SRCSIGN).c version.c
  575 		$(MKBUILTIN)
  576 
  577 builtin.o:	_builtin.c builtin.c
  578 
  579 dtot:		dtot.c
  580 		$(MKCPP)
  581 		$(CCLD) dtot.c
  582 
  583 lpr:;		lpr $(FILES)
  584 
  585 clean:;		$(RM) $(LIBOBJS) _builtin.c builtin.o \
  586 		$(DOBJS) \
  587 		$(LIBSUBSTF)
  588 		$(MAKEAT) "" ../maker "" "$(MAKE)" clean
  589 
  590 files:;		ls -d $(FILES)
  591 srcfiles:;	@echo $(FILES)
  592 ver:;		grep '#.*VERSION.*"' version.c|sed -e 's/^[^"]*"//' -e 's/".*//'
  593 dgdate:;	grep '#.*DATE.*"' version.c|sed -e 's/.*	"//' -e 's/"//'
  594 
  595 
  596 inets.o:	$(SRC_LOG_DEPEND) ../include/vsocket.h inets.c
  597 inets_lib.o:	$(SRC_DEPEND) inets.c inets_lib.c
  598 smtp_lib.o:	$(SRC_DEPEND) smtp.c smtp_lib.c
  599 
  600 access.o:	$(SRC_LOG_DEPEND) hostlist.h access.c
  601 hostlist.o:	$(SRC_LOG_DEPEND) hostlist.h hostlist.c
  602 ident.o:	$(SRC_LOG_DEPEND) hostlist.h ident.c
  603 master.o:	$(SRC_LOG_DEPEND) hostlist.h filter.h ../include/url.h master.c
  604 delegated.o:	$(SRC_LOG_DEPEND) ../include/config.h ../include/yselect.h delegated.c ../include/dglib.h
  605 env.o:		$(SRC_LOG_DEPEND) ../include/config.h param.h env.c
  606 httplog.o:	$(SRC_LOG_DEPEND) httplog.c
  607 log.o:		$(SRC_LOG_DEPEND) ../include/ysignal.h log.c
  608 script.o:	$(SRC_LOG_DEPEND) script.c
  609 service.o:	$(SRC_LOG_DEPEND) service.h filter.h service.c
  610 svconf.o:	$(SRC_DEPEND) service.h svconf.c
  611 
  612 admin.o:	$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h admin.c
  613 bcounter.o:	$(SRC_LOG_DEPEND) ../include/dglib.h bcounter.c
  614 ccache.o:	$(SRC_LOG_DEPEND) ccache.c
  615 cgi.o:		$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h cgi.c
  616 coupler.o:	$(SRC_DEPEND) coupler.c
  617 croncom.o:	$(SRC_DEPEND) croncom.c
  618 cuseeme.o:	$(SRC_DEPEND) cuseeme.c
  619 ddi.o:		$(SRC_LOG_DEPEND) ddi.c
  620 delegate.o:	$(SRC_DEPEND) delegate.c
  621 dgauth.o:	$(SRC_LOG_DEPEND) ../include/credhy.h dgauth.c
  622 dget.o:		$(SRC_LOG_DEPEND) dget.c
  623 distrib.o:	$(SRC_LOG_DEPEND) distrib.c
  624 domain.o:	$(SRC_LOG_DEPEND) domain.c
  625 editconf.o:	$(SRC_DEPEND) editconf.c
  626 filter.o:	$(SRC_LOG_DEPEND) filter.h filter.c
  627 ftp.o:		$(SRC_LOG_DEPEND) ../include/dglib.h filter.h ftp.c
  628 ftpgw.o:	$(SRC_LOG_DEPEND) ftpgw.c
  629 gacl.o:		$(SRC_DEPEND) gacl.c
  630 gopher.o:	$(SRC_LOG_DEPEND) gopher.c
  631 htmlgen.o:	$(SRC_LOG_DEPEND) ../include/url.h htmlgen.c
  632 htfilter.o:	$(SRC_LOG_DEPEND) htfilter.c
  633 htswitch.o:	$(SRC_DEPEND) ../include/htswitch.h htswitch.c
  634 htccx.o:	$(SRC_LOG_DEPEND) ../include/http.h htccx.c
  635 http.o:		$(SRC_LOG_DEPEND) filter.h ../include/url.h ../include/http.h http.c
  636 httpx.o:	$(SRC_LOG_DEPEND) filter.h ../include/http.h httpx.c
  637 httpd.o:	$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h httpd.c
  638 httphead.o:	$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h httphead.c
  639 htaccept.o:	$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h htaccept.c ../gen/htaccept.h
  640 imap.o:		$(SRC_LOG_DEPEND) filter.h imap.c
  641 ldap.o:		$(SRC_DEPEND) ldap.c
  642 mount.o:	$(SRC_LOG_DEPEND) ../include/url.h mount.c
  643 nntp.o:		$(SRC_LOG_DEPEND) filter.h nntp.c
  644 nntpgw.o:	$(SRC_LOG_DEPEND) ../include/ystring.h ../include/htswitch.h nntpgw.c
  645 notify.o:	$(SRC_DEPEND) notify.c
  646 pop.o:		$(SRC_LOG_DEPEND) filter.h pop.c
  647 process.o:	$(SRC_LOG_DEPEND) process.c
  648 rident.o:	$(SRC_DEPEND) rident.c
  649 shutter.o:	$(SRC_LOG_DEPEND) shutter.c
  650 smtp.o:		$(SRC_LOG_DEPEND) ../include/ystring.h filter.h smtp.c
  651 smtpgate.o:	$(SRC_LOG_DEPEND) smtpgate.c
  652 socks.o:	$(SRC_LOG_DEPEND) socks.c
  653 sox.o:		$(SRC_LOG_DEPEND) ../include/credhy.h sox.c ../gen/sox.h
  654 ssi.o:		$(SRC_LOG_DEPEND) ../include/url.h ../include/http.h ssi.c
  655 stls.o:		$(SRC_LOG_DEPEND) ../include/dglib.h stls.c ../gen/stls.h
  656 svport.o:	$(SRC_LOG_DEPEND) ../include/yselect.h svport.c
  657 tcprelay.o:	$(SRC_LOG_DEPEND) tcprelay.c
  658 telnet.o:	$(SRC_LOG_DEPEND) telnet.c
  659 textconv.o:	$(SRC_LOG_DEPEND) textconv.c
  660 thmain.o:	$(SRC_LOG_DEPEND) thmain.c
  661 thruway.o:	$(SRC_DEPEND) thruway.o
  662 udprelay.o:	$(SRC_LOG_DEPEND) udprelay.c
  663 vaddr.o:	$(SRC_DEPEND) vaddr.c
  664 vsap.o:		$(SRC_LOG_DEPEND) vsap.c ../gen/vsap.h
  665 wais.o:		$(SRC_LOG_DEPEND) wais.c
  666 whois.o:	$(SRC_LOG_DEPEND) whois.c
  667 X.o:		$(SRC_LOG_DEPEND) X.c
  668 yshell.o:	$(SRC_LOG_DEPEND) yshell.c
  669 ../include/yselect.h:	../include/ywinsock.h
  670 
  671 cache.o:	$(SRC_LOG_DEPEND) cache.c
  672 commands.o:	$(SRC_LOG_DEPEND) commands.c
  673 cond.o:		$(SRC_LOG_DEPEND) cond.c
  674 filetype.o:	$(SRC_LOG_DEPEND) filetype.c
  675 form2conf.o:	$(SRC_LOG_DEPEND) form2conf.c
  676 icap.o:		$(SRC_LOG_DEPEND) icap.c
  677 icp.o:		$(SRC_LOG_DEPEND) icp.c
  678 inetd.o:	$(SRC_LOG_DEPEND) inetd.c
  679 iotimeout.o:	$(SRC_LOG_DEPEND) iotimeout.c
  680 lpr.o:		$(SRC_LOG_DEPEND) lpr.c
  681 misc.o:		../include/log.h misc.c
  682 sftp.o:		$(SRC_LOG_DEPEND) sftp.c
  683 spinach.o:	$(SRC_LOG_DEPEND) spinach.c
  684 shio.o:		$(SRC_LOG_DEPEND) shio.c
  685 socks4.o:	$(SRC_LOG_DEPEND) socks4.c
  686 sudo.o:		$(SRC_LOG_DEPEND) sudo.c
  687 svstat.o:	../include/log.h svstat.c
  688 syslog.o:	$(SRC_LOG_DEPEND) syslog.c
  689 thruwayd.o:	$(SRC_LOG_DEPEND) thruwayd.c
  690 tsp.o:		$(SRC_LOG_DEPEND) tsp.c
  691 uns.o:		../include/log.h uns.c
  692 
  693 MKAT =		$(MAKEAT) $@
  694 LMAKE0 =	"$(MAKE)" libx $(MAKEENV0) CFLAGS="$(CFLAGS)"
  695 LMAKE =		"$(MAKE)" libx $(MAKEENV)
  696 LIB_DEPEND0 =	Makefile.go ../include/dgctx.h
  697 LIB_DEPEND =	$(LIB_DEPEND0) $(INC_DEPEND_COMMON)
  698 
  699 filters:
  700 		$(MAKEAT) "" ../filters     "" \
  701 			"$(MAKE)" filters $(MAKEENV) \
  702 			CFLAGS="$(XCFLAGS)" LIBSC="$(LIBSC)" LIBDGF=-ldelegate
  703 
  704 subin:		../subin/dgpam ../lib/library.a
  705 
  706 SUBIN_DEPEND =	../subin/Makefile \
  707 		../subin/dgpam.c \
  708 		../subin/dgforkpty.c ../rary/netsh.c ../maker/_-sgTTy.c \
  709 		../rary/pam.c
  710 
  711 ../subin/dgpam: $(SUBIN_DEPEND)
  712 		$(MAKEAT) "" ../subin       "" \
  713 			"$(MAKE)" commands $(MAKEENV) \
  714 			CFLAGS="$(XCFLAGS)" LIBSC="$(LIBSC)" LIBDGF=-ldelegate
  715 
  716 $(MKCPPF):	../include/mkcpp.c ../putsigned.c
  717 		$(CC) -o $@ ../include/mkcpp.c $(LIBDIRS)
  718 
  719 ../gen/mime.h:		$(MKCPPF) ../include/mime.h
  720 			$(MKCPPF) ../include/mime.h $@
  721 ../gen/dglib.h:		$(MKCPPF) ../include/dglib.h
  722 			$(MKCPPF) ../include/dglib.h $@
  723 ../gen/delegate.h:	$(MKCPPF) ../include/delegate.h
  724 			$(MKCPPF) ../include/delegate.h $@
  725 ../gen/htswitch.h:	$(MKCPPF) ../include/htswitch.h
  726 			$(MKCPPF) ../include/htswitch.h $@
  727 ../gen/ystrvec.h:	$(MKCPPF) ../include/ystrvec.h
  728 			$(MKCPPF) ../include/ystrvec.h $@
  729 ../gen/vaddr.h:		$(MKCPPF) ../include/vaddr.h
  730 			$(MKCPPF) ../include/vaddr.h $@
  731 ../gen/http.h:		$(MKCPPF) ../include/http.h
  732 			$(MKCPPF) ../include/http.h $@
  733 ../gen/url.h:		$(MKCPPF) ../include/url.h
  734 			$(MKCPPF) ../include/url.h $@
  735 ../gen/htadmin.h:	$(MKCPPF) ../include/htadmin.h
  736 			$(MKCPPF) ../include/htadmin.h $@
  737 
  738 ../gen/caps.h:		$(MKCPPF) ../dgcaps.h caps.c
  739 			$(MKCPPF) caps.c $@ -sign
  740 ../gen/stls.h:		$(MKCPPF) ../dgcaps.h stls.c
  741 			$(MKCPPF) stls.c $@ -sign
  742 ../gen/vsap.h:		$(MKCPPF) ../dgcaps.h vsap.c
  743 			$(MKCPPF) vsap.c $@ -sign
  744 ../gen/sox.h:		$(MKCPPF) ../dgcaps.h sox.c
  745 			$(MKCPPF) sox.c $@ -sign
  746 ../gen/htaccept.h:	$(MKCPPF) ../dgcaps.h htaccept.c
  747 			$(MKCPPF) htaccept.c $@ -sign
  748 
  749 TYPEDEFS_H = ../include/typedefs.h
  750 typedefs:	$(TYPEDEFS_H)
  751 $(TYPEDEFS_H):	Makefile.go ../include/Makefile ../include/mkdef
  752 		$(MAKEAT) "" ../include "" $(LMAKE)
  753 
  754 $(TELEPORTF):	$(LIB_DEPEND) $(LIBSRC_TELEPORT)
  755 		$(MKAT) ../teleport libteleport.a $(LMAKE)
  756 
  757 $(RESOLVYF):	$(LIB_DEPEND) $(LIBSRC_RESOLVY)
  758 		$(MKAT) ../resolvy  libresolvy.a  $(LMAKE)
  759 
  760 $(LIBRARYF):	$(LIB_DEPEND) $(LIBSRC_RARY) ../include/ysignal.h
  761 		$(MKAT) ../rary     library.a     $(LMAKE)
  762 
  763 $(LIBMKITF):	$(LIB_DEPEND) $(LIBSRC_MIMEKIT) ../include/mime.h
  764 		$(MKAT) ../mimekit  libmimekit.a  $(LMAKE)
  765 
  766 $(LIBCFIF):	$(LIB_DEPEND) $(LIBSRC_CFI) ../include/ysignal.h
  767 		$(MKAT) ../filters  libcfi.a      $(LMAKE) SSLLIB="$(SSLLIB)"
  768 
  769 $(LIBMD5F):	$(LIB_DEPEND) $(LIBSRC_MD5)
  770 		$(MKAT) ../pds/md5  libmd5.a      $(LMAKE)
  771 
  772 $(LIBREGEXF):	$(LIB_DEPEND) $(LIBSRC_REGEX)
  773 		-$(MKAT) ../pds/regex libregex.a  $(LMAKE0)
  774 		-cp -p ../pds/regex/libregex.a ../lib
  775 		-cp -p ../pds/regex/regex.h ../gen
  776 
  777 $(LIBSUBSTF):	$(LIB_DEPEND0) $(LIBSRC_SUBST) $(LIBOPT_SF) ../include/log.h
  778 		$(MKAT) ../maker    libsubst.a    $(LMAKE) \
  779 			LDFLAGS="$(LDFLAGS)" \
  780 			LDLIBS="$(LIBSC0) $(LIBRARYF) $(LIBGATESF) $(LIBC)"
  781 
  782 $(LIBSUBSTXF):	$(LIB_DEPEND0) $(LIBSRC_SUBSTX) $(LIBSUBSTF)
  783 		$(MKAT) ../maker    libsubstx.a \
  784 			"$(MAKE)" libxx $(MAKEENV) \
  785 			LDLIBS="$(NETLIB) $(SSLLIB)"
  786 
  787 fsx:		delegated$(EXE) $(LIBFSX)
  788 $(LIBFSX):	$(LIB_DEPEND) $(LIBSRC_FSX) ../include/vaddr.h
  789 		$(MKAT) ../fsx  libfsx.a $(LMAKE)
  790 
  791 Makefile.go:	Makefile.chk ../maker/Makefile $(MKMAKE)
  792 		"$(MKMAKE)" -cksum $(LFILES)
  793 		"$(MKMAKE)" -mkmake "$(MAKE)" $@ "$(CC)" "$(CFLAGS)" "$(CFLAGSPLUS)" "$(LDFLAGS)" "$(RANLIB)" "$(NETLIB)" NETLIB "$(LIBSRCS)" "$(SSLLIB)" SSLLIB
  794 
  795 $(LIBGATESF):	Makefile ../gates/Makefile
  796 		$(MKAT) ../gates libgates.a $(LMAKE)
  797 
  798 $(LIBOPT_SF):	Makefile $(OPT_S_OBJS)
  799 		-$(RM) $@
  800 		$(ARC) $(OPT_S_OBJS)
  801 		-$(RANLIB) $@
  802