#
# Makefile for XfSQL
#

# Note: you will need the XForms library to get things compiled 
# and of course the mSQL distribution installed. You can
# obtain the XFORMS library at one of the Linux ftp sites (sunsite.unc.edu,
# tsx-11.mit.edu) or at the primary sites: bloch.phys.uwm.edu:/pub/xforms
# and ftp.cs.ruu.nl:/pub/XFORMS.

# If you have installed XForms as the Makefile of the package does, you won't
# have any problems compiling all. Otherwise, set XFLIBDIR to "-L..." (the
# directory where the library lives) and XFLIBINC to "-I..." (the directory
# where the include file forms.h lives).
# XFLIBDIR = -L/usr/local/lib
# XFINCDIR = -I/usr/local/inc

# default (STDLFLAGS) that you may want to
# change to -shared if you have the appropriate libs.

PROG = 	xfsql

# Compilation Details

CC = gcc
STDCFLAGS = -c -O2 -Wall $(XFINCDIR)
STDLFLAGS = 
MSQLINC = -I/usr/local/Minerva/include
MSQLLOAD = -L/usr/local/Minerva/lib -lmsql

# Inc and Load for Solaris
#XINC = -I/usr/openwin/include
#XLOAD = -R/usr/openwin/lib -L/usr/openwin/lib -lX11 -lsocket -lnsl


# Inc and load for Linux
XINC = -I/usr/X11R6/include
XLOAD = -L/usr/X11R6/lib  -lX11


# objects needed for the program
OBJS =  xfsql.o \
	xfsql_main.o \
	xfsql_cb.o \
	xfsql_sub.o \
	gui_sql.o \
	gui_sql_cb.o \
	file.o \
	create.o \
	create_cb.o \
	input_form.o \
	input_form_cb.o \
	qrd_window.o \
	qrd_window_cb.o
 
${PROG}: $(OBJS)
	$(CC) -o xfsql $(OBJS) $(MSQLINC) \
	$(XINC) $(STDLFLAGS) $(MSQLLOAD) \
	$(XLOAD) $(XFLIBDIR) -lforms -lXpm -lm 

.c.o:
	$(CC) $*.c $(STDCFLAGS) $(MSQLINC) $(XINC)

clean:
	rm -f xfsql $(OBJS) 

