########################################################################
#
# FILE:		Makefile
# PURPOSE:	This makefile will compile the mazewish executable for
#		use by the tcl scripts *.tcl.
#
# AUTHOR:	John F. Sefler
#
########################################################################

### README and EDIT
# Where are tcl.h and tk.h include files?  (for versions 7.3 and 3.6)
    INCLUDES = \
      -I/usr/local/tcl7.3/include \
      -I/usr/local/tk3.6/include

### README and EDIT
# Where are libtcl.a, libtk.a, and libX11.a libraries?
    LIBDIRS = \
      -L/usr/local/lib


### README and EDIT
# Choose your local C compiler and uncomment flags for ANSI C.
    CC = cc

# HP 700 series
#   ANSI_CFLAGS = -Aa
# SGI Indigo 2
#   ANSI_CFLAGS =
# DEC Alpha
#   ANSI_CFLAGS =
# DEC 5000
#   ANSI_CFLAGS =
# IBM RISC 6000
#   ANSI_CFLAGS = -qlanglvl=ansi

####  Stop!  No need to edit below. ####################################



        PROGRAM = mazewish

       CHEADERS = commands.h

       CSOURCES = maze.c tkMazeInit.c
   
       COBJECTS = $(CSOURCES:.c=.o)

           LIBS = $(LIBDIRS) -ltk -ltcl -lX11 -lm

       CPPFLAGS = $(INCLUDES) $(DEFINES)

             RM = /bin/rm -f

        LDFLAGS = -o $(PROGRAM) $(DEFINES) $(COBJECTS) $(LIBS)

         CFLAGS = $(ANSI_CFLAGS) $(INCLUDES)

         LINK.c = $(CC) $(CFLAGS) $(LDFLAGS)


# keeps all the hidden dependencies
.KEEP_STATE:


# MAKE TARGETS
$(PROGRAM): $(COBJECTS)
	$(LINK.c)

clean:
	$(RM) $(COBJECTS) core

tidy:
	$(RM) $(PROGRAM) $(COBJECTS) core
