1) Replaced all Makefile* with GNUmakefile*.

2) Changed Makedepend system to make individual dependency files, which
   should save time rebuilding dependencies by limiting the regeneration
   of dependency file for only modified source files.
This commit is contained in:
Don BURNS 2003-03-12 10:39:43 +00:00
parent 88b686faca
commit fa33244f92
138 changed files with 72 additions and 63 deletions

View File

@ -17,7 +17,7 @@ ifeq ($(findstring MINGW,$(OS)),MINGW)
OS := MINGW
endif
# TOPDIR needs to be redefined for every Makefile
# TOPDIR needs to be redefined for every GNUmakefile
TOPDIR ?= ../
THISDIR = .
MAKEDEPEND = ignore

View File

@ -12,10 +12,10 @@ debug : $(EXEC:=.dbg)\
cleandepend : cleandependopt cleandependdbg
cleandependopt :
@[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f Makedepend
[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f Makedepend; rm -rf .depend
cleandependdbg :
@[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f Makedepend
[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f Makedepend; rm -rf .depend
cleantarget : cleantargetopt cleantargetdbg
@ -28,10 +28,10 @@ cleantargetdbg :
clean : cleanopt cleandbg
cleanopt :
@[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f $(OBJS) Makedepend
[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f $(OBJS) Makedepend; rm -rf .depend
cleandbg :
@[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f $(OBJS) Makedepend
[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f $(OBJS) Makedepend; rm -rf .depend
clobber : clobberdbg clobberopt
@ -86,7 +86,7 @@ endif # not Darwin
$(EXEC:=.dbg) :
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
@cd $(DEBUGDIR); \
$(MAKE) -f ../Makefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(EXEC)
@$(MAKE) LNSRC=$(DEBUGDIR)/$(EXEC) LNDEST=$(BININST)/$(EXEC) __link
@ -94,7 +94,7 @@ $(EXEC:=.dbg) :
$(LIB:=.dbg) : $(PLUGIN:=.dbg)
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
@cd $(DEBUGDIR);\
$(MAKE) -f ../Makefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(LIB)
@$(MAKE) LNSRC=$(DEBUGDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
@ -102,7 +102,7 @@ $(LIB:=.dbg) : $(PLUGIN:=.dbg)
$(PLUGIN:=.dbg) :
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
@cd $(DEBUGDIR); \
$(MAKE) -f ../Makefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(PLUGIN)
@$(MAKE) LNSRC=$(DEBUGDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
@ -110,7 +110,7 @@ $(PLUGIN:=.dbg) :
$(EXEC:=.opt) :
@[ -d $(OPTDIR) ] || mkdir $(OPTDIR)
@cd $(OPTDIR); \
$(MAKE) -f ../Makefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(EXEC)
@$(MAKE) LNSRC=$(OPTDIR)/$(EXEC) LNDEST=$(BININST)/$(EXEC) __link
@ -119,7 +119,7 @@ $(EXEC:=.opt) :
$(LIB:=.opt) :
@[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
@cd $(OPTDIR);\
$(MAKE) -f ../Makefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(LIB)
@$(MAKE) LNSRC=$(OPTDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
@ -127,27 +127,58 @@ $(LIB:=.opt) :
$(PLUGIN:=.opt) :
@[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
@cd $(OPTDIR); \
$(MAKE) -f ../Makefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(PLUGIN)
@$(MAKE) LNSRC=$(OPTDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
Makedepend : $(CXXFILES) $(CFILES)
ifeq ($(OS),IRIX)
## Revamped method for making Makedepend files
## Under this method, Makedepend simply includes
## all dependency files which are built for each
## individual source file. At update, only the individual
## dependency file is updated rather than the whole of Makedepend
Makedepend : $(CXXFILES) $(CFILES)
ifeq ($(OS),IRIX)
touch $@
else
ifeq (0,1) # This is an experiment
@ [ -d depend ] || mkdir depend
@ rm -f $@;
for f in $?; do \
ff=`basename $$f`;\
$(C++) $(INC) $(DEPARG) > depend/$$ff ;\
echo "include depend/$$ff" >> $@;\
done
else
$(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND)
@ touch $@
@if [ ! -d .depend ] ; then \
mkdir .depend;\
depfiles="$+";\
else\
depfiles="$?";\
fi;\
if [ ! -z "$$depfiles" ]; then\
for f in $$depfiles; do \
echo "$(C++) $(DEPARG) $(INC) $$f pipeto .depend/`basename $$f`"; \
$(C++) $(DEPARG) $(INC) $$f > .depend/`basename $$f`; \
grep $$f $@ || echo include .depend/`basename $$f` >> Makedepend ;\
done;\
fi
endif
ifeq (0,1) ##### OLD WAY : Keep until we've proven that this doesn't trip up
##### on other OS's.
Makedepend : $(CXXFILES) $(CFILES)
ifeq ($(OS),IRIX)
touch $@
else
ifeq (0,1) # This is an experiment
@ [ -d depend ] || mkdir depend
@ rm -f $@;
for f in $?; do \
ff=`basename $$f`;\
$(C++) $(INC) $(DEPARG) > depend/$$ff ;\
echo "include depend/$$ff" >> $@;\
done
else
$(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND)
endif
endif
endif
@ -155,24 +186,6 @@ endif
.cpp.o:
$(C++) $(CXXFLAGS) -c $<
## This is an attempt at updating Makedepend file for each source
## file compiled rather than all files each time a source file changes
## Doesn't work too well, but leave the code here for later evaulation
ifeq (0,1)
ifneq ($(OS),IRIX)
$(C++) $(INC) $(DEPARG) $< > .temp.dep
if [ -f $(MAKEDEPEND) ] ; \
then \
grep -v $< $(MAKEDEPEND) > .temp.dep1;\
else \
touch .temp.dep1; \
fi
cat .temp.dep1 .temp.dep > $(MAKEDEPEND)
rm -f .temp.dep1 .temp.dep
endif
endif
depend : $(MAKEDEPEND)

16
dist/Irix/GNUmakefile vendored Normal file
View File

@ -0,0 +1,16 @@
SHELL = /bin/sh
all : irixdist tardist
irixdist :
cd ${OSGHOME}; [ -d irixdist ] || mkdir irixdist
cd ${OSGHOME}; \
/usr/sbin/gendist -sbase ${OSGHOME} -idb dist/Irix/osg.idb -spec dist/Irix/osg.spec -dist irixdist -all
tardist : irixdist
cd ${OSGHOME}/irixdist;\
tar cvf osg.tardist osg osg.idb osg.sw

View File

@ -1,19 +0,0 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osghud.cpp\
LIBS += -losgProducer -lProducer -losgText $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\
Makefile.inst=Makefile
EXEC = osghud
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -112,8 +112,6 @@ int main( int argc, char **argv )
osg::notify(osg::NOTICE)<<"unable to load reflect map, model will not be mutlitextured"<<std::endl;
}
// run optimization over the scene graph
osgUtil::Optimizer optimzer;
optimzer.optimize(rootnode);

View File

@ -1,3 +1,4 @@
#include <iostream>
#include <osg/ArgumentParser>
#include <osg/ApplicationUsage>
@ -317,7 +318,7 @@ void ArgumentParser::writeErrorMessages(std::ostream& output,ErrorSeverity sever
{
if (itr->second>=severity)
{
output<<getProgramName()<<": "<<itr->first<<std::endl;
output<< getProgramName() << ": " << itr->first << std::endl;
}
}
}

Some files were not shown because too many files have changed in this diff Show More