# Copyright (c) 2007-2023 Vincent ROGIER <vince.rogier@ocilib.net>
#  
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without 
# modifications, as long as this notice is preserved.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

INCS =  -I/usr/local/include
CFLAGS = -DOCI_IMPORT_LINKAGE -DOCI_CHARSET_ANSI
LDFLAGS= -L/opt/oracle/instantclient_21_7 -lclntsh  -L/usr/local/lib -locilib
CC = gcc
SRCS = ocilib_demo.c
OBJS = $(SRCS:.c=.o)

all: ocilib_demo

ocilib_demo: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LDFLAGS)

.c.o:
	$(CC) $(INCS) $(CFLAGS) -c -o $@ $<

clean: 
	rm -f *~ $(OBJS)
