# your favorite C compiler
CC =		gcc

LIBS =		-lX11
# location of X11 include and library
XLIBS =		-L/bnr/bootleg/X11R5/lib
XINCS =		-I/bnr/bootleg/X11R5/include

# your favorite C compiler flags
CCFLAGS =		-g 
LDFLAGS =		-g

# location of TCL include and library
TCL_DIR =		/bnr/bootleg/bin/tcl/tcl7.0
TCL_LIB =		$(TCL_DIR)/libtcl.a

# location of TK include and library
TK_DIR =		/bnr/bootleg/bin/tcl/tk3.3
TK_LIB =		$(TK_DIR)/libtk.a

# location of gdbm library (libgdbm.a)
GDBM_DIR =	/bnr/bootleg/bin/tcl/gdbm-1.7.1
GDBM_LIB =	$(GDBM_DIR)/libgdbm.a

CPPFLAGS =	-I$(TK_DIR) -I$(TCL_DIR) -I$(GDBM_DIR) $(XINCS)

CFLAGS =		$(CPPFLAGS) $(CCFLAGS) $(DEFS)

SRCS = 		tcl_gdbm.c

gwish: 		tkAppInit.o tcl_gdbm.o
		$(CC) $(LDFLAGS) -o gwish tkAppInit.o tcl_gdbm.o $(TK_LIB) $(TCL_LIB) $(XLIBS) $(LIBS) -lm $(GDBM_LIB)

tcl_gdbm.o:	tcl_gdbm.c
		$(CC) $(CPPFLAGS) $(CCFLAGS) $(DEFS) -c tcl_gdbm.c

clean:
		rm -f *.o core junk* gwish
