693a889ece
o Object files now go in subdirectories named $(OS)$(ARCH).Opt and $(OS)$(ARCH).Debug for OS's that support both architectures. eg. Linux32.Opt and Linux32.Debug o Libraries links are now placed in lib/$(OS)$(ARCH) eg. lib/Linux32/ o Binaries are now placed in bin/$(OS)$(ARCH) eg. bin/Linux32 o 'make install' and 'make instlinks' now place files/links in /usr/local/{include,lib,share/OpenSceneGraph} by default on most systems (Solaris still goes in /opt/OpenSceneGraph). Rather than having the somwehat confusing INST_SYS_PREFIX and INST_SHARE_PREFX, you can override these with just INST_LOCATION For example, make INST_LOCATION=/usr will place files at /usr/include, /usr/lib, /usr/share/OpenSceneGraph.
174 lines
4.6 KiB
Plaintext
174 lines
4.6 KiB
Plaintext
install :
|
|
@rm -f $(INSTLOGFILE)
|
|
@$(MAKE) __instbin __instdev
|
|
@more $(INSTLOGFILE)
|
|
|
|
instbin instdev :
|
|
@$(MAKE) __$@
|
|
|
|
__instbin:
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_DEMOS) \
|
|
INSTALL?="$(INSTBINCMD)" __install
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
|
|
INSTALL?="$(INSTBINCMD)" __install
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH)/osgPlugins INSTDEST=$(INST_PLUGINS)\
|
|
INSTALL?="$(INSTBINCMD)" __install
|
|
@echo >> $(INSTLOGFILE)
|
|
@echo " Run-time environment installation successful. Add "\
|
|
>> $(INSTLOGFILE)
|
|
@echo " $(INST_DEMOS)"\
|
|
>> $(INSTLOGFILE)
|
|
@echo " to your PATH environmental variable, and"\
|
|
>> $(INSTLOGFILE)
|
|
@echo " $(INST_LIBS) and $(INST_PLUGINS)"\
|
|
>> $(INSTLOGFILE)
|
|
@echo " to your LD_LIBRARY_PATH if not already present."\
|
|
>> $(INSTLOGFILE)
|
|
@echo >> $(INSTLOGFILE)
|
|
|
|
|
|
__instdev:
|
|
@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\
|
|
INSTALL?="$(INSTDEVCMD)" __install;\
|
|
fi\
|
|
done
|
|
@$(TOPDIR)/Make/instdemosrc \
|
|
$(TOPDIR)\
|
|
$(INST_LIBS)\
|
|
$(INST_INCLUDE)\
|
|
$(INST_SRC)\
|
|
$(INST_DEMO_SRC)\
|
|
"$(INSTDEVCMD)"\
|
|
"$(C++)"\
|
|
"$(OPTF)"\
|
|
"$(DEPARG)"\
|
|
"$(LINKARGS)"\
|
|
"$(OSG_LIBS)"\
|
|
"$(FREETYPE_LIB)"\
|
|
"$(GLUT_LIB)"\
|
|
"$(GL_LIBS)"\
|
|
"$(X_LIBS)"\
|
|
"$(SOCKET_LIBS)"\
|
|
"$(OTHER_LIBS)"\
|
|
"$(TIFF_LIB)"\
|
|
|
|
|
|
@echo\
|
|
>> $(INSTLOGFILE)
|
|
@echo " Development environment installation successful. Add"\
|
|
>> $(INSTLOGFILE)
|
|
@echo " -I$(INST_INCLUDE)"\
|
|
>> $(INSTLOGFILE)
|
|
@echo " compile flag when compiling with OSG header files."\
|
|
>> $(INSTLOGFILE)
|
|
@echo " Example programs can be found at $(INST_DEMO_SRC)."\
|
|
>> $(INSTLOGFILE)
|
|
@echo >> $(INSTLOGFILE)
|
|
|
|
instlinks :
|
|
@rm -f $(INSTLOGFILE)
|
|
$(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
|
|
$(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
|
|
@more $(INSTLOGFILE)
|
|
|
|
instlinksbin :
|
|
@rm -f $(INSTLOGFILE)
|
|
$(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
|
|
@more $(INSTLOGFILE)
|
|
|
|
instlinksdev :
|
|
@rm -f $(INSTLOGFILE)
|
|
@$(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
|
|
@more $(INSTLOGFILE)
|
|
|
|
|
|
instclean : instcleanbin instcleandev
|
|
|
|
instcleanbin :
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_DEMOS) \
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
|
@$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH)/osgPlugins INSTDEST=$(INST_PLUGINS)\
|
|
INSTALL?="$(INSTBINCMD)" __instclean
|
|
|
|
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\
|
|
INSTALL?="$(INSTDEVCMD)" __instclean;\
|
|
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\
|
|
INSTALL?="$(INSTDEVCMD)" __instclean;\
|
|
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`; \
|
|
do\
|
|
if [ -f $$f ] ; \
|
|
then \
|
|
INSTPATH=$$THISDIR/$$f; \
|
|
$(INSTALL) $$INSTPATH $(INSTDEST)/$$f;\
|
|
fi\
|
|
done\
|
|
fi
|
|
|
|
__instclean :
|
|
@[ -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" ];\
|
|
then\
|
|
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
|
|
|
|
|
|
|
|
|