#
# Makefile to compile the CadMac paint application.
#

MAIN_DIR =	../..
INCLUDE_DIR =	$(MAIN_DIR)/include
MACLIB_DIR =	$(MAIN_DIR)/maclib
MACLIB =	$(MACLIB_DIR)/libmac.a
INCLUDES =	-I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/mac
CFLAGS =	$(INCLUDES) $(GLOBFLAGS)
ARGS =		-f
LIBS =		$(OBJS) $(MACLIB)

TOOL_DIR =	$(MAIN_DIR)/mytools/bin
DEPEND =	$(TOOL_DIR)/depend

WINDOW_OBJS =	work.o modes.o borders.o patterns.o maps.o\
		in_out.o quit.o menus.o brushShape.o page.o

MODE_OBJS =	lines.o fat.o erase.o bucket.o brush.o text.o pencil.o\
		ovrect.o scroll.o

JUNK_OBJS =	mouse.o ut.o

OBJS =		$(WINDOW_OBJS) $(MODE_OBJS) $(JUNK_OBJS)


all:		paint


clean:
		-/bin/rm -f paint *.o a.out core

depend:
		$(DEPEND) -M Makefile -C -S $(INCLUDES) $(OBJS) paint

########################################################################
############ DO NOT PUT STUFF BELOW HERE -- IT WILL GO AWAY ############
############ DO NOT DELETE THIS LINE -- MAKE DEPEND USES IT ############

work.o:         work.c
		$(CC) $(CFLAGS) -c work.c
work.o:         ./paint.h
work.o:         /usr/include/termio.h
work.o:         ../../include/sys/termio.h
work.o:         /usr/include/stdio.h
work.o:         ../../include/mac/Mac.h
work.o:         ../../include/mac/global.h
work.o:         ../../include/mac/bool.h
work.o:         ../../include/mac/MemMgr.h
work.o:         ../../include/mac/QuickDraw.h
work.o:         ../../include/mac/FontMgr.h
work.o:         ../../include/mac/LayerMgr.h
work.o:         ../../include/mac/WindowMgr.h
work.o:         ../../include/mac/ControlMgr.h
work.o:         ../../include/mac/EventMgr.h
work.o:         ../../include/mac/MenuMgr.h
work.o:         ../../include/mac/UtilMgr.h
work.o:         ../../include/mac/TextEdit.h
work.o:         ../../include/mac/RMgr.h
work.o:         ./mouse.h
work.o:         ./cursors.h
work.o:         ./work.h
work.o:         ./modes.h

modes.o:        modes.c
		$(CC) $(CFLAGS) -c modes.c
modes.o:        ./paint.h
modes.o:        /usr/include/termio.h
modes.o:        ../../include/sys/termio.h
modes.o:        /usr/include/stdio.h
modes.o:        ../../include/mac/Mac.h
modes.o:        ../../include/mac/global.h
modes.o:        ../../include/mac/bool.h
modes.o:        ../../include/mac/MemMgr.h
modes.o:        ../../include/mac/QuickDraw.h
modes.o:        ../../include/mac/FontMgr.h
modes.o:        ../../include/mac/LayerMgr.h
modes.o:        ../../include/mac/WindowMgr.h
modes.o:        ../../include/mac/ControlMgr.h
modes.o:        ../../include/mac/EventMgr.h
modes.o:        ../../include/mac/MenuMgr.h
modes.o:        ../../include/mac/UtilMgr.h
modes.o:        ../../include/mac/TextEdit.h
modes.o:        ../../include/mac/RMgr.h
modes.o:        ./mouse.h
modes.o:        ./cursors.h
modes.o:        ./modes.h
modes.o:        ./modeDefs.h

borders.o:      borders.c
		$(CC) $(CFLAGS) -c borders.c
borders.o:      ./paint.h
borders.o:      /usr/include/termio.h
borders.o:      ../../include/sys/termio.h
borders.o:      /usr/include/stdio.h
borders.o:      ../../include/mac/Mac.h
borders.o:      ../../include/mac/global.h
borders.o:      ../../include/mac/bool.h
borders.o:      ../../include/mac/MemMgr.h
borders.o:      ../../include/mac/QuickDraw.h
borders.o:      ../../include/mac/FontMgr.h
borders.o:      ../../include/mac/LayerMgr.h
borders.o:      ../../include/mac/WindowMgr.h
borders.o:      ../../include/mac/ControlMgr.h
borders.o:      ../../include/mac/EventMgr.h
borders.o:      ../../include/mac/MenuMgr.h
borders.o:      ../../include/mac/UtilMgr.h
borders.o:      ../../include/mac/TextEdit.h
borders.o:      ../../include/mac/RMgr.h
borders.o:      ./mouse.h
borders.o:      ./cursors.h
borders.o:      ./borders.h

patterns.o:     patterns.c
		$(CC) $(CFLAGS) -c patterns.c
patterns.o:     ./paint.h
patterns.o:     /usr/include/termio.h
patterns.o:     ../../include/sys/termio.h
patterns.o:     /usr/include/stdio.h
patterns.o:     ../../include/mac/Mac.h
patterns.o:     ../../include/mac/global.h
patterns.o:     ../../include/mac/bool.h
patterns.o:     ../../include/mac/MemMgr.h
patterns.o:     ../../include/mac/QuickDraw.h
patterns.o:     ../../include/mac/FontMgr.h
patterns.o:     ../../include/mac/LayerMgr.h
patterns.o:     ../../include/mac/WindowMgr.h
patterns.o:     ../../include/mac/ControlMgr.h
patterns.o:     ../../include/mac/EventMgr.h
patterns.o:     ../../include/mac/MenuMgr.h
patterns.o:     ../../include/mac/UtilMgr.h
patterns.o:     ../../include/mac/TextEdit.h
patterns.o:     ../../include/mac/RMgr.h
patterns.o:     ./mouse.h
patterns.o:     ./cursors.h
patterns.o:     ./patterns.h

maps.o:         maps.c
		$(CC) $(CFLAGS) -c maps.c
maps.o:         ./paint.h
maps.o:         /usr/include/termio.h
maps.o:         ../../include/sys/termio.h
maps.o:         /usr/include/stdio.h
maps.o:         ../../include/mac/Mac.h
maps.o:         ../../include/mac/global.h
maps.o:         ../../include/mac/bool.h
maps.o:         ../../include/mac/MemMgr.h
maps.o:         ../../include/mac/QuickDraw.h
maps.o:         ../../include/mac/FontMgr.h
maps.o:         ../../include/mac/LayerMgr.h
maps.o:         ../../include/mac/WindowMgr.h
maps.o:         ../../include/mac/ControlMgr.h
maps.o:         ../../include/mac/EventMgr.h
maps.o:         ../../include/mac/MenuMgr.h
maps.o:         ../../include/mac/UtilMgr.h
maps.o:         ../../include/mac/TextEdit.h
maps.o:         ../../include/mac/RMgr.h
maps.o:         ./mouse.h
maps.o:         ./cursors.h

in_out.o:       in_out.c
		$(CC) $(CFLAGS) -c in_out.c
in_out.o:       ./paint.h
in_out.o:       /usr/include/termio.h
in_out.o:       ../../include/sys/termio.h
in_out.o:       /usr/include/stdio.h
in_out.o:       ../../include/mac/Mac.h
in_out.o:       ../../include/mac/global.h
in_out.o:       ../../include/mac/bool.h
in_out.o:       ../../include/mac/MemMgr.h
in_out.o:       ../../include/mac/QuickDraw.h
in_out.o:       ../../include/mac/FontMgr.h
in_out.o:       ../../include/mac/LayerMgr.h
in_out.o:       ../../include/mac/WindowMgr.h
in_out.o:       ../../include/mac/ControlMgr.h
in_out.o:       ../../include/mac/EventMgr.h
in_out.o:       ../../include/mac/MenuMgr.h
in_out.o:       ../../include/mac/UtilMgr.h
in_out.o:       ../../include/mac/TextEdit.h
in_out.o:       ../../include/mac/RMgr.h
in_out.o:       ./mouse.h
in_out.o:       ./cursors.h

quit.o:         quit.c
		$(CC) $(CFLAGS) -c quit.c
quit.o:         ./paint.h
quit.o:         /usr/include/termio.h
quit.o:         ../../include/sys/termio.h
quit.o:         /usr/include/stdio.h
quit.o:         ../../include/mac/Mac.h
quit.o:         ../../include/mac/global.h
quit.o:         ../../include/mac/bool.h
quit.o:         ../../include/mac/MemMgr.h
quit.o:         ../../include/mac/QuickDraw.h
quit.o:         ../../include/mac/FontMgr.h
quit.o:         ../../include/mac/LayerMgr.h
quit.o:         ../../include/mac/WindowMgr.h
quit.o:         ../../include/mac/ControlMgr.h
quit.o:         ../../include/mac/EventMgr.h
quit.o:         ../../include/mac/MenuMgr.h
quit.o:         ../../include/mac/UtilMgr.h
quit.o:         ../../include/mac/TextEdit.h
quit.o:         ../../include/mac/RMgr.h
quit.o:         ./mouse.h
quit.o:         ./cursors.h

menus.o:        menus.c
		$(CC) $(CFLAGS) -c menus.c
menus.o:        ./paint.h
menus.o:        /usr/include/termio.h
menus.o:        ../../include/sys/termio.h
menus.o:        /usr/include/stdio.h
menus.o:        ../../include/mac/Mac.h
menus.o:        ../../include/mac/global.h
menus.o:        ../../include/mac/bool.h
menus.o:        ../../include/mac/MemMgr.h
menus.o:        ../../include/mac/QuickDraw.h
menus.o:        ../../include/mac/FontMgr.h
menus.o:        ../../include/mac/LayerMgr.h
menus.o:        ../../include/mac/WindowMgr.h
menus.o:        ../../include/mac/ControlMgr.h
menus.o:        ../../include/mac/EventMgr.h
menus.o:        ../../include/mac/MenuMgr.h
menus.o:        ../../include/mac/UtilMgr.h
menus.o:        ../../include/mac/TextEdit.h
menus.o:        ../../include/mac/RMgr.h
menus.o:        ./mouse.h
menus.o:        ./cursors.h

brushShape.o:   brushShape.c
		$(CC) $(CFLAGS) -c brushShape.c
brushShape.o:   ./paint.h
brushShape.o:   /usr/include/termio.h
brushShape.o:   ../../include/sys/termio.h
brushShape.o:   /usr/include/stdio.h
brushShape.o:   ../../include/mac/Mac.h
brushShape.o:   ../../include/mac/global.h
brushShape.o:   ../../include/mac/bool.h
brushShape.o:   ../../include/mac/MemMgr.h
brushShape.o:   ../../include/mac/QuickDraw.h
brushShape.o:   ../../include/mac/FontMgr.h
brushShape.o:   ../../include/mac/LayerMgr.h
brushShape.o:   ../../include/mac/WindowMgr.h
brushShape.o:   ../../include/mac/ControlMgr.h
brushShape.o:   ../../include/mac/EventMgr.h
brushShape.o:   ../../include/mac/MenuMgr.h
brushShape.o:   ../../include/mac/UtilMgr.h
brushShape.o:   ../../include/mac/TextEdit.h
brushShape.o:   ../../include/mac/RMgr.h
brushShape.o:   ./mouse.h
brushShape.o:   ./cursors.h
brushShape.o:   ./brushShape.h
brushShape.o:   ./shapeDefs.h

page.o:         page.c
		$(CC) $(CFLAGS) -c page.c

lines.o:        lines.c
		$(CC) $(CFLAGS) -c lines.c
lines.o:        ./paint.h
lines.o:        /usr/include/termio.h
lines.o:        ../../include/sys/termio.h
lines.o:        /usr/include/stdio.h
lines.o:        ../../include/mac/Mac.h
lines.o:        ../../include/mac/global.h
lines.o:        ../../include/mac/bool.h
lines.o:        ../../include/mac/MemMgr.h
lines.o:        ../../include/mac/QuickDraw.h
lines.o:        ../../include/mac/FontMgr.h
lines.o:        ../../include/mac/LayerMgr.h
lines.o:        ../../include/mac/WindowMgr.h
lines.o:        ../../include/mac/ControlMgr.h
lines.o:        ../../include/mac/EventMgr.h
lines.o:        ../../include/mac/MenuMgr.h
lines.o:        ../../include/mac/UtilMgr.h
lines.o:        ../../include/mac/TextEdit.h
lines.o:        ../../include/mac/RMgr.h
lines.o:        ./mouse.h
lines.o:        ./cursors.h

fat.o:          fat.c
		$(CC) $(CFLAGS) -c fat.c
fat.o:          ./paint.h
fat.o:          /usr/include/termio.h
fat.o:          ../../include/sys/termio.h
fat.o:          /usr/include/stdio.h
fat.o:          ../../include/mac/Mac.h
fat.o:          ../../include/mac/global.h
fat.o:          ../../include/mac/bool.h
fat.o:          ../../include/mac/MemMgr.h
fat.o:          ../../include/mac/QuickDraw.h
fat.o:          ../../include/mac/FontMgr.h
fat.o:          ../../include/mac/LayerMgr.h
fat.o:          ../../include/mac/WindowMgr.h
fat.o:          ../../include/mac/ControlMgr.h
fat.o:          ../../include/mac/EventMgr.h
fat.o:          ../../include/mac/MenuMgr.h
fat.o:          ../../include/mac/UtilMgr.h
fat.o:          ../../include/mac/TextEdit.h
fat.o:          ../../include/mac/RMgr.h
fat.o:          ./mouse.h
fat.o:          ./cursors.h

erase.o:        erase.c
		$(CC) $(CFLAGS) -c erase.c
erase.o:        ./paint.h
erase.o:        /usr/include/termio.h
erase.o:        ../../include/sys/termio.h
erase.o:        /usr/include/stdio.h
erase.o:        ../../include/mac/Mac.h
erase.o:        ../../include/mac/global.h
erase.o:        ../../include/mac/bool.h
erase.o:        ../../include/mac/MemMgr.h
erase.o:        ../../include/mac/QuickDraw.h
erase.o:        ../../include/mac/FontMgr.h
erase.o:        ../../include/mac/LayerMgr.h
erase.o:        ../../include/mac/WindowMgr.h
erase.o:        ../../include/mac/ControlMgr.h
erase.o:        ../../include/mac/EventMgr.h
erase.o:        ../../include/mac/MenuMgr.h
erase.o:        ../../include/mac/UtilMgr.h
erase.o:        ../../include/mac/TextEdit.h
erase.o:        ../../include/mac/RMgr.h
erase.o:        ./mouse.h
erase.o:        ./cursors.h
erase.o:        ./erase.h

bucket.o:       bucket.c
		$(CC) $(CFLAGS) -c bucket.c
bucket.o:       ./paint.h
bucket.o:       /usr/include/termio.h
bucket.o:       ../../include/sys/termio.h
bucket.o:       /usr/include/stdio.h
bucket.o:       ../../include/mac/Mac.h
bucket.o:       ../../include/mac/global.h
bucket.o:       ../../include/mac/bool.h
bucket.o:       ../../include/mac/MemMgr.h
bucket.o:       ../../include/mac/QuickDraw.h
bucket.o:       ../../include/mac/FontMgr.h
bucket.o:       ../../include/mac/LayerMgr.h
bucket.o:       ../../include/mac/WindowMgr.h
bucket.o:       ../../include/mac/ControlMgr.h
bucket.o:       ../../include/mac/EventMgr.h
bucket.o:       ../../include/mac/MenuMgr.h
bucket.o:       ../../include/mac/UtilMgr.h
bucket.o:       ../../include/mac/TextEdit.h
bucket.o:       ../../include/mac/RMgr.h
bucket.o:       ./mouse.h
bucket.o:       ./cursors.h

brush.o:        brush.c
		$(CC) $(CFLAGS) -c brush.c
brush.o:        ./paint.h
brush.o:        /usr/include/termio.h
brush.o:        ../../include/sys/termio.h
brush.o:        /usr/include/stdio.h
brush.o:        ../../include/mac/Mac.h
brush.o:        ../../include/mac/global.h
brush.o:        ../../include/mac/bool.h
brush.o:        ../../include/mac/MemMgr.h
brush.o:        ../../include/mac/QuickDraw.h
brush.o:        ../../include/mac/FontMgr.h
brush.o:        ../../include/mac/LayerMgr.h
brush.o:        ../../include/mac/WindowMgr.h
brush.o:        ../../include/mac/ControlMgr.h
brush.o:        ../../include/mac/EventMgr.h
brush.o:        ../../include/mac/MenuMgr.h
brush.o:        ../../include/mac/UtilMgr.h
brush.o:        ../../include/mac/TextEdit.h
brush.o:        ../../include/mac/RMgr.h
brush.o:        ./mouse.h
brush.o:        ./cursors.h
brush.o:        ./brushes.h
brush.o:        ./brushShape.h

text.o:         text.c
		$(CC) $(CFLAGS) -c text.c
text.o:         ./paint.h
text.o:         /usr/include/termio.h
text.o:         ../../include/sys/termio.h
text.o:         /usr/include/stdio.h
text.o:         ../../include/mac/Mac.h
text.o:         ../../include/mac/global.h
text.o:         ../../include/mac/bool.h
text.o:         ../../include/mac/MemMgr.h
text.o:         ../../include/mac/QuickDraw.h
text.o:         ../../include/mac/FontMgr.h
text.o:         ../../include/mac/LayerMgr.h
text.o:         ../../include/mac/WindowMgr.h
text.o:         ../../include/mac/ControlMgr.h
text.o:         ../../include/mac/EventMgr.h
text.o:         ../../include/mac/MenuMgr.h
text.o:         ../../include/mac/UtilMgr.h
text.o:         ../../include/mac/TextEdit.h
text.o:         ../../include/mac/RMgr.h
text.o:         ./mouse.h
text.o:         ./cursors.h

pencil.o:       pencil.c
		$(CC) $(CFLAGS) -c pencil.c
pencil.o:       ./paint.h
pencil.o:       /usr/include/termio.h
pencil.o:       ../../include/sys/termio.h
pencil.o:       /usr/include/stdio.h
pencil.o:       ../../include/mac/Mac.h
pencil.o:       ../../include/mac/global.h
pencil.o:       ../../include/mac/bool.h
pencil.o:       ../../include/mac/MemMgr.h
pencil.o:       ../../include/mac/QuickDraw.h
pencil.o:       ../../include/mac/FontMgr.h
pencil.o:       ../../include/mac/LayerMgr.h
pencil.o:       ../../include/mac/WindowMgr.h
pencil.o:       ../../include/mac/ControlMgr.h
pencil.o:       ../../include/mac/EventMgr.h
pencil.o:       ../../include/mac/MenuMgr.h
pencil.o:       ../../include/mac/UtilMgr.h
pencil.o:       ../../include/mac/TextEdit.h
pencil.o:       ../../include/mac/RMgr.h
pencil.o:       ./mouse.h
pencil.o:       ./cursors.h
pencil.o:       ./pencil.h

ovrect.o:       ovrect.c
		$(CC) $(CFLAGS) -c ovrect.c
ovrect.o:       ./paint.h
ovrect.o:       /usr/include/termio.h
ovrect.o:       ../../include/sys/termio.h
ovrect.o:       /usr/include/stdio.h
ovrect.o:       ../../include/mac/Mac.h
ovrect.o:       ../../include/mac/global.h
ovrect.o:       ../../include/mac/bool.h
ovrect.o:       ../../include/mac/MemMgr.h
ovrect.o:       ../../include/mac/QuickDraw.h
ovrect.o:       ../../include/mac/FontMgr.h
ovrect.o:       ../../include/mac/LayerMgr.h
ovrect.o:       ../../include/mac/WindowMgr.h
ovrect.o:       ../../include/mac/ControlMgr.h
ovrect.o:       ../../include/mac/EventMgr.h
ovrect.o:       ../../include/mac/MenuMgr.h
ovrect.o:       ../../include/mac/UtilMgr.h
ovrect.o:       ../../include/mac/TextEdit.h
ovrect.o:       ../../include/mac/RMgr.h
ovrect.o:       ./mouse.h
ovrect.o:       ./cursors.h
ovrect.o:       ./ovrect.h

scroll.o:       scroll.c
		$(CC) $(CFLAGS) -c scroll.c

mouse.o:        mouse.c
		$(CC) $(CFLAGS) -c mouse.c
mouse.o:        /usr/include/stdio.h
mouse.o:        /usr/include/termio.h
mouse.o:        ../../include/sys/termio.h
mouse.o:        ../../include/mac/Mac.h
mouse.o:        ../../include/mac/global.h
mouse.o:        ../../include/mac/bool.h
mouse.o:        ../../include/mac/MemMgr.h
mouse.o:        ../../include/mac/QuickDraw.h
mouse.o:        ../../include/mac/FontMgr.h
mouse.o:        ../../include/mac/LayerMgr.h
mouse.o:        ../../include/mac/WindowMgr.h
mouse.o:        ../../include/mac/ControlMgr.h
mouse.o:        ../../include/mac/EventMgr.h
mouse.o:        ../../include/mac/MenuMgr.h
mouse.o:        ../../include/mac/UtilMgr.h
mouse.o:        ../../include/mac/TextEdit.h
mouse.o:        ../../include/mac/RMgr.h
mouse.o:        ./cursors.h

ut.o:           ut.c
		$(CC) $(CFLAGS) -c ut.c
ut.o:           ../../include/mac/Mac.h
ut.o:           ../../include/mac/global.h
ut.o:           ../../include/mac/bool.h
ut.o:           ../../include/mac/MemMgr.h
ut.o:           ../../include/mac/QuickDraw.h
ut.o:           ../../include/mac/FontMgr.h
ut.o:           ../../include/mac/LayerMgr.h
ut.o:           ../../include/mac/WindowMgr.h
ut.o:           ../../include/mac/ControlMgr.h
ut.o:           ../../include/mac/EventMgr.h
ut.o:           ../../include/mac/MenuMgr.h
ut.o:           ../../include/mac/UtilMgr.h
ut.o:           ../../include/mac/TextEdit.h
ut.o:           ../../include/mac/RMgr.h
ut.o:           ./mouse.h
ut.o:           ./cursors.h

paint:          paint.o $(LIBS)
		$(CC) $(CFLAGS) -o paint paint.o $(ARGS) $(LIBS)
paint.o:        paint.c
		$(CC) $(CFLAGS) -c paint.c
paint.o:        ./paint.h
paint.o:        /usr/include/termio.h
paint.o:        ../../include/sys/termio.h
paint.o:        /usr/include/stdio.h
paint.o:        ../../include/mac/Mac.h
paint.o:        ../../include/mac/global.h
paint.o:        ../../include/mac/bool.h
paint.o:        ../../include/mac/MemMgr.h
paint.o:        ../../include/mac/QuickDraw.h
paint.o:        ../../include/mac/FontMgr.h
paint.o:        ../../include/mac/LayerMgr.h
paint.o:        ../../include/mac/WindowMgr.h
paint.o:        ../../include/mac/ControlMgr.h
paint.o:        ../../include/mac/EventMgr.h
paint.o:        ../../include/mac/MenuMgr.h
paint.o:        ../../include/mac/UtilMgr.h
paint.o:        ../../include/mac/TextEdit.h
paint.o:        ../../include/mac/RMgr.h
paint.o:        ./mouse.h
paint.o:        ./cursors.h
