# Don't edit Makefile!  Use conf-* for configuration.

SHELL=/bin/sh

default: it

clean:
	rm -f auto_ageout.h auto_antivir_cmd.c auto_antivir_cmd.o auto_cleaner.c \
	auto_cleaner.o auto_cqlog.c auto_cqlog.o auto_cqpause.c auto_cqpause.o \
	auto-fnlen auto_fnlen.h auto-fnlen.o auto-gid auto-gid.o auto_gids.c \
	auto_gids.o auto-pidt auto_pidt.h auto-pidt.o auto_pkg.c auto_pkg.o \
	auto_qmailbin.c auto_qmailbin.o auto_qmailq.c auto_qmailq_destdir.c \
	auto_qmailq_destdir.o auto_qmailq.o auto_qmailq_oldpath.c \
	auto_qmailq_oldpath.o auto_qscanq.c auto_qscanq.o auto_qstdin.c \
	auto_qstdin.o auto_retries.h auto_ripmime_cmd.c auto_ripmime_cmd.o \
	auto_rmcmd.c auto_rmcmd.o auto_scancmd.c auto_scancmd.o auto_scanq.c \
	auto_scanq.o auto_scan_stdin.h auto_spool.c auto_spool.o auto-str \
	auto-strarr auto-strarr.o auto-str.o auto_svc.c auto_svc.o auto-uid \
	auto-uid.o auto_uids.c auto_uids.o buffer_0.o buffer_1.o buffer_2.o \
	buffer.a buffer_copy.o buffer_get.o buffer.o buffer_put.o buffer_read.o \
	buffer_write.o byte_copy.o byte_cr.o choose cleanq cleanq.o compile \
	direntry.h do_cleanq.o do_ripmime.o do_scan.o env.a env.o error.a \
	error_no.h error.o error_str.o error_temp.o fd.a fd_copy.o fd_move.o \
	fifo.o fmt_ulong.o fmt_xpid.o fork.h generic-install.o getopt.a \
	hasmkffo.h hassgact.h hassgprm.h haswaitp.h install-cleanq \
	install-cleanq.o install-post install-post.o install-unwrap \
	install-unwrap.o install-wrap install-wrap.o it load mkfn.o open_excl.o \
	open_read.o open_trunc.o qscanq qscanq.o qscanq-stdin qscanq-stdin.o \
	run-antivir run-antivir.o run-cleanq run-cleanq.o seek.a seek_cur.o \
	seek_end.o seek_set.o seek_trunc.o sgetopt.o sig.a sig_alarm.o \
	sig_block.o sig_catch.o str.a str_cpy.o str_diff.o strerr.a strerr_die.o \
	strerr_sys.o str_len.o str_start.o subgetopt.o sysdeps tai.a taia_now.o \
	taia_pack.o tai_pack.o time.h timestamp.o uint64.h wait.a wait_nohang.o \
	wait_pid.o

auto_ageout.h: conf-ageout
	echo "#define MAX_AGE" "`head -1 < conf-ageout`" > auto_ageout.h.tmp && \
	mv auto_ageout.h.tmp auto_ageout.h

auto_antivir_cmd.c: auto-strarr conf-antivir-cmd
	./auto-strarr auto_antivir_cmd `head -1 conf-antivir-cmd` > \
	auto_antivir_cmd.c.tmp && mv auto_antivir_cmd.c.tmp auto_antivir_cmd.c

auto_antivir_cmd.o: compile auto_antivir_cmd.c
	./compile auto_antivir_cmd.c

auto_cleaner.c: auto-str conf-pkg
	./auto-str auto_cleaner "`head -1 conf-pkg`"/command/cleanq > \
	auto_cleaner.c.tmp
	./auto-str auto_runcleaner "`head -1 conf-pkg`"/command/run-cleanq >> \
	auto_cleaner.c.tmp && mv auto_cleaner.c.tmp auto_cleaner.c

auto_cleaner.o: compile auto_cleaner.c
	./compile auto_cleaner.c

auto_cqlog.c: auto-str conf-cqlog
	./auto-str auto_cqlog "`head -1 conf-cqlog`" > auto_cqlog.c.tmp && mv \
	auto_cqlog.c.tmp auto_cqlog.c

auto_cqlog.o: compile auto_cqlog.c
	./compile auto_cqlog.c

auto_cqpause.c: auto-str conf-cqpause
	./auto-str auto_cqpause "`head -1 conf-cqpause`" > auto_cqpause.c.tmp && \
	mv auto_cqpause.c.tmp auto_cqpause.c

auto_cqpause.o: compile auto_cqpause.c
	./compile auto_cqpause.c

auto-fnlen: load auto-fnlen.o buffer.a str.a error.a fmt_ulong.o
	./load auto-fnlen buffer.a str.a error.a fmt_ulong.o 

auto_fnlen.h: auto-fnlen
	./auto-fnlen > auto_fnlen.h.tmp && mv auto_fnlen.h.tmp auto_fnlen.h

auto-fnlen.o: compile auto-fnlen.c buffer.h readwrite.h exit.h scan.h \
fmt.h timestamp.h auto_pidt.h
	./compile auto-fnlen.c

auto-gid: load auto-gid.o buffer.a str.a error.a fmt_ulong.o
	./load auto-gid buffer.a str.a error.a fmt_ulong.o 

auto-gid.o: compile auto-gid.c buffer.h readwrite.h exit.h scan.h fmt.h
	./compile auto-gid.c

auto_gids.c: auto-gid auto-str conf-groups
	./auto-gid auto_ctlgid "`head -1 conf-groups`" >> auto_gids.c.tmp
	./auto-str auto_ctlgroup "`head -1 conf-groups`" >> auto_gids.c.tmp && \
	mv auto_gids.c.tmp auto_gids.c

auto_gids.o: compile auto_gids.c
	./compile auto_gids.c

auto-pidt: load auto-pidt.o buffer.a str.a error.a fmt_ulong.o
	./load auto-pidt buffer.a str.a error.a fmt_ulong.o 

auto_pidt.h: auto-pidt
	./auto-pidt > auto_pidt.h.tmp && mv auto_pidt.h.tmp auto_pidt.h

auto-pidt.o: compile auto-pidt.c buffer.h readwrite.h exit.h scan.h fmt.h
	./compile auto-pidt.c

auto_pkg.c: auto-str conf-pkg
	./auto-str auto_pkg "`head -1 conf-pkg`" > auto_pkg.c.tmp && mv \
	auto_pkg.c.tmp auto_pkg.c

auto_pkg.o: compile auto_pkg.c
	./compile auto_pkg.c

auto_qmailbin.c: auto-str conf-qmail
	./auto-str auto_qmailbin "`head -1 conf-qmail`"/bin > \
	auto_qmailbin.c.tmp && mv auto_qmailbin.c.tmp auto_qmailbin.c

auto_qmailbin.o: compile auto_qmailbin.c
	./compile auto_qmailbin.c

auto_qmailq.c: auto-strarr conf-qmailq
	./auto-strarr auto_qmailq "`head -1 conf-qmailq`"/qmail-queue > \
	auto_qmailq.c.tmp && mv auto_qmailq.c.tmp auto_qmailq.c

auto_qmailq_destdir.c: auto-str conf-qmailq
	./auto-str auto_qmailq_destdir "`head -1 conf-qmailq`" > \
	auto_qmailq_destdir.c.tmp && mv auto_qmailq_destdir.c.tmp \
	auto_qmailq_destdir.c

auto_qmailq_destdir.o: compile auto_qmailq_destdir.c
	./compile auto_qmailq_destdir.c

auto_qmailq.o: compile auto_qmailq.c
	./compile auto_qmailq.c

auto_qmailq_oldpath.c: auto-str conf-qmail
	./auto-str auto_qmailq_oldpath "`head -1 conf-qmail`"/bin/qmail-queue > \
	auto_qmailq_oldpath.c.tmp && mv auto_qmailq_oldpath.c.tmp \
	auto_qmailq_oldpath.c

auto_qmailq_oldpath.o: compile auto_qmailq_oldpath.c
	./compile auto_qmailq_oldpath.c

auto_qscanq.c: auto-str conf-pkg
	./auto-str auto_qscanq "`head -1 conf-pkg`"/command/qscanq > \
	auto_qscanq.c.tmp && mv auto_qscanq.c.tmp auto_qscanq.c

auto_qscanq.o: compile auto_qscanq.c
	./compile auto_qscanq.c

auto_qstdin.c: auto-strarr conf-pkg
	./auto-strarr auto_qstdin "`head -1 conf-pkg`"/command/qscanq-stdin > \
	auto_qstdin.c.tmp && mv auto_qstdin.c.tmp auto_qstdin.c

auto_qstdin.o: compile auto_qstdin.c
	./compile auto_qstdin.c

auto_retries.h: conf-retries
	echo "#define MAX_RETRIES" "`head -1 < conf-retries`" > \
	auto_retries.h.tmp && mv auto_retries.h.tmp auto_retries.h

auto_ripmime_cmd.c: auto-strarr conf-ripmime-cmd
	./auto-strarr auto_ripmime_cmd `head -1 conf-ripmime-cmd` > \
	auto_ripmime_cmd.c.tmp && mv auto_ripmime_cmd.c.tmp auto_ripmime_cmd.c

auto_ripmime_cmd.o: compile auto_ripmime_cmd.c
	./compile auto_ripmime_cmd.c

auto_rmcmd.c: auto-strarr conf-rm
	./auto-strarr auto_rmcmd `head -1 conf-rm` > auto_rmcmd.c.tmp && mv \
	auto_rmcmd.c.tmp auto_rmcmd.c

auto_rmcmd.o: compile auto_rmcmd.c
	./compile auto_rmcmd.c

auto_scancmd.c: auto-strarr conf-scancmd
	./auto-strarr auto_scancmd `head -1 conf-scancmd` > auto_scancmd.c.tmp \
	&& mv auto_scancmd.c.tmp auto_scancmd.c

auto_scancmd.o: compile auto_scancmd.c
	./compile auto_scancmd.c

auto_scanq.c: auto-str conf-spool
	./auto-str auto_scanq "`head -1 conf-spool`" > auto_scanq.c.tmp && mv \
	auto_scanq.c.tmp auto_scanq.c

auto_scanq.o: compile auto_scanq.c
	./compile auto_scanq.c

auto_scan_stdin.h: conf-scan-stdin
	echo "#define SCAN_STDIN" "`head -1 < conf-scan-stdin`" > \
	auto_scan_stdin.h.tmp && mv auto_scan_stdin.h.tmp auto_scan_stdin.h

auto_spool.c: auto-str conf-spool
	./auto-str auto_spool "`head -1 conf-spool`"/root/scanq > \
	auto_spool.c.tmp && mv auto_spool.c.tmp auto_spool.c

auto_spool.o: compile auto_spool.c
	./compile auto_spool.c

auto-str: load auto-str.o buffer.a error.a str.a
	./load auto-str buffer.a error.a str.a 

auto-strarr: load auto-strarr.o buffer.a error.a str.a
	./load auto-strarr buffer.a error.a str.a 

auto-strarr.o: compile auto-strarr.c buffer.h exit.h
	./compile auto-strarr.c

auto-str.o: compile auto-str.c buffer.h exit.h
	./compile auto-str.c

auto_svc.c: auto-str conf-svc
	./auto-str auto_svc "`head -1 conf-svc`" > auto_svc.c.tmp && mv \
	auto_svc.c.tmp auto_svc.c

auto_svc.o: compile auto_svc.c
	./compile auto_svc.c

auto-uid: load auto-uid.o buffer.a str.a error.a fmt_ulong.o
	./load auto-uid buffer.a str.a error.a fmt_ulong.o 

auto-uid.o: compile auto-uid.c buffer.h readwrite.h exit.h scan.h fmt.h
	./compile auto-uid.c

auto_uids.c: auto-uid conf-users
	./auto-str auto_user "`head -1 conf-users`" > auto_uids.c.tmp
	./auto-str auto_loguser "`head -2 conf-users|tail -1`" >> \
	auto_uids.c.tmp
	./auto-uid auto_uid "`head -1 conf-users`" >> auto_uids.c.tmp
	./auto-uid auto_loguid "`head -2 conf-users|tail -1`" >> auto_uids.c.tmp \
	&& mv auto_uids.c.tmp auto_uids.c

auto_uids.o: compile auto_uids.c
	./compile auto_uids.c

buffer_0.o: compile buffer_0.c buffer.h
	./compile buffer_0.c

buffer_1.o: compile buffer_1.c buffer.h
	./compile buffer_1.c

buffer_2.o: compile buffer_2.c buffer.h
	./compile buffer_2.c

buffer.a: makelib buffer_0.o buffer_1.o buffer_2.o buffer_put.o \
buffer_write.o buffer_copy.o buffer_read.o buffer_get.o buffer.o
	./makelib buffer.a buffer_0.o buffer_1.o buffer_2.o buffer_put.o \
	buffer_write.o buffer_copy.o buffer_read.o buffer_get.o buffer.o

buffer_copy.o: compile buffer_copy.c buffer.h
	./compile buffer_copy.c

buffer_get.o: compile buffer_get.c buffer.h byte.h error.h error_no.h
	./compile buffer_get.c

buffer.o: compile buffer.c buffer.h
	./compile buffer.c

buffer_put.o: compile buffer_put.c buffer.h str.h byte.h error.h \
error_no.h
	./compile buffer_put.c

buffer_read.o: compile buffer_read.c buffer.h
	./compile buffer_read.c

buffer_write.o: compile buffer_write.c buffer.h
	./compile buffer_write.c

byte_copy.o: compile byte_copy.c byte.h
	./compile byte_copy.c

byte_cr.o: compile byte_cr.c byte.h
	./compile byte_cr.c

choose: home warn-auto.sh choose.sh
	rm -f choose
	cat warn-auto.sh choose.sh \
	| sed s}HOME}"`head -1 home`"}g \
	> choose
	chmod 755 choose

cleanq: load cleanq.o strerr.a error.a buffer.a str.a wait.a getopt.a \
auto_rmcmd.o
	./load cleanq strerr.a error.a buffer.a str.a wait.a getopt.a \
	auto_rmcmd.o 

cleanq.o: compile cleanq.c buffer.h error.h strerr.h direntry.h \
auto_ageout.h auto_rmcmd.h wait.h sgetopt.h str.h time.h error_no.h \
subgetopt.h
	./compile cleanq.c

compile: conf-cc print-cc.sh systype warn-auto.sh
	rm -f compile
	sh print-cc.sh > compile
	chmod 755 compile

direntry.h: choose compile trydrent.c direntry.h1 direntry.h2
	./choose c trydrent direntry.h1 direntry.h2 >direntry.h

do_cleanq.o: compile do_cleanq.c fork.h wait.h auto_cleaner.h
	./compile do_cleanq.c

do_ripmime.o: compile do_ripmime.c fork.h wait.h sig.h exitcodes.h \
strerr.h
	./compile do_ripmime.c

do_scan.o: compile do_scan.c fork.h wait.h sig.h exitcodes.h strerr.h
	./compile do_scan.c

env.a: makelib env.o
	./makelib env.a env.o

env.o: compile env.c str.h env.h
	./compile env.c

error.a: makelib error.o error_str.o error_temp.o
	./makelib error.a error.o error_str.o error_temp.o

error_no.h: choose compile load tryerrno.c error_no.h1 error_no.h2
	./choose clr tryerrno error_no.h1 error_no.h2 >error_no.h.tmp && mv \
	error_no.h.tmp error_no.h

error.o: compile error.c error.h error_no.h
	./compile error.c

error_str.o: compile error_str.c error.h error_no.h
	./compile error_str.c

error_temp.o: compile error_temp.c error.h error_no.h
	./compile error_temp.c

fd.a: makelib fd_copy.o fd_move.o
	./makelib fd.a fd_copy.o fd_move.o

fd_copy.o: compile fd_copy.c fd.h
	./compile fd_copy.c

fd_move.o: compile fd_move.c fd.h
	./compile fd_move.c

fifo.o: compile fifo.c hasmkffo.h fifo.h
	./compile fifo.c

fmt_ulong.o: compile fmt_ulong.c fmt.h
	./compile fmt_ulong.c

fmt_xpid.o: compile fmt_xpid.c fmt_xpid.h
	./compile fmt_xpid.c

fork.h: choose compile load tryvfork.c fork.h1 fork.h2
	./choose cl tryvfork fork.h1 fork.h2 >fork.h

generic-install.o: compile generic-install.c strerr.h error.h buffer.h \
open.h error_no.h
	./compile generic-install.c

getopt.a: makelib subgetopt.o sgetopt.o
	./makelib getopt.a subgetopt.o sgetopt.o

hasmkffo.h: choose compile load trymkffo.c hasmkffo.h1 hasmkffo.h2
	./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h

hassgact.h: choose compile trysgact.c hassgact.h1 hassgact.h2
	./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h

hassgprm.h: choose compile trysgprm.c hassgprm.h1 hassgprm.h2
	./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h

haswaitp.h: choose compile load trywaitp.c haswaitp.h1 haswaitp.h2
	./choose cl trywaitp haswaitp.h1 haswaitp.h2 >haswaitp.h

install-cleanq: load install-cleanq.o auto_scanq.o strerr.a \
generic-install.o buffer.a str.a error.a auto_uids.o auto_gids.o \
open_trunc.o auto_cleaner.o auto_pkg.o fifo.o open_read.o auto_cqpause.o \
auto_cqlog.o
	./load install-cleanq auto_scanq.o strerr.a generic-install.o buffer.a \
	str.a error.a auto_uids.o auto_gids.o open_trunc.o auto_cleaner.o \
	auto_pkg.o fifo.o open_read.o auto_cqpause.o auto_cqlog.o 

install-cleanq.o: compile install-cleanq.c auto_scanq.h strerr.h \
auto_uids.h auto_gids.h buffer.h auto_cleaner.h auto_pkg.h \
generic-install.h fifo.h open.h
	./compile install-cleanq.c

install-post: load install-post.o strerr.a generic-install.o buffer.a \
str.a error.a auto_uids.o auto_gids.o auto_pkg.o open_trunc.o
	./load install-post strerr.a generic-install.o buffer.a str.a error.a \
	auto_uids.o auto_gids.o auto_pkg.o open_trunc.o 

install-post.o: compile install-post.c auto_scanq.h strerr.h auto_uids.h \
auto_gids.h buffer.h auto_pkg.h generic-install.h
	./compile install-post.c

install-unwrap: load install-unwrap.o auto_scanq.o generic-install.o \
strerr.a buffer.a str.a error.a auto_uids.o open_trunc.o auto_pkg.o \
auto_qmailq_oldpath.o auto_qmailq_destdir.o auto_qmailbin.o auto_qscanq.o
	./load install-unwrap auto_scanq.o generic-install.o strerr.a buffer.a \
	str.a error.a auto_uids.o open_trunc.o auto_pkg.o auto_qmailq_oldpath.o \
	auto_qmailq_destdir.o auto_qmailbin.o auto_qscanq.o 

install-unwrap.o: compile install-unwrap.c auto_scanq.h str.h strerr.h \
auto_uids.h buffer.h auto_pkg.h generic-install.h
	./compile install-unwrap.c

install-wrap: load install-wrap.o auto_scanq.o strerr.a generic-install.o \
buffer.a str.a error.a auto_gids.o open_trunc.o auto_pkg.o \
auto_qmailq_oldpath.o auto_qmailq_destdir.o auto_qmailbin.o auto_qscanq.o
	./load install-wrap auto_scanq.o strerr.a generic-install.o buffer.a \
	str.a error.a auto_gids.o open_trunc.o auto_pkg.o auto_qmailq_oldpath.o \
	auto_qmailq_destdir.o auto_qmailbin.o auto_qscanq.o 

install-wrap.o: compile install-wrap.c auto_scanq.h str.h strerr.h \
auto_gids.h buffer.h auto_pkg.h generic-install.h
	./compile install-wrap.c

it: qscanq cleanq run-antivir run-cleanq install-post install-cleanq \
install-unwrap install-wrap qscanq-stdin sysdeps

load: conf-ld print-ld.sh systype warn-auto.sh
	rm -f load
	sh print-ld.sh > load
	chmod 755 load

mkfn.o: compile mkfn.c fmt.h fmt_xpid.h timestamp.h auto_pidt.h
	./compile mkfn.c

open_excl.o: compile open_excl.c open.h
	./compile open_excl.c

open_read.o: compile open_read.c open.h
	./compile open_read.c

open_trunc.o: compile open_trunc.c open.h
	./compile open_trunc.c

qscanq: load qscanq.o buffer.a strerr.a env.a str.a wait.a error.a \
timestamp.o tai.a fd.a auto_spool.o mkfn.o fmt_xpid.o do_cleanq.o \
auto_cleaner.o auto_qstdin.o sig.a
	./load qscanq buffer.a strerr.a env.a str.a wait.a error.a timestamp.o \
	tai.a fd.a auto_spool.o mkfn.o fmt_xpid.o do_cleanq.o auto_cleaner.o \
	auto_qstdin.o sig.a 

qscanq.o: compile qscanq.c exit.h auto_spool.h auto_fnlen.h mkfn.h \
auto_retries.h fork.h wait.h sig.h exitcodes.h buffer.h strerr.h env.h
	./compile qscanq.c

qscanq-stdin: load qscanq-stdin.o strerr.a buffer.a env.a str.a \
timestamp.o tai.a fd.a auto_spool.o mkfn.o fmt_xpid.o open_excl.o \
open_read.o do_ripmime.o auto_ripmime_cmd.o do_scan.o auto_scancmd.o \
seek.a do_cleanq.o auto_cleaner.o auto_qmailq.o sig.a wait.a error.a
	./load qscanq-stdin strerr.a buffer.a env.a str.a timestamp.o tai.a fd.a \
	auto_spool.o mkfn.o fmt_xpid.o open_excl.o open_read.o do_ripmime.o \
	auto_ripmime_cmd.o do_scan.o auto_scancmd.o seek.a do_cleanq.o \
	auto_cleaner.o auto_qmailq.o sig.a wait.a error.a 

qscanq-stdin.o: compile qscanq-stdin.c buffer.h exit.h open.h fd.h wait.h \
seek.h sig.h auto_ageout.h exitcodes.h mkfn.h auto_fnlen.h \
auto_scan_stdin.h env.h strerr.h
	./compile qscanq-stdin.c

run-antivir: load run-antivir.o auto_antivir_cmd.o wait.a error.a
	./load run-antivir auto_antivir_cmd.o wait.a error.a 

run-antivir.o: compile run-antivir.c fork.h wait.h exitcodes.h
	./compile run-antivir.c

run-cleanq: load run-cleanq.o auto_scanq.o auto_svc.o auto_uids.o
	./load run-cleanq auto_scanq.o auto_svc.o auto_uids.o 

run-cleanq.o: compile run-cleanq.c fork.h auto_scanq.h auto_svc.h \
auto_uids.h
	./compile run-cleanq.c

seek.a: makelib seek_set.o seek_cur.o seek_end.o seek_trunc.o
	./makelib seek.a seek_set.o seek_cur.o seek_end.o seek_trunc.o

seek_cur.o: compile seek_cur.c seek.h
	./compile seek_cur.c

seek_end.o: compile seek_end.c seek.h
	./compile seek_end.c

seek_set.o: compile seek_set.c seek.h
	./compile seek_set.c

seek_trunc.o: compile seek_trunc.c seek.h
	./compile seek_trunc.c

sgetopt.o: compile sgetopt.c buffer.h sgetopt.h subgetopt.h subgetopt.h
	./compile sgetopt.c

sig.a: makelib sig_alarm.o sig_catch.o sig_block.o
	./makelib sig.a sig_alarm.o sig_catch.o sig_block.o

sig_alarm.o: compile sig_alarm.c sig.h
	./compile sig_alarm.c

sig_block.o: compile sig_block.c sig.h hassgprm.h
	./compile sig_block.c

sig_catch.o: compile sig_catch.c sig.h hassgact.h
	./compile sig_catch.c

str.a: makelib byte_copy.o byte_cr.o str_len.o str_cpy.o str_diff.o \
str_start.o
	./makelib str.a byte_copy.o byte_cr.o str_len.o str_cpy.o str_diff.o \
	str_start.o

str_cpy.o: compile str_cpy.c str.h
	./compile str_cpy.c

str_diff.o: compile str_diff.c str.h
	./compile str_diff.c

strerr.a: makelib strerr_die.o strerr_sys.o
	./makelib strerr.a strerr_die.o strerr_sys.o

strerr_die.o: compile strerr_die.c buffer.h strerr.h
	./compile strerr_die.c

strerr_sys.o: compile strerr_sys.c error.h strerr.h error_no.h
	./compile strerr_sys.c

str_len.o: compile str_len.c str.h
	./compile str_len.c

str_start.o: compile str_start.c str.h
	./compile str_start.c

subgetopt.o: compile subgetopt.c subgetopt.h
	./compile subgetopt.c

sysdeps: systype compile load direntry.h fork.h hasmkffo.h hassgact.h \
hassgprm.h haswaitp.h uint64.h
	rm -f sysdeps
	cat systype compile load >> sysdeps
	grep sysdep direntry.h >> sysdeps
	grep sysdep fork.h >> sysdeps
	grep sysdep hasmkffo.h >> sysdeps
	grep sysdep hassgact.h >> sysdeps
	grep sysdep hassgprm.h >> sysdeps
	grep sysdep haswaitp.h >> sysdeps
	grep sysdep uint64.h >> sysdeps

tai.a: makelib taia_now.o taia_pack.o tai_pack.o
	./makelib tai.a taia_now.o taia_pack.o tai_pack.o

taia_now.o: compile taia_now.c time.h taia.h tai.h uint64.h
	./compile taia_now.c

taia_pack.o: compile taia_pack.c taia.h tai.h uint64.h
	./compile taia_pack.c

tai_pack.o: compile tai_pack.c tai.h uint64.h
	./compile tai_pack.c

time.h: choose compile trysystime.c time.h1 time.h2
	./choose c trysystime time.h1 time.h2 > time.h

timestamp.o: compile timestamp.c taia.h timestamp.h tai.h uint64.h
	./compile timestamp.c

uint64.h: choose compile load tryulong64.c uint64.h1 uint64.h2
	./choose clr tryulong64 uint64.h1 uint64.h2 >uint64.h

wait.a: makelib wait_pid.o wait_nohang.o
	./makelib wait.a wait_pid.o wait_nohang.o

wait_nohang.o: compile wait_nohang.c haswaitp.h
	./compile wait_nohang.c

wait_pid.o: compile wait_pid.c error.h haswaitp.h error_no.h
	./compile wait_pid.c
