# cus_names.mk - "make" command file to reload  
# names client executables
#
# 
# NOTE:         ORACLE_HOME must be either:
#               . set in the user's environment
#               . passed in on the command line
#               . defined in a modified version of this makefile

include  $(ORACLE_HOME)/network/lib/env_network.mk 


RDBMSHOME = $(ORACLE_HOME)/rdbms/
RDBMSLIB  = $(ORACLE_HOME)/rdbms/lib/
RDBMSBIN  = $(ORACLE_HOME)/rdbms/bin/
LDFLAGS   = -L$(LIBHOME) -L$(ORACLE_HOME)/rdbms/lib  -L$(ORACLE_HOME)/network/lib 
LDCCOM    = $(LINK) $(LDFLAGS) $(EXOSFLAGS) -o $@
ECHO      = $(ORACLE_HOME)/bin/echodo

INSTALL_TARGS=clean inames inamesctl

default: inamesctl inames

#
# targets for relinking executables
#


names: $(S0NNOV)
	$(ECHODO) $(LDCCOM) $(S0NNOV) $(LIBNNO) $(LLIBCLNT) \
	$(TTLIBS) $(LOCALNETLIBS) $(SNMPAGENTLIB) $(LINKEXSYSLIBS)
	
inames: names
	-mv -f $(ORACLE_HOME)/bin/names $(ORACLE_HOME)/bin/names0
	-mv names $(ORACLE_HOME)/bin/names
	-chmod 751 $(ORACLE_HOME)/bin/names

namesctl: $(S0NNCC) $(NNCCM)
	$(ECHODO) $(LDCCOM) $(S0NNCC) $(NNCCM) $(TTLIBS) $(LOCALNETLIBS) $(LINKEXSYSLIBS)

inamesctl: namesctl
	-mv -f $(ORACLE_HOME)/bin/namesctl $(ORACLE_HOME)/bin/namesctl0
	-mv namesctl $(ORACLE_HOME)/bin/namesctl
	-chmod 751 $(ORACLE_HOME)/bin/namesctl

clean:

preinstall:
	-chmod 755 $(ORACLE_HOME)/bin
 
install: preinstall $(INSTALL_TARGS)
