2002-04-09 22:55:38 +08:00
|
|
|
install :
|
|
|
|
@rm -f $(INSTLOGFILE)
|
|
|
|
@$(MAKE) __instbin __instdev
|
2004-11-17 22:56:08 +08:00
|
|
|
@cat $(INSTLOGFILE)
|
2001-01-11 00:32:10 +08:00
|
|
|
|
2002-04-09 22:55:38 +08:00
|
|
|
instbin instdev :
|
|
|
|
@$(MAKE) __$@
|
|
|
|
|
|
|
|
__instbin:
|
2003-03-28 02:56:23 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_EXAMPLES) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2003-03-13 10:53:40 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2006-03-02 23:26:12 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH)/osgPlugins INSTDEST=$(INST_PLUGINS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
2005-12-08 19:37:55 +08:00
|
|
|
ifdef IMP_LIB_EXT
|
2006-03-02 23:26:12 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH)/osgPlugins INSTDEST=$(INST_EXAMPLES)/osgPlugins \
|
2005-12-08 19:37:55 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __install
|
|
|
|
endif
|
2002-04-16 11:24:41 +08:00
|
|
|
@echo >> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " Run-time environment installation successful. Add " \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " $(INST_EXAMPLES)" \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " to your PATH environmental variable, and" \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " $(INST_LIBS) and $(INST_PLUGINS)" \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " to your LD_LIBRARY_PATH if not already present." \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
|
|
|
@echo >> $(INSTLOGFILE)
|
2002-04-09 22:55:38 +08:00
|
|
|
|
|
|
|
__instdev:
|
2002-04-02 14:44:57 +08:00
|
|
|
@for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
|
2006-03-02 23:26:12 +08:00
|
|
|
do \
|
2002-04-02 14:44:57 +08:00
|
|
|
if [ -d $(TOPDIR)/include/$$d ]; \
|
|
|
|
then \
|
2006-03-02 23:26:12 +08:00
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d \
|
|
|
|
INSTALL?="$(INSTDEVCMD)" __install; \
|
|
|
|
fi \
|
2002-04-02 14:44:57 +08:00
|
|
|
done
|
2003-03-28 02:56:23 +08:00
|
|
|
@$(TOPDIR)/Make/instexamplesrc \
|
2006-03-02 23:26:12 +08:00
|
|
|
$(TOPDIR) \
|
|
|
|
$(INST_LIBS) \
|
|
|
|
$(INST_INCLUDE) \
|
|
|
|
$(INST_SRC) \
|
|
|
|
$(INST_EXAMPLE_SRC) \
|
|
|
|
"$(INSTDEVCMD)" \
|
|
|
|
"$(C++)" \
|
|
|
|
"$(OPTF)" \
|
|
|
|
"$(DEPARG)" \
|
|
|
|
"$(LINKARGS)" \
|
|
|
|
"$(OSG_LIBS)" \
|
|
|
|
"$(FREETYPE_LIB)" \
|
|
|
|
"$(GLUT_LIB)" \
|
|
|
|
"$(GL_LIBS)" \
|
|
|
|
"$(X_LIBS)" \
|
|
|
|
"$(SOCKET_LIBS)" \
|
|
|
|
"$(OTHER_LIBS)" \
|
|
|
|
"$(TIFF_LIB)" \
|
2003-07-20 01:46:45 +08:00
|
|
|
$(MAKE)
|
2002-04-16 11:24:41 +08:00
|
|
|
|
|
|
|
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " Development environment installation successful. Add" \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " -I$(INST_INCLUDE)" \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " compile flag when compiling with OSG header files." \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
2006-03-02 23:26:12 +08:00
|
|
|
@echo " Example programs can be found at $(INST_EXAMPLE_SRC)." \
|
2002-04-16 11:24:41 +08:00
|
|
|
>> $(INSTLOGFILE)
|
|
|
|
@echo >> $(INSTLOGFILE)
|
2005-12-08 19:37:55 +08:00
|
|
|
|
2002-04-09 22:55:38 +08:00
|
|
|
instlinks :
|
|
|
|
@rm -f $(INSTLOGFILE)
|
2002-04-16 11:24:41 +08:00
|
|
|
$(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
|
|
|
|
$(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
|
2004-11-17 22:56:08 +08:00
|
|
|
@cat $(INSTLOGFILE)
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instlinksbin :
|
2002-04-09 22:55:38 +08:00
|
|
|
@rm -f $(INSTLOGFILE)
|
2002-04-16 11:24:41 +08:00
|
|
|
$(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
|
2004-11-17 22:56:08 +08:00
|
|
|
@cat $(INSTLOGFILE)
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instlinksdev :
|
2002-04-09 22:55:38 +08:00
|
|
|
@rm -f $(INSTLOGFILE)
|
2002-04-16 11:24:41 +08:00
|
|
|
@$(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
|
2004-11-17 22:56:08 +08:00
|
|
|
@cat $(INSTLOGFILE)
|
2002-04-09 22:55:38 +08:00
|
|
|
|
2002-04-02 14:44:57 +08:00
|
|
|
|
|
|
|
instclean : instcleanbin instcleandev
|
|
|
|
|
|
|
|
instcleanbin :
|
2003-03-28 02:56:23 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_EXAMPLES) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
2003-03-13 10:53:40 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
|
2002-04-04 01:42:12 +08:00
|
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
2006-03-02 23:26:12 +08:00
|
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH)/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`; \
|
2006-03-02 23:26:12 +08:00
|
|
|
do \
|
2002-04-02 14:44:57 +08:00
|
|
|
if [ -d $(TOPDIR)/include/$$d ]; \
|
|
|
|
then \
|
2006-03-02 23:26:12 +08:00
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d \
|
|
|
|
INSTALL?="$(INSTDEVCMD)" __instclean; \
|
|
|
|
fi \
|
2002-04-02 14:44:57 +08:00
|
|
|
done
|
2003-03-28 02:56:23 +08:00
|
|
|
@for d in `ls -1 $(TOPDIR)/examples | grep -v CVS`; \
|
2006-03-02 23:26:12 +08:00
|
|
|
do \
|
2003-03-28 02:56:23 +08:00
|
|
|
if [ -d $(TOPDIR)/examples/$$d ]; \
|
2002-04-02 14:44:57 +08:00
|
|
|
then \
|
2006-03-02 23:26:12 +08:00
|
|
|
$(MAKE) INSTSRC=$(TOPDIR)/examples/$$d INSTDEST=$(INST_EXAMPLE_SRC)/$$d \
|
|
|
|
INSTALL?="$(INSTDEVCMD)" __instclean; \
|
|
|
|
fi \
|
2002-04-02 14:44:57 +08:00
|
|
|
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)
|
2006-03-02 23:26:12 +08:00
|
|
|
@cd $(INSTSRC); \
|
|
|
|
THISDIR=`pwd`; \
|
|
|
|
if [ -n "`ls -1 | grep -v CVS`" ]; then \
|
2002-04-02 14:44:57 +08:00
|
|
|
for f in `ls -1 | grep -v CVS`; \
|
2006-03-02 23:26:12 +08:00
|
|
|
do \
|
2002-04-02 14:44:57 +08:00
|
|
|
if [ -f $$f ] ; \
|
|
|
|
then \
|
2002-05-21 08:58:40 +08:00
|
|
|
INSTPATH=$$THISDIR/$$f; \
|
2006-03-02 23:26:12 +08:00
|
|
|
$(INSTALL) "$$INSTPATH" "$(INSTDEST)/$$f"; \
|
|
|
|
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) ] ; \
|
2006-03-02 23:26:12 +08:00
|
|
|
then \
|
|
|
|
cd $(INSTSRC); \
|
|
|
|
if [ -n "`ls -1 | grep -v CVS`" ]; then \
|
2002-04-02 14:44:57 +08:00
|
|
|
for f in `ls -1 | grep -v CVS`; \
|
2006-03-02 23:26:12 +08:00
|
|
|
do \
|
2002-04-02 14:44:57 +08:00
|
|
|
if [ -f $$f ] ; \
|
|
|
|
then \
|
2006-03-02 23:26:12 +08:00
|
|
|
echo "rm -f $(INSTDEST)/$$f"; \
|
|
|
|
rm -f $(INSTDEST)/$$f; \
|
|
|
|
fi \
|
|
|
|
done \
|
|
|
|
fi; \
|
|
|
|
empty=`ls $(INSTDEST)`; \
|
|
|
|
if [ -z "$$empty" ]; \
|
|
|
|
then \
|
|
|
|
rm -rf $(INSTDEST); \
|
|
|
|
fi \
|
2002-04-02 14:44:57 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|