标签:
编译pro*c 的makefile例子
原来只需在makefile中追加include $(ORACLE_HOME)/precomp/lib/env_precomp.mk,其他一切按照makefile的书写规则即可,CODE也是需要指定的,尤其Oracle缺省并不是ansi_c
以下是sample:
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
LIBDIR=lib32
CC = /opt/SUNWspro/bin/cc
CFLAGS= -c -g
OCFLAGS= code=ansi_c line=yes sqlcheck=semantics
TARGET= test
OBJS= test.o
.SUFFIXES: .pc .c .o
$(TARGET): $(OBJS)
$(CC) -o $@ $(OBJS) -L$(LIBHOME) $(PROLDLIBS)
.pc.c:
$(PROC) $(ORADEF) $(PROCFLAGS) iname=$*
.pc.o:
$(PROC) $(ORADEF) $(PROCFLAGS) iname=$* $(ORADEF)
$(CC) $(CFLAGS) $*.c
.c.o:
$(CC) $(CFLAGS) $*.c
clean :
$(RM) -f $(TARGET) $(OBJS) $(TARGET:%=%.c)
———————————————————————————————————————————————————————————————————————————————
标签:
原文地址:http://www.cnblogs.com/nosadness/p/5136630.html