Added applications directory. Copied (not moved)
osgarchive
osgconv
osgdem
osgversion
osgviewer
into applications directory. Leaving them in the examples directory
as well, for now.
Made examples optional via the make COMPILE_EXAMPLES=yes option
Added static lib and static plugin build support.
This commit is contained in:
@@ -41,3 +41,6 @@ INVENTOR_INSTALLED ?= no
|
||||
PERFORMER_INSTALLED ?= no
|
||||
|
||||
DEMETER_INSTALLED ?= no
|
||||
|
||||
COMPILE_EXAMPLES ?= no
|
||||
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
distribution :
|
||||
@$(MAKEDIST) \
|
||||
$(OS)\
|
||||
$(TOPDIR)\
|
||||
$(INST_LIBS)\
|
||||
$(INST_PLUGINS)\
|
||||
$(INST_INCLUDE)\
|
||||
$(INST_EXAMPLES)\
|
||||
$(INST_SRC)\
|
||||
$(INST_EXAMPLE_SRC)\
|
||||
$(INST_DOC)\
|
||||
$(INST_DATA)
|
||||
@sh $(MAKEDIST) OpenSceneGraph Make/rpm.header Make/rpm.files
|
||||
|
||||
|
||||
|
||||
cleandist:
|
||||
@$(MAKECLEANDIST)
|
||||
|
||||
@@ -134,6 +134,8 @@ endif
|
||||
RECURSIVE_TARGETS = \
|
||||
opt\
|
||||
debug\
|
||||
static\
|
||||
staticdebug\
|
||||
clean\
|
||||
cleandepend\
|
||||
cleandependopt\
|
||||
@@ -150,13 +152,18 @@ RECURSIVE_TARGETS = \
|
||||
docs\
|
||||
depend\
|
||||
|
||||
STATICLIB = $(LIB:.$(LIB_EXT)=.a)
|
||||
STATICPLUGIN = $(PLUGIN:.$(PLUGIN_EXT)=.a)
|
||||
|
||||
#### SUN OS Specific definitions
|
||||
ifeq ($(OS),SunOS)
|
||||
|
||||
#### if useing g++ on a sun
|
||||
#### if using g++ on a sun
|
||||
ifeq ($(COMPILER),gnu)
|
||||
C++ = g++
|
||||
DEPARG = -M
|
||||
INC +=
|
||||
DEF += -W -Wall -fPIC -fpermissive
|
||||
OPTF = -O2
|
||||
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
||||
SHARED = -shared -fPIC
|
||||
@@ -230,10 +237,10 @@ ifeq ($(OS),IRIX)
|
||||
C++ = CC
|
||||
DEPARG = -M
|
||||
INC += -I${TOPDIR}/include -I/usr/freeware/include
|
||||
LDFLAGS += -L/usr/local/lib
|
||||
LDFLAGS += -L/usr/local/lib
|
||||
DEF += -LANG:std -OPT:Olimit=0 \
|
||||
-DEBUG:woff=1681 -DEBUG:woff=1682 -DEBUG:woff=3303\
|
||||
-MDupdate $(MAKEDEPEND)
|
||||
-DEBUG:woff=1681 -DEBUG:woff=1682 -DEBUG:woff=3303\
|
||||
-MDupdate $(MAKEDEPEND)
|
||||
OPTF = -O2
|
||||
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
||||
SHARED = -shared
|
||||
@@ -322,7 +329,6 @@ ifeq ($(OS),Linux)
|
||||
C++ = $(CXX)
|
||||
endif
|
||||
|
||||
|
||||
DEPARG = -M
|
||||
INC +=
|
||||
|
||||
@@ -346,7 +352,7 @@ ifeq ($(OS),Linux)
|
||||
ifeq ("$(COMPILE_OSG_OP_OT_WITH_SONAMES)","YES")
|
||||
LDFLAGS += -Wl,-soname -Wl,$@.0
|
||||
endif
|
||||
|
||||
|
||||
LDFLAGS += `getconf LFS_LDFLAGS`
|
||||
DEF += `getconf LFS_CFLAGS`
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
################################################################
|
||||
# Directories traversed from the top level
|
||||
TOP_LEVEL_DIRS = src
|
||||
TOP_LEVEL_DIRS = \
|
||||
src\
|
||||
applications
|
||||
|
||||
ifeq ($(COMPILE_EXAMPLES),yes)
|
||||
TOP_LEVEL_DIRS += examples
|
||||
endif
|
||||
|
||||
|
||||
################################################################
|
||||
@@ -26,7 +32,6 @@ endif
|
||||
SRC_DIRS += \
|
||||
osgPlugins\
|
||||
osgWrappers\
|
||||
../examples
|
||||
|
||||
WRAPPER_DIRS = \
|
||||
osg\
|
||||
@@ -149,6 +154,14 @@ endif
|
||||
################################################################
|
||||
# Directories traversed in the TOPDIR/examples directory
|
||||
|
||||
APPLICATION_DIRS = \
|
||||
osgarchive\
|
||||
osgconv\
|
||||
osgdem\
|
||||
osgversion\
|
||||
osgviewer\
|
||||
|
||||
|
||||
EXAMPLE_DIRS = \
|
||||
osganimate\
|
||||
osgarchive\
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
|
||||
default: opt
|
||||
|
||||
opt: $(EXEC:=.opt)\
|
||||
opt: \
|
||||
$(EXEC:=.opt)\
|
||||
$(LIB:=.opt)\
|
||||
$(WRAPPER:=.opt)\
|
||||
$(PLUGIN:=.opt)\
|
||||
|
||||
debug: $(EXEC:=.dbg)\
|
||||
debug: \
|
||||
$(EXEC:=.dbg)\
|
||||
$(LIB:=.dbg)\
|
||||
$(WRAPPER:=.dbg)\
|
||||
$(PLUGIN:=.dbg)\
|
||||
|
||||
static:\
|
||||
$(LIB:.$(LIB_EXT)=.static)\
|
||||
$(PLUGIN:.$(PLUGIN_EXT)=.static)\
|
||||
|
||||
staticdebug:\
|
||||
$(LIB:.$(LIB_EXT)=.staticdbg)\
|
||||
$(PLUGIN:.$(LIB_EXT)=.staticdbg)\
|
||||
|
||||
cleandepend: cleandependopt cleandependdbg
|
||||
|
||||
cleandependopt:
|
||||
@@ -73,18 +83,26 @@ $(LIB): $(OBJS)
|
||||
$(WRAPPER) $(PLUGIN): $(OBJS)
|
||||
$(C++) $(LDFLAGS) -bundle $(OBJS) $(LIBS) -o $@
|
||||
|
||||
$(PLUGIN): $(OBJS)
|
||||
$(C++) $(LDFLAGS) -bundle $(OBJS) $(LIBS) -o $@
|
||||
|
||||
else
|
||||
ifeq ($(OS),HP-UX)
|
||||
ifeq ($(OS),HP-UX)
|
||||
|
||||
# we need to explicitly tell the linker the library name - else it will
|
||||
# include paths like ../../../libosg.sl into executables
|
||||
$(LIB) $(PLUGIN) ${WRAPPER} : $(OBJS)
|
||||
$(C++) $(LDFLAGS) $(SHARED) $(OBJS) $(LIBS) -Wl,+h -Wl,$@ -o $@
|
||||
else
|
||||
|
||||
else
|
||||
|
||||
$(LIB) $(PLUGIN) ${WRAPPER} : $(OBJS)
|
||||
$(C++) $(LDFLAGS) $(SHARED) $(OBJS) $(LIBS) -o $@
|
||||
|
||||
endif # not HP-UX
|
||||
$(STATICLIB) $(STATICPLUGIN): $(OBJS)
|
||||
ar rv $@ $?
|
||||
|
||||
endif # not HP-UX
|
||||
endif # not Darwin
|
||||
|
||||
$(EXEC:=.dbg) :
|
||||
@@ -103,6 +121,14 @@ $(LIB:=.dbg) :
|
||||
MAKEDEPEND=Makedepend $(LIB)
|
||||
@$(MAKE) LNSRC=$(DEBUGDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
|
||||
|
||||
$(LIB:.$(LIB_EXT)=.staticdbg) :
|
||||
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
|
||||
@cd $(DEBUGDIR);\
|
||||
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
|
||||
THISDIR=../$(THISDIR)\
|
||||
MAKEDEPEND=Makedepend $(STATICLIB)
|
||||
@$(MAKE) LNSRC=$(DEBUGDIR)/$(STATICLIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(STATICLIB) __link
|
||||
|
||||
$(WRAPPER:=.dbg) :
|
||||
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
|
||||
@cd $(DEBUGDIR); \
|
||||
@@ -119,6 +145,14 @@ $(PLUGIN:=.dbg) :
|
||||
MAKEDEPEND=Makedepend $(PLUGIN)
|
||||
@$(MAKE) LNSRC=$(DEBUGDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
|
||||
|
||||
$(PLUGIN:.$(PLUGIN_EXT)=.staticdbg) :
|
||||
@[ -d $(DEBUGDIR) ] || mkdir -p $(DEBUGDIR)
|
||||
@cd $(DEBUGDIR); \
|
||||
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
|
||||
THISDIR=../$(THISDIR)\
|
||||
MAKEDEPEND=Makedepend STATICPLUGIN=$(PLUGIN:.$(PLUGIN_EXT)=.a) $(STATICPLUGIN)
|
||||
@$(MAKE) LNSRC=$(DEBUGDIR)/$(STATICPLUGIN) LNDEST=$(PLUGININST)/$(STATICPLUGIN) __link
|
||||
|
||||
$(EXEC:=.opt) :
|
||||
@[ -d $(OPTDIR) ] || mkdir $(OPTDIR)
|
||||
@cd $(OPTDIR); \
|
||||
@@ -136,6 +170,15 @@ $(LIB:=.opt) :
|
||||
MAKEDEPEND=Makedepend $(LIB)
|
||||
@$(MAKE) LNSRC=$(OPTDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
|
||||
|
||||
$(LIB:.$(LIB_EXT)=.static) :
|
||||
[ -d $(OPTDIR) ] || mkdir $(OPTDIR)
|
||||
cd $(OPTDIR);\
|
||||
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
|
||||
THISDIR=../$(THISDIR)\
|
||||
MAKEDEPEND=Makedepend $(STATICLIB)
|
||||
@$(MAKE) LNSRC=$(OPTDIR)/$(STATICLIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(STATICLIB) __link
|
||||
|
||||
|
||||
$(WRAPPER:=.opt) :
|
||||
@[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
|
||||
@cd $(OPTDIR); \
|
||||
@@ -152,6 +195,16 @@ $(PLUGIN:=.opt) :
|
||||
MAKEDEPEND=Makedepend $(PLUGIN)
|
||||
@$(MAKE) LNSRC=$(OPTDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
|
||||
|
||||
$(PLUGIN:.$(PLUGIN_EXT)=.static) :
|
||||
@[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
|
||||
@cd $(OPTDIR); \
|
||||
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
|
||||
THISDIR=../$(THISDIR)\
|
||||
MAKEDEPEND=Makedepend STATICPLUGIN=$(PLUGIN:.$(PLUGIN_EXT)=.a) $(STATICPLUGIN)
|
||||
@$(MAKE) LNSRC=$(OPTDIR)/$(STATICPLUGIN) LNDEST=$(PLUGININST)/$(STATICPLUGIN) __link
|
||||
|
||||
|
||||
|
||||
## Revamped method for making Makedepend files
|
||||
## Under this method, Makedepend simply includes
|
||||
## all dependency files which are built for each
|
||||
@@ -179,18 +232,6 @@ else
|
||||
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
|
||||
$(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
.SUFFIXES: .cpp .o
|
||||
.cpp.o:
|
||||
$(C++) $(CXXFLAGS) -c $<
|
||||
@@ -198,7 +239,6 @@ endif
|
||||
depend : $(MAKEDEPEND)
|
||||
|
||||
__link :
|
||||
@echo Calling dolink.sh wit LNSRC = $(LNSRC) and LNDEST = $(LNDEST)
|
||||
@sh $(TOPDIR)/Make/dolink.sh $(TOPDIR) $(LNSRC) $(LNDEST) "$(LINK)"
|
||||
|
||||
__instfiles :
|
||||
|
||||
Reference in New Issue
Block a user