Integrated changes for MacOSX, submitted by Phil Atkin, with small mods by
Robert Osfield to maintain compatability under Linux.
This commit is contained in:
62
Make/makedefs.macosx
Normal file
62
Make/makedefs.macosx
Normal file
@@ -0,0 +1,62 @@
|
||||
MAKEDIR = $(OSGHOME)/Make
|
||||
INSTRULES = $(MAKEDIR)/instrules
|
||||
MAKEDEPEND = Makedepend
|
||||
OBJS = $(C++FILES:.cpp=.o) $(CFILES:.c=.o) $(YACCFILES:.y=.o) $(LEXFILES:.l=.o)
|
||||
|
||||
DEPFILES = $(OBJS:.o=.d)
|
||||
|
||||
C++ = cc
|
||||
YFLAGS = -d
|
||||
LCINCS += -I/usr/local/include
|
||||
LC++INCS += ${LCINCS}
|
||||
CFLAGS = -O2 -W -Wall $(LCINCS)
|
||||
C++FLAGS = ${CFLAGS}
|
||||
CPPFLAGS = ${CFLAGS}
|
||||
LIBTOOL = libtool
|
||||
LD = ld
|
||||
PLUGINLIBS = ../../../lib/osgPlugins/osgdb_rgb.so ../../../lib/osgPlugins/osgdb_3ds.so ../../../lib/osgPlugins/osgdb_osg.so
|
||||
MACOSXLIBS = ../../../lib/libosg.so ../../../lib/libosgUtil.so ../../../lib/libosgGLUT.so ../../../lib/libosgDB.so
|
||||
PLUGINS = $(PLUGINLIBS)
|
||||
|
||||
LDFLAGS = -all_load -framework GLUT -framework Carbon -L/usr/local/lib -L/usr/lib -L../../../lib/osgPlugins -ldl -lstdc++ -lm
|
||||
|
||||
|
||||
DYNAMICLIBRARYLIB =
|
||||
PFLIBS =
|
||||
|
||||
#
|
||||
# TARGET_DIRS are directories that would not exist on the system except
|
||||
# for the presence of OpenSceneGraph. 'make instclean' removes these
|
||||
# directories
|
||||
#
|
||||
TARGET_DIRS = \
|
||||
/usr/include/osg \
|
||||
/usr/include/osgDB \
|
||||
/usr/include/osgGLUT \
|
||||
/usr/include/osgUtil \
|
||||
/usr/share/OpenSceneGraph\
|
||||
/usr/share/OpenSceneGraph/data\
|
||||
/usr/share/OpenSceneGraph/data/Images\
|
||||
/usr/share/OpenSceneGraph/data/Test\
|
||||
/usr/lib/osgPlugins\
|
||||
|
||||
TARGET_BIN = /usr/bin
|
||||
TARGET_LIB = /usr/lib
|
||||
TARGET_INCLUDE = /usr/include
|
||||
TARGET_DATA = /usr/share/OpenSceneGraph/data
|
||||
|
||||
#
|
||||
# This definitions are necessary for IRIX. The following statement
|
||||
# does not work for smake using a sh:
|
||||
#
|
||||
# for variable in $(LIST); do ...; done
|
||||
#
|
||||
# .. if $(LIST) is a NULL variable. So we have to define 0 length
|
||||
# strings and check for them inside the for loop
|
||||
#
|
||||
|
||||
TARGET_LIB_FILES = ""
|
||||
TARGET_BIN_FILES = ""
|
||||
TARGET_INCLUDE_FILES = ""
|
||||
TARGET_DATA_FILES = ""
|
||||
TARGET_LOADER_FILES = ""
|
||||
59
Make/makerules.macosx
Normal file
59
Make/makerules.macosx
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
all : $(MAKEDEPEND) $(TARGET) $(LIB) $(DYLIB)
|
||||
|
||||
$(TARGET) : $(OBJS) $(PLUGINLIBS) $(MACOSXLIBS)
|
||||
$(C++) $(LDFLAGS) $(MACOSXLIBS) $(OBJS) $(PLUGINS) -o $@
|
||||
|
||||
$(LIB) : $(OBJS)
|
||||
$(LIBTOOL) -static -o $@ $(OBJS)
|
||||
|
||||
$(DYLIB) : $(OBJS)
|
||||
$(LIBTOOL) -static -o $@ $(OBJS)
|
||||
|
||||
clean :
|
||||
rm -f $(OBJS) core $(TARGET) $(MAKEDEPEND)
|
||||
touch $(MAKEDEPEND)
|
||||
|
||||
clobber : clean
|
||||
rm -f $(TARGET) a.out $(LIB)
|
||||
|
||||
to_unix :
|
||||
for f in *.cpp ; do to_unix $$f $$f; done
|
||||
for f in *.h ; do to_unix $$f $$f; done
|
||||
|
||||
# force it
|
||||
depend :
|
||||
$(C++) $(C++FLAGS) -M $(C++FILES) $(CFILES) > $(MAKEDEPEND)
|
||||
|
||||
$(MAKEDEPEND) : $(C++FILES) $(CFILES)
|
||||
$(C++) $(C++FLAGS) -M $(C++FILES) $(CFILES) > $(MAKEDEPEND)
|
||||
|
||||
%.o : %.cpp
|
||||
$(C++) $(C++FLAGS) -c $*.cpp -o $*.o
|
||||
|
||||
%.o : %.c
|
||||
$(C++) $(C++FLAGS) -c $*.c -o $*.o
|
||||
|
||||
docs:
|
||||
[ "$(TARGET_BASENAME)" != "" ] && \
|
||||
mkdir -p ../../doc/doc++/$(TARGET_BASENAME) && \
|
||||
doc++ -d ../../doc/doc++/$(TARGET_BASENAME) -H -A ../../include/$(TARGET_BASENAME)/* && \
|
||||
echo $(TARGET_BASENAME) HTML documentation created in ../../doc/doc++/$(TARGET_BASENAME)
|
||||
|
||||
install : home
|
||||
@ $(MAKE) __install
|
||||
|
||||
instlinks : home
|
||||
@ $(MAKE) __instlinks
|
||||
|
||||
instclean : home
|
||||
@ $(MAKE) __instclean
|
||||
|
||||
|
||||
home :
|
||||
@ [ -n "$(OSGHOME)" ] || (echo ; echo "-------------> Please define OSGHOME"; echo)
|
||||
@ [ -n "$(OSGHOME)" ] && echo > /dev/null;
|
||||
|
||||
sinclude $(INSTRULES)
|
||||
|
||||
include $(MAKEDEPEND)
|
||||
Reference in New Issue
Block a user