#
#ENABLE_OPTIMIZED = 1
+
+# Figure out how to do platform specific stuff on this platform. This is really
+# gross and should be autoconfiscated (automake actually), but should hopefully
+# work on Linux and solaris (SunOS).
+#
+UNAME := $(shell uname)
+include $(LEVEL)/Makefile.$(UNAME)
+
ifdef SHARED_LIBRARY
# if SHARED_LIBRARY is specified, the default is to build the dynamic lib
dynamic ::
LinkG := $(Link) -g -L $(LIBDEBUG)
LinkO := $(Link) -O3 -L $(LIBRELEASE)
-# Create a .so file from a .o files...
-#MakeSO := $(CXX) -shared $(PROFILE)
-MakeSO := $(CXX) -G $(PROFILE)
-MakeSOO := $(MakeSO) -O3
-
# Create one .o file from a bunch of .o files...
Relink = ld -r
+# MakeSO - Create a .so file from a .o files...
+MakeSO := $(CXX) $(MakeSharedObjectOption) $(PROFILE)
+MakeSOO := $(MakeSO) -O3
+
# Create dependancy file from CPP file, send to stdout.
Depend := $(CXX) -MM -I$(LEVEL)/include $(CPPFLAGS)
ifdef LIBRARYNAME
+# Make sure there isn't any extranous whitespace on the LIBRARYNAME option
+LIBRARYNAME := $(strip $(LIBRARYNAME))
+
LIBNAME_O := $(LIBRELEASE)/lib$(LIBRARYNAME).so
LIBNAME_G := $(LIBDEBUG)/lib$(LIBRARYNAME).so
LIBNAME_AO := $(LIBRELEASE)/lib$(LIBRARYNAME).a