2002-04-02 14:58:18 +08:00
|
|
|
SHELL = /bin/sh
|
|
|
|
OS := $(shell uname)
|
|
|
|
|
|
|
|
## We don't care about architectural distinguishers in the OS
|
|
|
|
## such as IRIX64, IRIX32, etc. so we truncate IRIX?? to IRIX
|
|
|
|
ifeq ($(findstring IRIX,$(OS)),IRIX)
|
|
|
|
OS := IRIX
|
|
|
|
endif
|
|
|
|
|
2002-04-05 02:01:44 +08:00
|
|
|
## Make CYGWIN_XXXX CYGWIN so it's "Windows cross platform" :)
|
|
|
|
ifeq ($(findstring CYGWIN,$(OS)),CYGWIN)
|
|
|
|
OS := CYGWIN
|
|
|
|
endif
|
|
|
|
|
2002-06-16 04:57:50 +08:00
|
|
|
## Make MINGW_XXXX MINGW so it's "Windows cross platform" :)
|
|
|
|
ifeq ($(findstring MINGW,$(OS)),MINGW)
|
|
|
|
OS := MINGW
|
|
|
|
endif
|
|
|
|
|
2003-03-12 18:39:43 +08:00
|
|
|
# TOPDIR needs to be redefined for every GNUmakefile
|
2002-04-02 14:58:18 +08:00
|
|
|
TOPDIR ?= ../
|
|
|
|
THISDIR = .
|
|
|
|
MAKEDEPEND = ignore
|
|
|
|
|
2003-03-19 02:40:19 +08:00
|
|
|
#######################################################################
|
|
|
|
##
|
|
|
|
## VERSIONING SEMANTICS
|
|
|
|
##
|
|
|
|
## Version consistes of <major> . <minor> . <release> - <revision>
|
|
|
|
## Where:
|
|
|
|
## major : Production (0 = pre-production)
|
|
|
|
## minor : 0-7 = Production minor, 8 = Alpha, 9 = Beta
|
|
|
|
## release : Release tag
|
|
|
|
## revision: Release revision - 0 = development (cutting edge).
|
|
|
|
##
|
|
|
|
## Usage:
|
|
|
|
## Default - VERSION_REVISION is set to the value defined here
|
2003-06-24 23:40:09 +08:00
|
|
|
## Env variable OSG_VERSION_REVISION overrides default
|
2003-03-19 02:40:19 +08:00
|
|
|
## e.g.:
|
2003-06-24 23:40:09 +08:00
|
|
|
## % setenv OSG_VERSION_REVISION 5
|
2003-03-19 02:40:19 +08:00
|
|
|
## % make version
|
|
|
|
## Command line overrides env variable
|
|
|
|
## % make VERSION_REVISION=
|
|
|
|
#######################################################################
|
|
|
|
VERSION_MAJOR = 0
|
|
|
|
VERSION_MINOR = 9
|
2003-04-11 18:04:53 +08:00
|
|
|
VERSION_RELEASE = 4
|
2003-03-19 02:40:19 +08:00
|
|
|
VERSION_REVISION ?= 0
|
|
|
|
ifneq (,$(OSG_VERSION_REVISION))
|
|
|
|
VERSION_REVISION = $(OSG_VERSION_REVISION)
|
|
|
|
endif
|
|
|
|
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
|
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
INC = -I$(TOPDIR)/include
|
2003-03-19 02:40:19 +08:00
|
|
|
DEF = -DOSG_VERSION="$(VERSION)"\
|
|
|
|
-DOSG_VERSION_REVISION="$(VERSION_REVISION)"
|
2002-04-02 14:58:18 +08:00
|
|
|
|
2003-03-13 10:53:40 +08:00
|
|
|
############################################################################
|
|
|
|
## NOTE - Semantics for the use of ARCH, ARCHARGS, and ARCHINST parameters
|
|
|
|
## ARCH - must be defined if the OS supports both 64 and 32 bit
|
|
|
|
## architectures may remain undefined if it does not.
|
|
|
|
## ARCHARGS - Compiler directives to indicate for which architecture
|
|
|
|
## to build for
|
|
|
|
## ARCHINST - Installation target directory. Define if the OS supports
|
|
|
|
## more than one architecture (32 and 64).
|
|
|
|
## for ARCH=32 - define ARCHINST only if the system uses an
|
|
|
|
## extension on 'lib' to indicate 32 bit. e.g.
|
|
|
|
## IRIX defines /usr/lib32
|
|
|
|
## for ARCH=64 - Always define ARCHINST. Even if the OS
|
|
|
|
## doesn't make a distinction, we will.
|
|
|
|
############################################################################
|
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
CXXFLAGS = $(ARCHARGS) $(DOF) $(DEF) $(INC)
|
2003-03-13 10:53:40 +08:00
|
|
|
LDFLAGS = $(ARCHARGS) $(DOF) $(LINKARGS) -L$(TOPDIR)/lib/$(OS)$(ARCH)
|
2002-04-02 14:58:18 +08:00
|
|
|
OBJS = $(C++FILES:.cpp=.o) \
|
2003-03-13 10:53:40 +08:00
|
|
|
$(CXXFILES:.cpp=.o) \
|
|
|
|
$(CFILES:.c=.o) \
|
2002-04-02 14:58:18 +08:00
|
|
|
|
|
|
|
DOF = $(OPTF)
|
|
|
|
DEBUGDIR = $(OS)$(ARCH).Debug
|
|
|
|
OPTDIR = $(OS)$(ARCH).Opt
|
|
|
|
BININST = bin
|
|
|
|
LIBINST = lib
|
2003-03-13 10:53:40 +08:00
|
|
|
PLUGININST = lib/$(OS)$(ARCH)/osgPlugins
|
|
|
|
|
|
|
|
INST_LOCATION = /usr/local
|
|
|
|
INST_LIBS = $(INST_LOCATION)/lib$(ARCHINST)
|
|
|
|
INST_PLUGINS = $(INST_LOCATION)/lib$(ARCHINST)/osgPlugins
|
|
|
|
INST_INCLUDE = $(INST_LOCATION)/include
|
|
|
|
INST_SHARE = $(INST_LOCATION)/share
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLES = $(INST_SHARE)/OpenSceneGraph/bin
|
2003-03-13 10:53:40 +08:00
|
|
|
INST_SRC = $(INST_SHARE)/OpenSceneGraph/src
|
|
|
|
INST_DOC = $(INST_SHARE)/OpenSceneGraph/doc
|
|
|
|
INST_DATA = $(INST_SHARE)/OpenSceneGraph/data
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLE_SRC = $(INST_SRC)/examples
|
2003-03-13 10:53:40 +08:00
|
|
|
LINK = ln -sf
|
|
|
|
INSTBINCMD = install -m 755
|
|
|
|
INSTDEVCMD = install -m 644
|
|
|
|
INSTLINKBINCMD = $(LINK)
|
|
|
|
INSTLINKDEVCMD = $(LINK)
|
|
|
|
LIB_PREFIX = lib
|
2002-04-04 01:42:12 +08:00
|
|
|
LIB_EXT = so
|
|
|
|
PLUGIN_PREFIX = osgdb_
|
|
|
|
PLUGIN_EXT = so
|
2002-04-05 02:01:44 +08:00
|
|
|
MAKEDIST = echo " === Distribution build is not implemented yet for $(OS)"; printf "\n"
|
2002-04-09 22:55:38 +08:00
|
|
|
INSTLOGFILE = /tmp/.osg_inst_log
|
2002-04-02 14:58:18 +08:00
|
|
|
|
2002-04-05 09:52:15 +08:00
|
|
|
RECURSIVE_TARGETS = \
|
2002-04-02 14:58:18 +08:00
|
|
|
opt\
|
|
|
|
debug\
|
|
|
|
clean\
|
2002-04-12 13:09:45 +08:00
|
|
|
cleandepend\
|
|
|
|
cleandependopt\
|
|
|
|
cleandependdbg\
|
2002-04-02 14:58:18 +08:00
|
|
|
cleandbg\
|
|
|
|
cleanopt\
|
2002-04-12 13:09:45 +08:00
|
|
|
cleantarget\
|
|
|
|
cleantargetopt\
|
|
|
|
cleantargetdbg\
|
2002-04-02 14:58:18 +08:00
|
|
|
clobber\
|
2002-04-05 09:52:15 +08:00
|
|
|
clobberdbg\
|
|
|
|
clobberopt\
|
2002-04-02 14:58:18 +08:00
|
|
|
beautify\
|
|
|
|
docs\
|
|
|
|
depend\
|
|
|
|
|
2002-12-03 18:19:37 +08:00
|
|
|
#### SUN OS Specific definitions
|
|
|
|
ifeq ($(OS),SunOS)
|
|
|
|
|
|
|
|
#### if useing g++ on a sun
|
|
|
|
ifeq ($(COMPILER),gnu)
|
|
|
|
C++ = g++
|
|
|
|
DEPARG = -M
|
2003-03-16 04:20:46 +08:00
|
|
|
INC +=
|
2002-12-03 18:19:37 +08:00
|
|
|
DEF += -W -Wall -fPIC -fpermissive
|
|
|
|
OPTF = -O2
|
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
|
|
|
SHARED = -shared -fPIC
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH = 32
|
2002-12-03 18:19:37 +08:00
|
|
|
ifeq ($(ARCH),64)
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHARGS = -m64 -DARCH64
|
|
|
|
ARCHINST = 64
|
2002-12-03 18:19:37 +08:00
|
|
|
else
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHARGS =
|
2002-12-03 18:19:37 +08:00
|
|
|
endif
|
|
|
|
GIF_LIBS = -lgif
|
2003-03-13 10:53:40 +08:00
|
|
|
TIFF_LIB = -ltiff
|
2002-12-03 18:19:37 +08:00
|
|
|
JPEG_LIBS = -ljpeg
|
2002-12-07 03:56:17 +08:00
|
|
|
PNG_LIBS = -lpng -lz
|
2002-12-03 18:19:37 +08:00
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
OTHER_LIBS =
|
|
|
|
|
|
|
|
#### using forte compilers (default)
|
|
|
|
else
|
|
|
|
C++ = CC
|
|
|
|
DEPARG = -xM1
|
|
|
|
INC +=
|
2003-03-13 10:53:40 +08:00
|
|
|
DEF += -features=extensions -w
|
2002-12-03 18:19:37 +08:00
|
|
|
OPTF = -xO4
|
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
|
|
|
SHARED = -G
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH = 32
|
2002-12-03 18:19:37 +08:00
|
|
|
ifeq ($(ARCH),64)
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHARGS = -xarch=v9 -DARCH64
|
|
|
|
ARCHINST = 64
|
2002-12-03 18:19:37 +08:00
|
|
|
else
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHARGS =
|
|
|
|
ARCHINST =
|
2002-12-03 18:19:37 +08:00
|
|
|
endif
|
|
|
|
OTHER_LIBS = -lCstd
|
|
|
|
LINKARGS =
|
|
|
|
GIF_LIBS = /usr/local/lib/libgif.a
|
2003-03-13 10:53:40 +08:00
|
|
|
TIFF_LIB = /usr/local/lib/libtiff.a
|
2002-12-03 18:19:37 +08:00
|
|
|
JPEG_LIBS = /usr/local/lib/libjpeg.a
|
|
|
|
PNG_LIBS = /usr/local/lib/libpng.a /usr/local/lib/libz.a
|
|
|
|
FREETYPE_LIB = /usr/local/lib/libfreetype.a
|
2002-12-11 01:57:02 +08:00
|
|
|
endif
|
2002-12-03 18:19:37 +08:00
|
|
|
DYNAMICLIBRARYLIB = -ldl
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-12-03 18:19:37 +08:00
|
|
|
GL_LIBS = -lGLU -lGL
|
|
|
|
X_LIBS = -lXext -lXmu -lXi -lX11
|
|
|
|
SOCKET_LIBS = -lsocket -lnsl
|
|
|
|
INSTBINCMD = cp
|
|
|
|
INSTDEVCMD = cp
|
2003-03-13 10:53:40 +08:00
|
|
|
INST_LOCATION = /opt/OpenSceneGraph
|
2002-12-03 18:19:37 +08:00
|
|
|
MAKEDIST = $(TOPDIR)/Make/makepkg
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
2002-07-23 21:30:47 +08:00
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
#### IRIX Specific definitions
|
|
|
|
ifeq ($(OS),IRIX)
|
2003-03-13 10:53:40 +08:00
|
|
|
LINKARGS = -L${TOPDIR}/lib -LANG:std -OPT:Olimit=0
|
2002-04-02 14:58:18 +08:00
|
|
|
C++ = CC
|
2002-07-23 18:48:22 +08:00
|
|
|
DEPARG = -M
|
2002-12-11 05:18:16 +08:00
|
|
|
INC += -I${TOPDIR}/include -I/usr/freeware/include
|
2002-04-02 14:58:18 +08:00
|
|
|
DEF += -LANG:std -OPT:Olimit=0 \
|
2003-03-13 10:53:40 +08:00
|
|
|
-DEBUG:woff=1681 -DEBUG:woff=1682 -DEBUG:woff=3303\
|
|
|
|
-MDupdate $(MAKEDEPEND)
|
2002-04-02 14:58:18 +08:00
|
|
|
OPTF = -O2
|
2002-12-16 21:40:58 +08:00
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2002-04-02 14:58:18 +08:00
|
|
|
SHARED = -shared
|
2002-12-11 05:18:16 +08:00
|
|
|
PFLIBS = \
|
2002-07-01 22:40:09 +08:00
|
|
|
-lpf3ds -lpfdem -lpfdted -lpfdwb -lpfdxf -lpfevt \
|
|
|
|
-lpfflt -lpfgds -lpfgfo -lpfim -lpflsa -lpflsb \
|
|
|
|
-lpfnff -lpfobj -lpfpegg -lpfpfb -lpfphd -lpfpts \
|
|
|
|
-lpfrot -lpfscale -lpfsgf -lpfsgo -lpfsphere -lpfsv \
|
2003-02-12 03:23:19 +08:00
|
|
|
-lpftri -lpfunc -lpfvct -lpfdu -lpfutil -lpf -all -limage
|
2003-03-13 10:53:40 +08:00
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
ARCH = 32
|
|
|
|
ifeq ($(ARCH),64)
|
2002-12-11 05:18:16 +08:00
|
|
|
ARCHARGS = -64 -DARCH64
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHINST = 64
|
2002-12-11 05:18:16 +08:00
|
|
|
LINKARGS += -L/usr/freeware/lib64
|
|
|
|
PF_XTRA_LIBS = -L/usr/lib64/libpfdb -rpath /usr/lib64/libpfdb \
|
2003-03-13 10:53:40 +08:00
|
|
|
$(PFLIBS)
|
|
|
|
else
|
2002-04-02 14:58:18 +08:00
|
|
|
ARCHARGS = -n32
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHINST = 32
|
2002-12-11 05:18:16 +08:00
|
|
|
LINKARGS += -L/usr/freeware/lib32
|
|
|
|
PF_XTRA_LIBS = -L/usr/lib32/libpfdb -rpath /usr/lib32/libpfdb \
|
2003-03-13 10:53:40 +08:00
|
|
|
$(PFLIBS)
|
|
|
|
endif
|
|
|
|
|
2002-07-01 22:20:37 +08:00
|
|
|
DYNAMICLIBRARYLIB =
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-04-02 14:58:18 +08:00
|
|
|
GL_LIBS = -lGLU -lGL
|
|
|
|
X_LIBS = -lXext -lXi -lXmu -lX11
|
|
|
|
SOCKET_LIBS =
|
|
|
|
OTHER_LIBS = -lm
|
2002-05-11 03:30:48 +08:00
|
|
|
PNG_LIBS = -lpng
|
|
|
|
JPEG_LIBS = -ljpeg
|
|
|
|
TIFF_LIB = -ltiff
|
|
|
|
GIF_LIBS = -lungif
|
2002-08-31 14:04:21 +08:00
|
|
|
MAKEDIST = $(TOPDIR)/Make/makeirixdist
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
#### Linux specific definitions
|
2002-04-15 22:45:14 +08:00
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
ifeq ($(OS),Linux)
|
2002-04-15 22:45:14 +08:00
|
|
|
|
2003-03-13 10:53:40 +08:00
|
|
|
ifeq (x$(CXX),x)
|
|
|
|
C++ = g++
|
|
|
|
else
|
|
|
|
C++ = $(CXX)
|
|
|
|
endif
|
|
|
|
|
2002-04-17 05:39:45 +08:00
|
|
|
DEPARG = -M
|
2002-04-02 14:58:18 +08:00
|
|
|
INC +=
|
2003-03-13 10:53:40 +08:00
|
|
|
|
|
|
|
ifeq ($(COMPILER),intel)
|
|
|
|
C++ = ecc
|
|
|
|
LIBS = -lgcc_s
|
|
|
|
DEF += -KPIC
|
|
|
|
OPTF = -O2
|
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2003-03-21 06:13:10 +08:00
|
|
|
ifeq ($(SYSARCH),ia64)
|
|
|
|
ARCHARGS =
|
2003-03-25 07:02:08 +08:00
|
|
|
ARCH = IA64
|
|
|
|
ARCHINST = IA64
|
2003-03-21 06:13:10 +08:00
|
|
|
else
|
|
|
|
ARCHARGS =
|
|
|
|
ARCH = 32
|
|
|
|
ARCHINST =
|
|
|
|
endif
|
2003-03-13 10:53:40 +08:00
|
|
|
else
|
|
|
|
LIBS = -lstdc++
|
|
|
|
DEF += -W -Wall -fPIC
|
|
|
|
OPTF = -O2
|
|
|
|
DBGF = -g -gstabs+ -DOSG_COMPILE_UNIT_TESTS
|
2003-03-21 06:13:10 +08:00
|
|
|
SYSARCH := $(shell arch)
|
|
|
|
ifeq ($(SYSARCH),x86_64)
|
2003-03-25 07:02:08 +08:00
|
|
|
ARCHARGS =
|
2003-03-21 06:13:10 +08:00
|
|
|
ARCH = 64
|
|
|
|
ARCHINST = 64
|
|
|
|
else
|
|
|
|
ARCHARGS =
|
|
|
|
ARCH = 32
|
|
|
|
ARCHINST =
|
|
|
|
endif
|
2003-03-13 10:53:40 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
SHARED = -shared
|
2003-03-25 07:02:08 +08:00
|
|
|
ifeq ($(SYSARCH),x86_64)
|
|
|
|
LINKARGS = -L/usr/X11R6/lib64
|
|
|
|
else
|
|
|
|
LINKARGS = -L/usr/X11R6/lib
|
|
|
|
endif
|
2002-04-02 14:58:18 +08:00
|
|
|
DYNAMICLIBRARYLIB = -ldl
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-04-02 14:58:18 +08:00
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
GL_LIBS = -lGLU -lGL
|
2002-04-18 23:16:59 +08:00
|
|
|
X_LIBS = -lXi -lXmu -lX11
|
2002-07-01 22:20:37 +08:00
|
|
|
PF_XTRA_LIBS = -L/usr/lib/libpfdb -Xlinker -rpath /usr/lib/libpfdb \
|
2003-01-23 07:40:47 +08:00
|
|
|
-lpfdu -lpfutil -lpf
|
2002-04-02 14:58:18 +08:00
|
|
|
SOCKET_LIBS =
|
2002-07-12 07:30:18 +08:00
|
|
|
OTHER_LIBS = -lpthread
|
2002-04-10 09:29:45 +08:00
|
|
|
PNG_LIBS = -lpng
|
|
|
|
JPEG_LIBS = -ljpeg
|
|
|
|
TIFF_LIB = -ltiff
|
2002-09-25 04:14:08 +08:00
|
|
|
GIF_LIBS = -lungif
|
2002-04-05 02:01:44 +08:00
|
|
|
MAKEDIST = $(TOPDIR)/Make/makerpms
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
#### FreeBSD specific definitions
|
|
|
|
ifeq ($(OS),FreeBSD)
|
|
|
|
C++ = g++
|
|
|
|
DEPARG = -MM
|
|
|
|
INC += -I/usr/local/include -I/usr/X11R6/include
|
|
|
|
DEF += -W -Wall
|
|
|
|
OPTF = -O2
|
2002-08-28 22:26:09 +08:00
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2002-04-02 14:58:18 +08:00
|
|
|
SHARED = -shared
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH =
|
|
|
|
ARCHINST =
|
2002-04-02 14:58:18 +08:00
|
|
|
ARCHARGS =
|
|
|
|
LINKARGS = -L/usr/X11R6/lib -L/usr/local/lib -rpath /usr/local/lib
|
|
|
|
DYNAMICLIBRARYLIB =
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-04-02 14:58:18 +08:00
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
GL_LIBS = -lGLU -lGL
|
|
|
|
X_LIBS = -lXmu -lX11
|
|
|
|
SOCKET_LIBS =
|
|
|
|
OTHER_LIBS =
|
2003-03-13 10:53:40 +08:00
|
|
|
INST_LOCATION = /opt/X11R6
|
|
|
|
INST_SHARE = /usr/share/OpenSceneGraph
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
|
|
|
|
2002-04-05 09:52:15 +08:00
|
|
|
#### MacOS X specific definitions
|
2002-04-02 14:58:18 +08:00
|
|
|
ifeq ($(OS),Darwin)
|
2002-08-31 00:17:41 +08:00
|
|
|
C++ = c++
|
2003-04-13 21:26:41 +08:00
|
|
|
INC += -I/usr/X11R6/include
|
|
|
|
LDFLAGS += -L/usr/X11R6/lib
|
2002-04-02 14:58:18 +08:00
|
|
|
DEF += -Wall -D__DARWIN_OSX__
|
|
|
|
OPTF = -O2
|
2002-08-31 00:17:41 +08:00
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2002-04-02 14:58:18 +08:00
|
|
|
DEPARG = -M $(DEF)
|
|
|
|
SHARED = -shared
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH =
|
|
|
|
ARCHINST =
|
2002-04-02 14:58:18 +08:00
|
|
|
ARCHARGS =
|
2002-08-31 00:17:41 +08:00
|
|
|
LINKARGS =
|
|
|
|
DYNAMICLIBRARYLIB =
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-04-02 14:58:18 +08:00
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
CARBON_LIB = -framework Carbon
|
|
|
|
GL_LIBS = -framework OpenGL $(CARBON_LIB)
|
2003-04-13 21:26:41 +08:00
|
|
|
X_LIBS = -lX11
|
2002-04-02 14:58:18 +08:00
|
|
|
SOCKET_LIBS =
|
2002-07-17 03:21:31 +08:00
|
|
|
OTHER_LIBS = -lm -lstdc++ -lobjc
|
2003-03-13 10:53:40 +08:00
|
|
|
LIB_EXT = dylib
|
|
|
|
QUICKTIME = -framework QuickTime $(CARBON_LIB)
|
2003-04-15 03:39:22 +08:00
|
|
|
FREETYPE_INCLUDE = -I/sw/include/freetype2
|
2003-03-13 10:53:40 +08:00
|
|
|
TIFF_LIB = -ltiff
|
|
|
|
LIBVERSION = -dylib_current_version 0.9.3
|
2002-08-31 00:17:41 +08:00
|
|
|
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
#### Cygwin/Mingw specific definitions
|
2002-04-05 02:01:44 +08:00
|
|
|
ifeq ($(OS),CYGWIN)
|
2002-04-02 14:58:18 +08:00
|
|
|
C++ = c++
|
|
|
|
DEPARG = -M
|
|
|
|
INC +=
|
2002-12-06 17:41:53 +08:00
|
|
|
DEF += -DWIN32 -W -Wall -DNOMINMAX
|
2002-04-02 14:58:18 +08:00
|
|
|
OPTF = -O2
|
2002-08-28 22:26:09 +08:00
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2002-04-02 14:58:18 +08:00
|
|
|
SHARED = -shared\
|
2003-03-13 10:53:40 +08:00
|
|
|
-Wl,--export-all-symbols \
|
|
|
|
-Wl,--output-def,lib$(TARGET_BASENAME).def \
|
2003-04-04 23:22:25 +08:00
|
|
|
-Wl,--out-implib,$(TOPDIR)/lib/lib$(TARGET_BASENAME).dll.a
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH =
|
|
|
|
ARCHINST =
|
2002-04-02 14:58:18 +08:00
|
|
|
ARCHARGS =
|
|
|
|
LINKARGS = -W -Wall
|
|
|
|
DYNAMICLIBRARYLIB =
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-04-02 14:58:18 +08:00
|
|
|
GL_LIBS = -lglu32 -lopengl32
|
|
|
|
X_LIBS = -lgdi32 -luser32
|
|
|
|
SOCKET_LIBS =
|
|
|
|
OTHER_LIBS = $(GL_LIBS)
|
2002-04-05 02:01:44 +08:00
|
|
|
PNG_LIBS = -lpng -lz
|
|
|
|
JPEG_LIBS = -ljpeg
|
|
|
|
GIF_LIBS = -lungif
|
|
|
|
TIFF_LIB = -ltiff -lz -ljpeg
|
|
|
|
FREETYPE_LIB = -lfreetype2
|
2002-04-05 09:52:15 +08:00
|
|
|
LIB_PREFIX = cyg
|
|
|
|
LIB_EXT = dll
|
|
|
|
PLUGIN_EXT = dll
|
|
|
|
LINK = cp -f
|
2003-06-24 23:40:09 +08:00
|
|
|
INST_LOCATION = /usr/local/OpenSceneGraph
|
|
|
|
INST_LIBS = $(INST_LOCATION)/bin
|
|
|
|
INST_PLUGINS = $(INST_LOCATION)/bin
|
|
|
|
INST_INCLUDE = $(INST_LOCATION)/include
|
2002-04-05 09:52:15 +08:00
|
|
|
INST_SHARE_PREFIX = /usr/local/OpenSceneGraph
|
2002-11-11 16:05:07 +08:00
|
|
|
INST_SRC = $(INST_SHARE_PREFIX)/src
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
|
|
|
|
INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/demos
|
2002-04-05 09:52:15 +08:00
|
|
|
INST_DOC = $(INST_SHARE_PREFIX)/doc
|
|
|
|
INST_DATA = $(INST_SHARE_PREFIX)/data
|
2003-06-24 23:40:09 +08:00
|
|
|
MAKEDIST = $(TOPDIR)/Make/makeinnosetup
|
2002-04-02 14:58:18 +08:00
|
|
|
endif
|
|
|
|
|
2002-06-16 04:57:50 +08:00
|
|
|
#### Cygwin/Mingw specific definitions
|
|
|
|
ifeq ($(OS),MINGW)
|
|
|
|
C++ = c++
|
|
|
|
DEPARG = -M
|
|
|
|
INC +=
|
|
|
|
DEF += -DWIN32 -Wall
|
|
|
|
# -W
|
|
|
|
OPTF = -O2
|
2002-08-28 22:26:09 +08:00
|
|
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
2002-06-16 04:57:50 +08:00
|
|
|
SHARED = -shared\
|
2003-03-13 10:53:40 +08:00
|
|
|
-Wl,--export-all-symbols \
|
|
|
|
-Wl,--output-def,lib$(TARGET_BASENAME).def \
|
2003-04-04 23:22:25 +08:00
|
|
|
-Wl,--out-implib,$(TOPDIR)/lib/lib$(TARGET_BASENAME).dll.a
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCH =
|
|
|
|
ARCHINST =
|
2002-06-16 04:57:50 +08:00
|
|
|
ARCHARGS =
|
|
|
|
LINKARGS = -W -Wall
|
|
|
|
DYNAMICLIBRARYLIB =
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-06-16 04:57:50 +08:00
|
|
|
GL_LIBS = -lglu32 -lopengl32
|
|
|
|
X_LIBS = -lgdi32 -luser32
|
|
|
|
SOCKET_LIBS =
|
|
|
|
OTHER_LIBS = $(GL_LIBS)
|
|
|
|
PNG_LIBS = -lpng -lz
|
|
|
|
JPEG_LIBS = -ljpeg
|
|
|
|
GIF_LIBS = -lungif
|
|
|
|
TIFF_LIB = -ltiff -lz -ljpeg
|
|
|
|
FREETYPE_LIB = -lfreetype
|
|
|
|
|
|
|
|
# LIB_PREFIX = cyg
|
|
|
|
LIB_PREFIX = lib
|
|
|
|
LIB_EXT = dll
|
|
|
|
PLUGIN_EXT = dll
|
|
|
|
LINK = cp -f
|
2003-06-24 23:40:09 +08:00
|
|
|
INST_LOCATION = /usr/local/OpenSceneGraph
|
|
|
|
INST_LIBS = $(INST_LOCATION)/bin
|
|
|
|
INST_PLUGINS = $(INST_LOCATION)/bin
|
|
|
|
INST_INCLUDE = $(INST_LOCATION)/include
|
2002-06-16 04:57:50 +08:00
|
|
|
INST_SHARE_PREFIX = /usr/local/OpenSceneGraph
|
2002-11-11 16:05:07 +08:00
|
|
|
INST_SRC = $(INST_SHARE_PREFIX)/src
|
2003-03-28 02:56:23 +08:00
|
|
|
INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
|
|
|
|
INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/examples
|
2002-06-16 04:57:50 +08:00
|
|
|
INST_DOC = $(INST_SHARE_PREFIX)/doc
|
|
|
|
INST_DATA = $(INST_SHARE_PREFIX)/data
|
|
|
|
endif
|
|
|
|
|
2002-07-23 18:48:22 +08:00
|
|
|
#### HP-UX Specific definitions
|
|
|
|
# contributed by tino.schwarze@informatik.tu-chemnitz.de
|
|
|
|
|
|
|
|
ifeq ($(OS),HP-UX)
|
|
|
|
|
|
|
|
C++ = g++
|
|
|
|
DEPARG = -M
|
2003-03-16 04:20:46 +08:00
|
|
|
INC +=
|
2002-07-23 18:48:22 +08:00
|
|
|
DEF += -W -Wall -fPIC
|
|
|
|
OPTF = -O2
|
|
|
|
# gcc 3.1 uses DWARF as default, my GDB might not yet support this...
|
|
|
|
# at least I've got problems everywhere
|
2002-08-28 22:26:09 +08:00
|
|
|
DBGF = -g -gstabs+ -DOSG_COMPILE_UNIT_TESTS
|
2002-07-23 18:48:22 +08:00
|
|
|
SHARED = -shared -fPIC
|
|
|
|
ARCH = 32
|
|
|
|
ifeq ($(ARCH),64)
|
2002-07-23 23:01:51 +08:00
|
|
|
# not yet tested
|
2002-10-25 04:45:44 +08:00
|
|
|
ARCHARGS = -march=2.0 -DARCH64
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHINST = 64
|
2002-07-23 18:48:22 +08:00
|
|
|
else
|
2002-07-23 23:01:51 +08:00
|
|
|
# at least my gcc 3.1 defaults to HP-PA RISC 1.1
|
|
|
|
ARCHARGS =
|
2003-03-13 10:53:40 +08:00
|
|
|
ARCHINST =
|
2002-07-23 18:48:22 +08:00
|
|
|
endif
|
|
|
|
LINKARGS = -lpthread
|
|
|
|
LIB_EXT = sl
|
|
|
|
PLUGIN_EXT = sl
|
|
|
|
DYNAMICLIBRARYLIB = -ldld
|
2003-03-16 04:20:46 +08:00
|
|
|
OSG_LIBS = -losgGA -losgDB -losgUtil -losg
|
2002-07-23 18:48:22 +08:00
|
|
|
GL_LIBS = -L/opt/graphics/OpenGL/lib -lGLU -lGL
|
|
|
|
X_LIBS = -L/usr/lib/X11R6 -lXext -lXi -lX11 -L/usr/lib/X11R4 -lXmu
|
|
|
|
SOCKET_LIBS =
|
|
|
|
# make sure that global constructors/destructors are called upon
|
|
|
|
# shl_load() / shl_unload() - this is a gcc specific workaround
|
|
|
|
OTHER_LIBS = -lm -Wl,+init -Wl,_GLOBAL__DI -Wl,+fini -Wl,_GLOBAL__DD
|
|
|
|
FREETYPE_INCLUDE = -I/opt/freetype/include -I/opt/freetype/include/freetype2
|
|
|
|
FREETYPE_LIB = -L/opt/freetype/lib -lfreetype
|
|
|
|
PNG_INCLUDE = -I/opt/libpng/include
|
|
|
|
PNG_LIBS = -L/opt/libpng/lib -lpng -L/opt/zlib/lib -lz
|
|
|
|
JPEG_INCLUDE = -I/opt/jpeg-6/include
|
|
|
|
JPEG_LIBS = -L/opt/jpeg-6/lib -ljpeg
|
|
|
|
TIFF_INCLUDE = -I/opt/tiff-3.5/include
|
|
|
|
TIFF_LIB = -L/opt/tiff-3.5/lib -ltiff
|
|
|
|
GIF_INCLUDE = -I/opt/libungif/include
|
|
|
|
GIF_LIBS = -L/opt/libungif/lib -lungif
|
|
|
|
|
|
|
|
endif
|
2002-04-02 14:58:18 +08:00
|
|
|
|
|
|
|
VPATH=..
|
|
|
|
|