#% % % % % % % % % % % % % % % % %
#%%%%%%% Imakefile for xpg %%%%%%%
#% % % % % % % % % % % % % % % % %


#%%%% directories %%%%
PERMISSIONS_FILE = ./xpg.permission-rules
ONLINE_HELP_DIR  = ./Help
PGDIR            = /usr/local/postgres

#----- DO NOT EDIT BELOW THIS LINE, UNLESS YOU KNOW WHAT YOU'RE DOING -----

PGLIBDIR = $(PGDIR)/lib
INCLUDES = -I$(INCROOT) -I$(PGDIR)/include -I$(PGDIR)/include/utils
DEFINES = -DPERMISSIONS_FILE=\"$(PERMISSIONS_FILE)\" -DONLINE_HELP_DIR=\"$(ONLINE_HELP_DIR)\"

#%%%% compiler %%%%
CC = cc
CDEBUGFLAGS = -g
DEFINES += -DNO_MEM_DEBUG -DNO_XPG_DEBUG -D_NO_PROTO

#%%%% libraries %%%%
XMLIB = -lXm
LOCAL_LIBRARIES = $(XMLIB) $(XTOOLLIB) $(XLIB) $(XAWLIB) $(XMULIB) -lm \
		  -L$(PGLIBDIR) -lpq $(DBMALLOCLIB)
#DBMALLOCLIB = -L/CS/system/ranen/Src/Lib/Malloc -ldbmalloc


#%%%% dependencies %%%%
DEPLIBS = $(DEPMOTIFLIB) $(DEPXTOOLLIB) $(DEPXLIB)


#%%%% source files %%%%
SRCS =	xpg.c \
	lib.c \
	wprintf.c \
	search_list.c \
	class_ops.c \
	script.c \
	array.c \
	large_obj.c \
	math_ops.c \
	date.c \
	print.c \
	permissions.c \
	help.c \
	exec.c \
	exec_dialog.c


#%%%% object files %%%%
OBJS =	xpg.o \
	lib.o \
	wprintf.o \
	search_list.o \
	class_ops.o \
	script.o \
	array.o \
	large_obj.o \
	math_ops.o \
	date.o \
	print.o \
	permissions.o \
	help.o \
	exec.o \
	exec_dialog.o


#%%%% program %%%%
PROG = xpg


#%%%% building rules %%%%

all::
	@echo ""
	@echo "******************"
	@echo "**  Making xpg  **"
	@echo "******************"
	@echo ""

world World:
	@echo ""
	@echo "********************"
	@echo "**  Building xpg  **"
	@echo "********************"
	@echo ""
	$(MAKE) depend
	$(MAKE) clean
	$(MAKE)


AllTarget($(PROG) $(DEV))
NormalProgramTarget($(PROG),$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES), /**/)
DependTarget()
NormalProgramTarget($(DEV),$(DEVOBJS),$(DEPLIBS),$(LOCAL_LIBRARIES), /**/)

