OpenSceneGraph/Make/makedefs.new
2002-03-31 16:43:54 +00:00

231 lines
5.8 KiB
Plaintext

SHELL = /bin/sh
OS := $(shell uname)
# TOPDIR needs to be redefined for every Makefile
TOPDIR ?= ../
THISDIR = .
MAKEDEPEND = ignore
INC = -I$(TOPDIR)/include
DEF =
CXXFLAGS = $(ARCHARGS) $(DOF) $(DEF) $(INC)
LDFLAGS = $(ARCHARGS) $(DOF) $(LINKARGS) -L$(TOPDIR)/lib
OBJS = $(C++FILES:.cpp=.o) \
$(CXXFILES:.cpp=.o) \
$(CFILES:.c=.o) \
DOF = $(OPTF)
DEBUGDIR = $(OS).Debug
OPTDIR = $(OS).Opt
BININST = bin
LIBINST = lib
PLUGININST = lib/osgPlugins
INST_DEMOS = /usr/share/OpenSceneGraph/bin
INST_LIBS = /usr/share/OpenSceneGraph/lib
INST_PLUGINS = /usr/share/OpenSceneGraph/lib/osgPlugins
INST_INCLUDE = /usr/share/OpenSceneGraph/include
INST_DEMO_SRC = /usr/share/OpenSceneGraph/src/demos
INST_DATA = /usr/share/OpenSceneGraph/data
LINK = ln -sf
INSTBIN = install -m 755
INSTDEV = install -m 644
INSTLINKBIN = $(LINK)
INSTLINKDEV = $(LINK)
ALL_TARGETS = \
opt\
debug\
clean\
cleandbg\
cleanopt\
clobber\
beautify\
docs\
depend\
#### SUN OS Specific definitions
ifeq ($(OS),SunOS)
C++ = CC
DEPARG = -xM1
INC +=
DEF += -features=extensions
OPTF = -xO2
DBGF = -g
SHARED = -G
ARCHARGS =
LINKARGS =
DYNAMICLIBRARYLIB = -ldl
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
FREETYPE_LIB = -lfreetype
GLUT_LIB = -lglut
GL_LIBS = -lGLU -lGL
X_LIBS = -lXext -lXmu -lXi -lX11
SOCKET_LIBS = -lsocket -lnsl
OTHER_LIBS = -lCstd
SO_EXT = so
PLUGIN_EXT = so
TIFF_LIB = -ltiff
endif
#### IRIX Specific definitions
ifeq ($(OS),IRIX)
C++ = CC
DEPFLAGS = -M
INC +=
DEF += -LANG:std -OPT:Olimit=0 \
-DEBUG:wof=1682 -DEBUG:woff=3303\
-MDupdate $(MAKEDEPEND)
OPTF = -O2
DBGF = -g
SHARED = -shared
ARCHARGS =
LINKARGS = -LANG:std -OPT:Olimit=0
DYNAMICLIBRARYLIB = -ldl
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
FREETYPE_LIB = -lfreetype
GLUT_LIB = -lglut
GL_LIBS = -lGLU -lGL
X_LIBS = -lXext -lXi -lXmu -lX11
SOCKET_LIBS =
OTHER_LIBS = -lm
SO_EXT = so
PLUGIN_EXT = so
INSTLINKBIN = install -t -m 755
INSTLINKDEV = install -t -m 644
endif
#### Linux specific definitions
ifeq ($(OS),Linux)
C++ = g++
DEPARG = -MM
INC +=
DEF += -W -Wall
OPTF = -O2
DBGF = -g
SHARED = -shared
ARCHARGS =
LINKARGS = -L/usr/X11R6/lib
DYNAMICLIBRARYLIB = -ldl
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
FREETYPE_LIB = -lfreetype
GLUT_LIB = -lglut
GL_LIBS = -lGLU -lGL
X_LIBS = -lXmu -lX11
SOCKET_LIBS =
OTHER_LIBS =
SO_EXT = so
PLUGIN_EXT = so
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
DBGF = -g
SHARED = -shared
ARCHARGS =
LINKARGS = -L/usr/X11R6/lib -L/usr/local/lib -rpath /usr/local/lib
DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
FREETYPE_LIB = -lfreetype
GLUT_LIB = -lglut
GL_LIBS = -lGLU -lGL
X_LIBS = -lXmu -lX11
SOCKET_LIBS =
OTHER_LIBS =
SO_EXT = so
PLUGIN_EXT = so
endif
#### Mac OSX specific definitions
ifeq ($(OS),MacOSX)
C++ = g++
DEPARG = ??
INC += -I/usr/local/include -I/sw/include
DEF += -D__DARWIN_OSX__
OPTF = -O2
DBGF = -g
SHARED = -shared
ARCHARGS =
LINKARGS = -all_load -L/usr/local/lib -L/usr/lib
DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
FREETYPE_LIB = -lfreetype
GLUT_LIB =
GL_LIBS =
X_LIBS =
SOCKET_LIBS =
OTHER_LIBS = -lm -ldl -lstdc++ -lobjc
SO_EXT = dylib
PLUGIN_EXT = so
FRAMEWORKS = -L/sw/lib \
-framework GLUT \
-framework Carbon \
-framework OpenGL
LIBS += $(FRAMEWORKS)
QUICKTIME = -framework QuickTime
TIFF_LIB = -ltiff
endif
#### Cygwin/Mingw specific definitions
ifeq ($(OS),CYGWIN_NT-5.0)
C++ = c++
DEPARG = -M
INC +=
DEF += -DWIN32 -W -Wall
OPTF = -O2
DBGF = -g
SHARED = -shared\
-Wl,--export-all-symbols \
-Wl,--output-def,lib$$TARGET_BASENAME.def \
-Wl,--out-implib,$(TOPDIR)/lib/lib$$TARGET_BASENAME.a \
ARCHARGS =
LINKARGS = -W -Wall
DYNAMICLIBRARYLIB =
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
GL_LIBS = -lglu32 -lopengl32
GLUT_LIB = -lglut32 $(GL_LIBS)
X_LIBS = -lgdi32 -luser32
OSGDB_LIBS = -losgdb_3ds \
-losgdb_bmp \
-losgdb_dw \
-losgdb_flt \
-losgdb_jpg \
-losgdb_lwo \
-losgdb_obj \
-losgdb_osg \
-losgdb_osgtgz \
-losgdb_pic \
-losgdb_png \
-losgdb_rgb \
-losgdb_tga \
-losgdb_tgz \
-losgdb_tiff \
-losgdb_zip
SOCKET_LIBS =
OTHER_LIBS = $(GL_LIBS)
SO_EXT = dll
PLUGIN_EXT = dll
LINK = cp -f
endif
VPATH=..