# all these things will need to point to the
# proper places
TREE=	/usr5/postgres
OD=	/usr5/postgres/lib
SD=	/usr5/postgres/src
ID=	/usr5/postgres/include
TKDIR=	/usr/local/tk3.6
TCLDIR=	/usr/local/tcl7.3
TKLIBS=	/usr/local/lib
XLIB=	/usr/lib/libX11.a
# The following is defined only if you have the libzlib.a Z39.50 client
#ZLIB=  /usr/users/larson/SRC/Z39.50/z3950.client/libzlib.a
ZLIB=
# Linker switch(es) to use to link with the X11 library archive (the
# configure script will try to set this value automatically, but you
# can override it).
X11_LIB_SWITCHES =	-lX11

# Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
# and the math library (in that order).  The "" part will be
# replaced (or has already been replaced) with relevant libraries as
# determined by the configure script.
LIBS= $(TKLIBS)/libtk.a $(TKLIBS)/libtcl.a $(X11_LIB_SWITCHES)  -lm
PORTNAME=	ultrix4

PORTDIR=	port/ultrix4
PORTLDFLAGS=-N
GCFLAGS=-G 0
LDFLAGS=	$(GCFLAGS)
CFLAGS=		$(GCFLAGS) \
		-I$(SD)/backend \
		-I$(TKDIR) \
		-I$(TCLDIR) \
		-g
DIRS=		./dirs.mk
DEMOCCOPTS=	$(CFLAGS)
#
# Makefile for making the object files to be loaded
# into the demo.  
#
.SUFFIXES: .o .c .temp .pq

all: pgtkm

#
DEFINES=-DNO_EXP10 -DNO_RINT -DNO_INF -DNO_ALLOCA

MODS=pgtkMain.o loadcmds.o libpqfunc.o mapfunc.o cursors.o invfunc.o pgsource.o pgquery.o zquery.o

# ----------------
#  PGTK 
# ----------------
pgtkm: $(MODS) $(ZLIB)
	@ echo "linking PGTKM"
	@ $(CC) $(CFLAGS) -o pgtkm \
		$(MODS) $(LIBS) $(ZLIB) $(OD)/libpq.a


clean: 
	rm -f *.o *.pq

.c.o:
	cc  $(DEMOCCOPTS) $(DEFINES) -c $(<F)



#
# DEPENDENCIES (generated, do not modify by hand)
# 
