RTFM
rtfm / SQL / Oracle Timestamps / src/Makefile
.etla.org
# Makefile to drive compilation/installation of native C Oracle PL/SQL funcs
# Copyright (C) 2001 Vivek Dasmohapatra <vivek@etla.org>

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

CCDLFLAGS = -fpic -DPIC
IFLAGS = -I ${ORACLE_HOME}/rdbms/demo -I ${ORACLE_HOME}/rdbms/public -I ${ORACLE_HOME}/network/public -I ${ORACLE_HOME}/plsql/public
LFLAGS = -L ${ORACLE_HOME}/lib -lpls8
INSTDIR=/usr/local/lib/ora_extproc

all: liborautl.so

liborautl.so: ora_time.o ora_strcasecmp.o ora_url.o
	$(CC) -shared $(LDFLAGS) -o $@ $^

%.o: %.c
	$(CC) $(IFLAGS) $(CCDLFLAGS) -o $@ -c $<

install: liborautl.so
	for lib in $^;                                              \
	do                                                          \
	    OWD=`pwd`;                                              \
	    SEQUENCE=0000;                                          \
	    TARGET=`echo $$lib | sed 's/.so$$//g'`;                 \
	    echo $$TARGET.so;                                       \
	    cd ${INSTDIR};                                          \
	    for target in `ls -1 $${TARGET}_*.so | sort`;           \
	    do                                                      \
	        rm -f $$target;                                     \
	    done;                                                   \
	    cd $${OWD};                                             \
	    cp $$TARGET.so ${INSTDIR}/$${TARGET}_`date +%s`.so;     \
	    ./reload_library ${INSTDIR}/$$lib;                      \
	done;

clean:
	rm -f *.{o,so}


Valid HTML 4.01! Valid CSS! Any Browser Debian Pepperfish