본문 바로가기

ProC

[ORACLE] pro*c makefile 만들기

pc 파일을 c로 바꿀 때 어떤 파일이 요구된다면, include $(....)으로 선언해 준다.

-------------------------------------------------------------------------

# Server Pro*C makefile

include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
ORALIBDIR = $(LIBHOME)
ORALIB = $(PROLDLIBS)

TARGET= proc_sample
APOBJS= $(TARGET).o

OBJS = $(APOBJS)

CFLAGS = -O -g -D_DBG

#
.SUFFIXES : .c

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

#
# server compile
#
all: $(TARGET)

$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $(TARGET) -L$(ORALIBDIR) $(ORALIB) $(OBJS)
rm -f $(OBJS)

$(APOBJS): $(TARGET).pc
proc iname=$(TARGET) #include=$(INCDIR)
$(CC) $(CFLAGS) -c $(TARGET).c

#
clean:
-rm -f *.o core $(APPDIR)/$(TARGET) $(TARGET).lis
----------------------------------------------------------------------

참고

proc컴파일시
proc iname=sample1.pc include=$ORACLE_HOME/ product/7.3.3/precomp/public


cc컴파일시
cc -o sample1 sample1.c -I/$ORACLE_HOME/ product/7.3.3/precomp/public