# This file contains commands to generate a shared object or DLL
# for a natively compiled PL/SQL unit. 
# This file can have multiple commands. 
# Each command should be specified in a single line by itself terminated by
# a newline.
# Lines starting with a # character are comments which are ignored.
# Each command is executed by creating (forking) a process and
# giving the command to the process to be executed directly.
# That means no other program (such as a shell or make) is used
# to interpret these commands.
# The command(s) use the following symbolic names as placeholders
# which will be replaced by actual names before executing the command(s).
#
# 	%(src) -  refers to the name of the generated C source file.
# 	%(obj) -  refers to the name of the generated object file.
# 	%(so)  -  refers to the name of the generated shared object file.

# The variable $(ORACLE_HOME) will be replaced by its actual value
# before executing the command(s).

# NOTE:  The recommended optimization level for the C compiler is
#	 -O1. The generated C code is such that any optimization level
#	 above -O1 results in significantly longer C compilation times
#	 without any tangible incremental benefit in runtime performance.

# NOTE : The following 2 commands are for the gcc compiler. If you wish to 
#        use Intel's Proton compiler, please comment out the below 2 lines
#        and uncomment the line corresponding to the Proton compiler lower
#        down in this file.
#
/usr/bin/gcc -B/usr/bin/ %(src) -c -O1 -fPIC -I$(ORACLE_HOME)/plsql/include -I$(ORACLE_HOME)/rdbms/public -o %(obj) 
/usr/bin/ld -s -shared %(obj) -o %(so)

# NOTE : The following command is for Intel's Proton compiler. If you wish to 
#        use the gcc compiler, please comment out the below line and 
#        uncomment the lines corresponding to the gcc compiler above
#
#/opt/intel/compiler70/ia32/bin/icc -Qlocation,as,/usr/bin/ -Qlocation,ld,/usr/bin/ %(src) -O1 -fPIC -fp -mp1 -fp_port -I$(ORACLE_HOME)/plsql/include -I$(ORACLE_HOME)/rdbms/public -Wl,-s -shared -o %(so)
