diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-09-16 12:42:53 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-09-17 12:54:03 +0800 |
commit | cadc4ad963b5392c6f6729f01f01e377ea1e8c41 (patch) | |
tree | 3904fd06ec8110dba0689ef39c8081854d86f366 | |
parent | 82c4af33b0d860e27f4c2d3b3d2401c7549de355 (diff) |
targets/egl: Use C++ compiler to link GL/ES state trackers.
Otherwise, applications compiled with C compiler might have trouble
using them.
-rw-r--r-- | src/gallium/targets/egl/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 78f7241199..47c24cefe5 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -185,6 +185,13 @@ $(MKLIB) -o $(notdir $@) -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \ $(common_SYS) $($(1)_SYS) endef +define mklib-cxx +$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ + -cplusplus -install $(OUTPUT_PATH) $(MKLIB_OPTIONS) $< \ + -Wl,--start-group $(common_LIBS) $($(1)_LIBS) -Wl,--end-group \ + $(common_SYS) $($(1)_SYS) +endef + # EGL driver $(OUTPUT_PATH)/egl_gallium.so: egl.o $(egl_LIBS) $(call mklib,egl) @@ -213,13 +220,13 @@ $(OUTPUT_PATH)/$(PIPE_PREFIX)swrast.so: pipe_swrast.o $(swrast_LIBS) # state trackers $(OUTPUT_PATH)/$(ST_PREFIX)$(GL_LIB).so: st_GL.o $(GL_LIBS) - $(call mklib,GL) + $(call mklib-cxx,GL) $(OUTPUT_PATH)/$(ST_PREFIX)$(GLESv1_CM_LIB).so: st_GLESv1_CM.o $(GLESv1_CM_LIBS) - $(call mklib,GLESv1_CM) + $(call mklib-cxx,GLESv1_CM) $(OUTPUT_PATH)/$(ST_PREFIX)$(GLESv2_LIB).so: st_GLESv2.o $(GLESv2_LIBS) - $(call mklib,GLESv2) + $(call mklib-cxx,GLESv2) $(OUTPUT_PATH)/$(ST_PREFIX)$(VG_LIB).so: st_OpenVG.o $(OpenVG_LIBS) $(call mklib,OpenVG) |