# Sccsid %Z% %M% %I% %G%
# Make the DB-Library sample programs.
# 
#
# Change the following definitions as appropriate for your site:
# SYBASE    = /usr/u/sybase
INCDIR    = $(SYBASE)/include
LIBDIR    = $(SYBASE)/lib
HEADERS   = $(INCDIR)/sybfront.h  \
	    $(INCDIR)/sybdb.h
DBLIBS = $(LIBDIR)/libsybdb.a 
# If building for SGI 64-bit platform, comment out the above line and
# uncomment the line below.
#DBLIBS = $(LIBDIR)/libsybdb64.a 

# Uncomment the next defintion and comment the previous defintion if 
# building on Digital Unix. Further change -ldnet_stub to -ldnet if DECNet 
# is installed.
#DBLIBS = $(LIBDIR)/libsybdb.a  -ldnet_stub

# If building in a DCE environment for SGI, uncomment the appropriate 
# definition below and comment out the current definition.  [Not supported]
#DBLIBS = $(LIBDIR)/libsybdb_r.a  -Bdynamic -ldce
#DBLIBS = $(LIBDIR)/libsybdb_r64.a  -Bdynamic -ldce

# If building for SGI add compile option for 32 bit (n32) or 64 bit (64).
#CFLAGS = -n32 -mips3
#CFLAGS = -64 -mips3
INCLUDE   = -I. -I$(INCDIR)
DSYS      = BSD42
DVERSION  =

all: example1 example2 example3 example4 example5 example6 example7 \
     example8 example9 example10 example11 example12 bulkcopy twophase

example1: $(HEADERS) example1.c
	cc $(CFLAGS) $(INCLUDE) example1.c $(DBLIBS) -lm -o example1

example2: $(HEADERS) example2.c
	cc $(CFLAGS) $(INCLUDE) example2.c $(DBLIBS) -lm -o example2

example3: $(HEADERS) example3.c
	cc $(CFLAGS) $(INCLUDE) example3.c $(DBLIBS) -lm -o example3

example4: $(HEADERS) example4.c
	cc $(CFLAGS) $(INCLUDE) example4.c $(DBLIBS) -lm -o example4

example5: $(HEADERS) example5.c
	cc $(CFLAGS) $(INCLUDE) example5.c $(DBLIBS) -lm -o example5

example6: $(HEADERS) example6.c
	cc $(CFLAGS) $(INCLUDE) example6.c $(DBLIBS) -lm -o example6

example7: $(HEADERS) example7.c
	cc $(CFLAGS) $(INCLUDE) example7.c $(DBLIBS) -lm -o example7

example8: $(HEADERS) example8.c
	cc $(CFLAGS) $(INCLUDE) example8.c $(DBLIBS) -lm -o example8

example9:  $(HEADERS) example9.c
	cc $(CFLAGS) $(INCLUDE) example9.c $(DBLIBS) -lm -o example9 

example10:  example10.c
	cc $(CFLAGS) $(INCLUDE) example10.c $(DBLIBS) -lm -o example10 

example11:  example11.c
	cc $(CFLAGS) $(INCLUDE) example11.c $(DBLIBS) -lm -o example11 

example12:  example12.c
	cc $(CFLAGS) $(INCLUDE) example12.c $(DBLIBS) -lm -o example12 

bulkcopy:  bulkcopy.c
	cc $(CFLAGS) $(INCLUDE) bulkcopy.c $(DBLIBS) -lm -o bulkcopy 

twophase:  twophase.c
	cc $(CFLAGS) $(INCLUDE) twophase.c $(DBLIBS) -lm -o twophase 

clean:
	- rm -f example1 example2 example3 example4 example5 example6
	- rm -f example7 example8 example9 example10 example11 example12 
	- rm -f bulkcopy twophase
