#	Library-making makefile

CC		=	cc
LIBFILE		=	LibFile

CCFlags		=	-c -fahi -depend !Depend -throwback -I,C: -DDesk__making_Debug
LibFileFlags	=	-c -o

TargetDir	=	^.^.^.Debug

Common		= o.Debug	o.DumpRegs
Common_M	= o.Debug_M	o.DumpRegs
Common_4	= o4.Debug	o.DumpRegs


#VPATH = @ @.^



ALL:				\
	$(TargetDir).stderr	\
	$(TargetDir).Signal	\
	$(TargetDir).uniqfile	\
	$(TargetDir).uniqfile_m	\
	$(TargetDir).pipetype	\
	$(TargetDir).pipetype_m	\
	$(TargetDir).uniqpipe	\
	$(TargetDir).uniqpipe_m	\
	$(TargetDir).stderr_m	\


PDebug:	$(TargetDir).pdebug $(TargetDir).pdebug_m
	Echo




# If anyone knows how to automate these, please let me know!


$(TargetDir).Signal:	o.Signal
	$(LIBFILE) $(LibFileFlags) $@ o.Signal

$(TargetDir).pipetype:	o.pipetype o.Debug
	$(LIBFILE) $(LibFileFlags) $@ o.pipetype $(Common)

$(TargetDir).uniqpipe:	o.uniqpipe $(Common)
	$(LIBFILE) $(LibFileFlags) $@ o.uniqpipe $(Common)

$(TargetDir).stderr:	o.stderr $(Common)
	$(LIBFILE) $(LibFileFlags) $@ o.stderr $(Common)

$(TargetDir).heapgraph:	o.heapgraph $(Common)
	$(LIBFILE) $(LibFileFlags) $@ o.heapgraph $(Common)

$(TargetDir).uniqfile:	o.uniqfile $(Common)
	$(LIBFILE) $(LibFileFlags) $@ o.uniqfile $(Common)

$(TargetDir).uniqfile_m:	o.uniqfile_m $(Common_M)
	$(LIBFILE) $(LibFileFlags) $@ o.uniqfile_m $(Common_M)

$(TargetDir).pipetype_m:	o.pipetype_m $(Common_M)
	$(LIBFILE) $(LibFileFlags) $@ o.pipetype_m $(Common_M)

$(TargetDir).uniqpipe_m:	o.uniqpipe_m $(Common_M)
	$(LIBFILE) $(LibFileFlags) $@ o.uniqpipe_m $(Common_M)

$(TargetDir).stderr_m:	o.stderr_m $(Common_M)
	$(LIBFILE) $(LibFileFlags) $@ o.stderr_m $(Common_M)

$(TargetDir).uniqfile_4:	o4.uniqfile $(Common_4)
	$(LIBFILE) $(LibFileFlags) $@ o4.uniqfile $(Common_4)

$(TargetDir).pdebug:	o.pdebug $(Common)
	$(LIBFILE) $(LibFileFlags) $@ o.pdebug $(Common)

$(TargetDir).pdebug_m:	o.pdebug_m $(Common_M)
	$(LIBFILE) $(LibFileFlags) $@ o.pdebug_m $(Common_M)




o.stderr_m:	c.stderr
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.stderr

o.uniqpipe_m:	c.uniqpipe
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.uniqpipe

o.pipetype_m:	c.pipetype
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.pipetype

o.uniqfile_m:	c.uniqfile
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.uniqfile

o.Debug_m:	c.Debug
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.Debug

o.pdebug_m:	c.pdebug
	$(CC) $(CCFlags) -Zm -DDesk__MODULE_CLIENT -o $@ c.pdebug





.SUFFIXES:	.o .o4 .s .c
.c.o:
	$(CC) $(CCFlags) -o $@ $<

.s.o:
	objasm $(ASMFlags) -from $< -to $@ -throwback

.c.o4:
	cc400 $(CCFlags) -o $@ $<



# Dynamic dependencies:
o4.uniqfile:	c.uniqfile
o4.uniqfile:	C:h.kernel
o4.uniqfile:	C:Desk.h.Error2
o4.uniqfile:	C:Desk.h.Error
o4.uniqfile:	C:Desk.h.Core
o4.uniqfile:	C:h.kernel
o4.uniqfile:	C:Desk.h.JumpRaw
o4.uniqfile:	C:Desk.h.Debug
o4.uniqfile:	C:Desk.h.Str
o4.uniqfile:	C:Desk.h.Debug
o4.uniqfile:	C:Desk.h.Sound
o4.uniqfile:	C:Desk.h.Debug
o4.uniqfile:	h.Defs
o4.Debug:	c.Debug
o4.Debug:	C:Desk.h.BackTrace
o4.Debug:	C:h.kernel
o4.Debug:	C:Desk.h.Debug
o4.Debug:	C:Desk.h.Core
o4.Debug:	C:h.kernel
o4.Debug:	C:Desk.h.Error2
o4.Debug:	C:Desk.h.Error
o4.Debug:	C:Desk.h.JumpRaw
o4.Debug:	h.Defs
o.uniqfile:	c.uniqfile
o.uniqfile:	C:h.kernel
o.uniqfile:	C:Desk.h.Error2
o.uniqfile:	C:Desk.h.Error
o.uniqfile:	C:Desk.h.Core
o.uniqfile:	C:h.kernel
o.uniqfile:	C:Desk.h.JumpRaw
o.uniqfile:	C:Desk.h.Debug
o.uniqfile:	C:Desk.h.Str
o.uniqfile:	C:Desk.h.Debug
o.uniqfile:	C:Desk.h.Sound
o.uniqfile:	C:Desk.h.Debug
o.uniqfile:	h.Defs
o.uniqfile_m:	c.uniqfile
o.uniqfile_m:	C:h.kernel
o.uniqfile_m:	C:Desk.h.Error2
o.uniqfile_m:	C:Desk.h.Error
o.uniqfile_m:	C:Desk.h.Core
o.uniqfile_m:	C:h.kernel
o.uniqfile_m:	C:Desk.h.JumpRaw
o.uniqfile_m:	C:Desk.h.Debug
o.uniqfile_m:	C:Desk.h.Str
o.uniqfile_m:	C:Desk.h.Debug
o.uniqfile_m:	C:Desk.h.Sound
o.uniqfile_m:	C:Desk.h.Debug
o.uniqfile_m:	h.Defs
o.pipetype:	c.pipetype
o.pipetype:	C:Desk.h.Error
o.pipetype:	C:Desk.h.Core
o.pipetype:	C:h.kernel
o.pipetype:	C:Desk.h.WimpSWIs
o.pipetype:	C:Desk.h.Wimp
o.pipetype:	C:Desk.h.Error2
o.pipetype:	C:Desk.h.JumpRaw
o.pipetype:	C:Desk.h.Debug
o.pipetype:	C:Desk.h.Debug
o.pipetype:	C:Desk.h.Str
o.pipetype:	h.Defs
o.pipetype_m:	c.pipetype
o.pipetype_m:	C:Desk.h.Error
o.pipetype_m:	C:Desk.h.Core
o.pipetype_m:	C:h.kernel
o.pipetype_m:	C:Desk.h.WimpSWIs
o.pipetype_m:	C:Desk.h.Wimp
o.pipetype_m:	C:Desk.h.Error2
o.pipetype_m:	C:Desk.h.JumpRaw
o.pipetype_m:	C:Desk.h.Debug
o.pipetype_m:	C:Desk.h.Debug
o.pipetype_m:	C:Desk.h.Str
o.pipetype_m:	h.Defs
o.uniqpipe:	c.uniqpipe
o.uniqpipe:	C:Desk.h.Error
o.uniqpipe:	C:Desk.h.Core
o.uniqpipe:	C:h.kernel
o.uniqpipe:	C:Desk.h.Debug
o.uniqpipe:	C:Desk.h.Str
o.uniqpipe:	h.Defs
o.uniqpipe_m:	c.uniqpipe
o.uniqpipe_m:	C:Desk.h.Error
o.uniqpipe_m:	C:Desk.h.Core
o.uniqpipe_m:	C:h.kernel
o.uniqpipe_m:	C:Desk.h.Debug
o.uniqpipe_m:	C:Desk.h.Str
o.uniqpipe_m:	h.Defs
o.pdebug:	c.pdebug
o.pdebug:	C:Desk.h.Debug
o.pdebug:	C:Desk.h.Core
o.pdebug:	C:h.kernel
o.pdebug:	h.Defs
o.pdebug:	C:PDebug.h.Send
o.pdebug_m:	c.pdebug
o.pdebug_m:	C:Desk.h.Debug
o.pdebug_m:	C:Desk.h.Core
o.pdebug_m:	C:h.kernel
o.pdebug_m:	h.Defs
o.pdebug_m:	C:PDebug.h.Send
o.stderr:	c.stderr
o.stderr:	C:Desk.h.Debug
o.stderr:	C:Desk.h.Core
o.stderr:	C:h.kernel
o.stderr:	C:Desk.h.Error
o.stderr:	h.Defs
o.Signal:	c.Signal
o.Signal:	C:Desk.h.Debug
o.Signal:	C:Desk.h.Core
o.Signal:	C:h.kernel
o.Signal:	C:Desk.h.Event
o.Signal:	C:Desk.h.Wimp
o.Signal:	C:Desk.h.Error
o.stderr_m:	c.stderr
o.stderr_m:	C:Desk.h.Debug
o.stderr_m:	C:Desk.h.Core
o.stderr_m:	C:h.kernel
o.stderr_m:	C:Desk.h.Error
o.stderr_m:	h.Defs
o.Debug:	c.Debug
o.Debug:	C:Desk.h.BackTrace
o.Debug:	C:h.kernel
o.Debug:	C:Desk.h.Debug
o.Debug:	C:Desk.h.Core
o.Debug:	C:h.kernel
o.Debug:	C:Desk.h.Error2
o.Debug:	C:Desk.h.Error
o.Debug:	C:Desk.h.JumpRaw
o.Debug:	h.Defs
o.Debug_M:	c.Debug
o.Debug_M:	C:Desk.h.BackTrace
o.Debug_M:	C:h.kernel
o.Debug_M:	C:Desk.h.Debug
o.Debug_M:	C:Desk.h.Core
o.Debug_M:	C:h.kernel
o.Debug_M:	C:Desk.h.Error2
o.Debug_M:	C:Desk.h.Error
o.Debug_M:	C:Desk.h.JumpRaw
o.Debug_M:	h.Defs
