proc aix 10g make gcc

From: __japh__ <lee_spam_this_at_yahoo.com>
Date: 26 Feb 2006 06:13:19 -0800
Message-ID: <1140963199.897029.141370_at_j33g2000cwa.googlegroups.com>



Using information from several posts, especially one from Tom Kyte, I was able to cobble together a Makefile that works on aix for Oracle 10g with gcc. One of the tricks is that you must use 64 bit. Well, the documentation implies that you can do either 32 or 64, but I didn't dive deep enough to figure out how to set things up for 32 bit. I don't know that _LARGE_FILES is necessary, but it allows creating files over 2GB, which is a requirement for me.

I've forgotten more about "make" than I care to rediscover. I know this can be made a lot cleaner. I was just happy to get it to work.

Enjoy.

$ cat Makefile
TARGET=flatten
SOURCE=flatten.c
PCSOURCE=flatten.pc
ORACLE_PROC_MAKEFILE=$(ORACLE_HOME)/precomp/lib/env_precomp.mk

include $(ORACLE_PROC_MAKEFILE)
CC=gcc
CC_ENV_FLAGS=-O -ggdb
PROC_ENV_FLAGS=
CFLAGS=-D_LARGE_FILES -I. -g $(CC_ENV_FLAGS) -mpowerpc -maix64

PROCFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \

                      include=$(ORACLE_HOME)/proc/lib
PROFLAGS=$(PROCFLAGS)
$(SOURCE): $(PCSOURCE)

        proc $(PROCFLAGS) oname=$(*).c $(*).pc

$(TARGET): $(SOURCE) $(SOURCE:.pc=.c) $(SOURCE:.pc=.o)

            $(CC) $(CFLAGS) $(LDFLAGS)  -o $(TARGET) \
                    $(SOURCE:.pc=.o) -L$(ORACLE_HOME)/lib $(PROLDLIBS)
Received on Sun Feb 26 2006 - 15:13:19 CET

Original text of this message