본문 바로가기

ProC

Make file for Pro*c

TARGET = ptest
DEST = .
INCL = .

#Oracle
ORA_HOME = /home/oracle/product/8.1.7
ORA_LIB = -L$(ORACLE_HOME)/lib -lclntsh
ORA_OPT = SQLCHECK=SEMANTIC PARSE=PARTIAL RELEASE_CURSOR=YES USERID=scott/tiger@ORCL
ORA_GARBAGE = *.dcl *.cod *.cud *.lis

#Suffix
.SUFFIXES: .pc .c
.pc.c:
proc $* $(ORA_OPT)
.c:
gcc -o $* $*.c $(ORA_LIB)

#-----------------------
all: $(TARGET)
rm $(ORA_GARBAGE) -f

ptest: ptest.c
ptest.c: ptest.pc

#-----------------------
cp:
cp $(TARGET) $(DEST)

clean:
rm $(TARGET) $(ORA_GARBAGE) *.c *.o -f