aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2011-02-18 12:49:09 -0500
committerJim Carroll <thecarrolls@jiminger.com>2011-02-18 12:49:09 -0500
commitc22dcafcb3984248d287f7eb310d651b6d67775e (patch)
treeb4b8cc6bbe03878debacc9079c564cd9ce435bb2 /Makefile.in
parent1b8d61c73eb55092a7f14c0630314840ea51afc9 (diff)
parent40c69e6fce868fdd5f0ca6e3d718a3368cd72aa6 (diff)
This fix uses a singleton pattern and some compiler/cpreprocessor sugar to allow "global" variables to be lazy instantiated and initialized and moved from the BSS segment to the heap (that is, they are instantiated on the heap when they are first used rather than relying on the startup code to initialize the BSS segment). This eliminates the problem associated with global variable dependencies across compilation units.
Reference counting from the BSS segment is used to destruct these globals at the time the last compilation unit that knows about it is finalized by the post-main shutdown. The book keeping is done by smuggling a smart pointer into every file that references a particular "global class" through the use of a 'static' declaration of an instance of that smart pointer in the header file of the global class (did you ever think you'd see a file scope 'static' variable in a header file - on purpose?) See xbmc/utils/ReferenceCounting.h/cpp. Currently I know, on Mac OS X, there is at least one more global in the LinuxVideoRenderer* that causes a CRITSEC error. I'll fix that on a subsequent update along with everything else in SystemGlobals.cpp. Conflicts: project/VS2010Express/XBMC.vcxproj.filters
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index aa8c10cd7b..35622b9dfb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -289,6 +289,8 @@ xbmc/powermanagement/linux/powermanagement_linux.a: force
$(MAKE) -C xbmc/powermanagement/linux
xbmc/powermanagement/osx/powermanagement.a: force
$(MAKE) -C xbmc/powermanagement/osx
+xbmc/windowing/X11/windowing_X11.a: force
+ $(MAKE) -C xbmc/windowing/X11
xbmc/rendering/rendering.a: force
$(MAKE) -C xbmc/rendering
xbmc/rendering/gl/rendering_gl.a: force
@@ -299,8 +301,6 @@ xbmc/windowing/windowing.a: force
$(MAKE) -C xbmc/windowing
xbmc/windowing/egl/windowing_egl.a: force
$(MAKE) -C xbmc/windowing/egl
-xbmc/windowing/X11/windowing_X11.a: force
- $(MAKE) -C xbmc/windowing/X11
xbmc/windowing/osx/windowing_osx.a: force
$(MAKE) -C xbmc/windowing/osx
xbmc/storage/storage.a: force
@@ -629,7 +629,7 @@ xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC)
ifeq ($(findstring osx,@ARCH@), osx)
$(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
else
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) -Wl,--no-whole-archive $(OBJSXBMC) $(LIBS) -rdynamic
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(LIBS) -rdynamic
endif
xbmc-xrandr: xbmc-xrandr.c