2002-04-09 22:55:38 +08:00
|
|
|
install :
|
|
|
|
@rm -f $(INSTLOGFILE)
|
|
|
|
@$(MAKE) __instbin __instdev
|
|
|
|
@more $(INSTLOGFILE)
|
2001-01-11 00:32:10 +08:00
|
|
|
|
2002-04-09 22:55:38 +08:00
|
|
|
instbin instdev :
|
|
|
|
@$(MAKE) __$@
|
|
|
|
|
|
|
|
__instbin:
|
2002-04-02 14:44:57 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin INSTDEST=$(INST_DEMOS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2002-04-02 14:44:57 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib INSTDEST=$(INST_LIBS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2002-04-02 14:44:57 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/osgPlugins INSTDEST=$(INST_PLUGINS)\
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2002-04-09 22:55:38 +08:00
|
|
|
@echo \
|
|
|
|
"\n"\
|
|
|
|
" Run-time environment installation successful. Add \n"\
|
|
|
|
" $(INST_DEMOS)\n"\
|
|
|
|
" to your PATH environmental variable, and \n"\
|
|
|
|
" $(INST_LIBS) and $(INST_PLUGINS) \n"\
|
|
|
|
" to your LD_LIBRARY_PATH if not already present.\n"\
|
|
|
|
"\n" >> $(INSTLOGFILE)
|
|
|
|
|
|
|
|
|
|
|
|
__instdev:
|
2002-04-02 14:44:57 +08:00
|
|
|
@for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
|
|
|
|
do\
|
|
|
|
if [ -d $(TOPDIR)/include/$$d ]; \
|
|
|
|
then \
|
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d\
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTDEVCMD)" __install;\
|
2002-04-02 14:44:57 +08:00
|
|
|
fi\
|
|
|
|
done
|
2002-04-09 22:55:38 +08:00
|
|
|
@$(TOPDIR)/Make/instdemosrc \
|
|
|
|
$(OS)\
|
|
|
|
$(TOPDIR)\
|
|
|
|
$(INST_LIBS)\
|
|
|
|
$(INST_PLUGINS)\
|
|
|
|
$(INST_INCLUDE)\
|
|
|
|
$(INST_DEMOS)\
|
|
|
|
$(INST_SRC)\
|
|
|
|
$(INST_DEMO_SRC)\
|
|
|
|
$(INST_DOC)\
|
|
|
|
$(INST_DATA)\
|
|
|
|
"$(OPTF)"\
|
|
|
|
"$(DEPARG)"
|
|
|
|
@echo \
|
|
|
|
"\n"\
|
|
|
|
" Development environment installation successful. Add\n"\
|
|
|
|
" -I$(INST_INCLUDE)\n"\
|
|
|
|
" compile flag when compiling with OSG header files.\n"\
|
|
|
|
" Example programs can be found at $(INST_DEMO_SRC).\n"\
|
|
|
|
"\n" >> $(INSTLOGFILE)
|
|
|
|
|
|
|
|
|
|
|
|
instlinks :
|
|
|
|
@rm -f $(INSTLOGFILE)
|
|
|
|
$(MAKE) INSTALL="$(INSTLINKBINCMD)" __instbin
|
|
|
|
$(MAKE) INSTALL="$(INSTLINKDEVCMD)" __instdev
|
|
|
|
@more $(INSTLOGFILE)
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instlinksbin :
|
2002-04-09 22:55:38 +08:00
|
|
|
@rm -f $(INSTLOGFILE)
|
|
|
|
$(MAKE) INSTALL="$(INSTLINKBINCMD)" __instbin
|
|
|
|
@more $(INSTLOGFILE)
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instlinksdev :
|
2002-04-09 22:55:38 +08:00
|
|
|
@rm -f $(INSTLOGFILE)
|
|
|
|
$(MAKE) INSTALL="$(INSTLINKDEVCMD)" __instdev
|
|
|
|
@more $(INSTLOGFILE)
|
|
|
|
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instclean : instcleanbin instcleandev
|
|
|
|
|
|
|
|
instcleanbin :
|
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin INSTDEST=$(INST_DEMOS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
2002-04-02 14:44:57 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib INSTDEST=$(INST_LIBS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
2002-04-02 14:44:57 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/osgPlugins INSTDEST=$(INST_PLUGINS)\
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instcleandev :
|
|
|
|
@for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
|
|
|
|
do\
|
|
|
|
if [ -d $(TOPDIR)/include/$$d ]; \
|
|
|
|
then \
|
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d\
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTDEVCMD)" __instclean;\
|
2002-04-02 14:44:57 +08:00
|
|
|
fi\
|
|
|
|
done
|
|
|
|
@for d in `ls -1 $(TOPDIR)/src/Demos | grep -v CVS`; \
|
|
|
|
do\
|
|
|
|
if [ -d $(TOPDIR)/src/Demos/$$d ]; \
|
|
|
|
then \
|
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/src/Demos/$$d INSTDEST=$(INST_DEMO_SRC)/$$d\
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTDEVCMD)" __instclean;\
|
2002-04-02 14:44:57 +08:00
|
|
|
fi\
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
__install :
|
|
|
|
@[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
|
|
|
|
@[ -n "$(INSTSRC)" ] && echo > /dev/null
|
|
|
|
@[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST definition)"
|
|
|
|
@[ -n "$(INSTDEST)" ] && echo > /dev/null
|
|
|
|
@[ -d $(INSTDEST) ] || mkdir -p $(INSTDEST)
|
|
|
|
@cd $(INSTSRC);\
|
|
|
|
THISDIR=`pwd`;\
|
|
|
|
if [ -n "`ls -1 | grep -v CVS`" ]; then\
|
|
|
|
for f in `ls -1 | grep -v CVS`; \
|
2001-01-11 00:32:10 +08:00
|
|
|
do\
|
2002-04-02 14:44:57 +08:00
|
|
|
if [ -f $$f ] ; \
|
|
|
|
then \
|
2002-04-09 22:55:38 +08:00
|
|
|
echo $(INSTALL) $$THISDIR/$$f $(INSTDEST)/$$f;\
|
|
|
|
$(INSTALL) $$THISDIR/$$f $(INSTDEST)/$$f;\
|
2002-04-02 14:44:57 +08:00
|
|
|
fi\
|
|
|
|
done\
|
2001-01-11 00:32:10 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
__instclean :
|
2002-04-02 14:44:57 +08:00
|
|
|
@[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
|
|
|
|
@[ -n "$(INSTSRC)" ] && echo > /dev/null
|
|
|
|
@[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST definition)"
|
|
|
|
@[ -n "$(INSTDEST)" ] && echo > /dev/null
|
|
|
|
@if [ -d $(INSTDEST) ] ; \
|
|
|
|
then\
|
|
|
|
cd $(INSTSRC);\
|
|
|
|
if [ -n "`ls -1 | grep -v CVS`" ]; then\
|
|
|
|
for f in `ls -1 | grep -v CVS`; \
|
|
|
|
do\
|
|
|
|
if [ -f $$f ] ; \
|
|
|
|
then \
|
|
|
|
echo "rm -f $(INSTDEST)/$$f";\
|
|
|
|
rm -f $(INSTDEST)/$$f;\
|
|
|
|
fi\
|
|
|
|
done\
|
|
|
|
fi;\
|
|
|
|
empty=`ls $(INSTDEST)`;\
|
|
|
|
if [ -z "$$empty" ];\
|
2001-01-11 00:32:10 +08:00
|
|
|
then\
|
2002-04-02 14:44:57 +08:00
|
|
|
repeat=1;\
|
|
|
|
while [ $$repeat = 1 ] ; \
|
|
|
|
do \
|
|
|
|
printf "$(INSTDEST) is empty. Remove? (y/n) [y]: ";\
|
|
|
|
read resp;\
|
|
|
|
case $$resp in \
|
|
|
|
""|Yes|YES|yes|Y|y) rm -rf $(INSTDEST); repeat=0;; \
|
|
|
|
n|N|no|NO) repeat=0;; \
|
|
|
|
*) repeat=1;; \
|
|
|
|
esac\
|
|
|
|
done\
|
|
|
|
fi\
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|