#
#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 ::
PROFILE =
endif
+# Allow gnu extensions...
+CPPFLAGS += -D_GNU_SOURCE
+
# -Wno-unused-parameter
CompileCommonOpts := $(PROFILE) -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
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)
$(VERB) rm -f $(TOOLEXENAMES)
$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(BUILD_ROOT_TOP)/tools/Debug/.dir
+ @echo ======= Linking $(TOOLNAME) debug executable =======
$(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(TOOLLINKOPTS)
$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(BUILD_ROOT_TOP)/tools/Release/.dir
+ @echo ======= Linking $(TOOLNAME) release executable =======
$(VERB) $(LinkO) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_O) $(TOOLLINKOPTS)
endif