# 
#		%Z% %M% %I% %D% %T%
#
#

LIB = ../curlib01
SRC	= .
OBJ	= .
INCLUDE	= .

LOAD = /home/cms/exe/ase

CC	= gcc

CPP	= g++

# for Debug
#CFLAGS	= -ggdb

CFLAGS	= -O3

CPPFLAGS	= -O3 -LANG=UTF-8 -Wno-deprecated

LDEXE	= .

LINTFLAGS = -x $(INC_OPT) $(CDEFS)


sample : sample.c ../../libsubform/libsubform.a
	$(CC) sample.c ../../libsubform/libsubform.a -I../../libsubform -o sample -lncursesw

ega_sample : ega_sample.o
	$(CC) ega_sample.c -o ega_sample ../../libsubform/libsubform.a -lncurses


apsch2: apsch2.pgc ../../libsubform/libsubform.a
	ecpg apsch2.pgc
	gcc -g -I../../libsubform -I/usr/include/postgresql -c apsch2.c
	gcc -O -o apsch2 apsch2.o ../../libsubform/libsubform.a -lncurses -L/usr/lib/postgresql/lib -lecpg

apsch: apsch.pgc ../libsubform/libsubform.a
	ecpg apsch.pgc
	gcc -g -I../../libsubform -I/usr/local/pgsql/include -c apsch.c
	gcc -O -o apsch apsch.o ../../libsubform/libsubform.a -lncurses -L/usr/local/pgsql/lib -lecpg

schtbl: schtbl.pgc ../../libsubform/libsubform.a
	/usr/local/pgsql/bin/ecpg -DDEBUG schtbl.pgc
	gcc -g -I../../libsubform -I/usr/local/pgsql/include -c schtbl.c
	gcc -O -o schtbl schtbl.o ../../libsubform/libsubform.a -lncurses -L/usr/local/pgsql/lib -lecpg -lpq

schdytbl: schdytbl.pgc ../../libsubform/libsubform.a
	ecpg schdytbl.pgc
	gcc -g -I../libsubform -I/usr/local/pgsql/include -c schdytbl.c
	gcc -O -o schdytbl schdytbl.o ../../libsubform/libsubform.a -lncurses -L/usr/local/pgsql/lib -lecpg

yubin: yubin.pgc ../../libsubform/libsubform.a
	ecpg yubin.pgc
	gcc -g -I../../libsubform -I/usr/local/pgsql/include -c yubin.c
	gcc -O -o yubin yubin.o ../../libsubform/libsubform.a -lncursesw -L/usr/local/pgsql/lib -lecpg

