[PATCH] makefiles: use configured name for -ldrm* where possible
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Fri, 16 Nov 2012 17:50:57 +0000 (18:50 +0100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Fri, 16 Nov 2012 17:50:57 +0000 (18:50 +0100)
For precise lts support I had to do some magic with the library names, which works fine
as long as the libraries from pkg-config are used.

The parts with src/gallium/targets/va-*/Makefile will not apply on the master branch,
but do apply to the 9.0 branch.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Matt Turner <mattst88@gmail.com>
13 files changed:
configs/current.in
src/gallium/targets/dri-i915/Makefile
src/gallium/targets/dri-r300/Makefile
src/gallium/targets/dri-r600/Makefile
src/gallium/targets/dri-radeonsi/Makefile
src/gallium/targets/egl-static/Makefile
src/gallium/targets/gbm/Makefile
src/gallium/targets/pipe-loader/Makefile
src/gallium/targets/vdpau-r300/Makefile
src/gallium/targets/vdpau-r600/Makefile
src/gallium/targets/vdpau-radeonsi/Makefile
src/gallium/targets/xvmc-r300/Makefile
src/gallium/targets/xvmc-r600/Makefile

index 1802271f9add8cb9cd067483bd99c09e9a08fce6..62edfa5da90e7adcc026fdc5cc2aab4e51297e84 100644 (file)
@@ -144,7 +144,7 @@ GLAPI_LIB_DEPS = @GLAPI_LIB_DEPS@
 DRI_LIB_DEPS = @DRI_LIB_DEPS@
 GALLIUM_DRI_LIB_DEPS = @GALLIUM_DRI_LIB_DEPS@
 LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIB = @LIBDRM_LIBS@
+LIBDRM_LIBS = @LIBDRM_LIBS@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
 GLPROTO_CFLAGS = @GLPROTO_CFLAGS@
 EXPAT_INCLUDES = @EXPAT_INCLUDES@
index ddebff2d130d886711ed5d5fdf8ddf724712e0c6..a835ee7566c8cc95f51f782ea823fd35a7aca98b 100644 (file)
@@ -28,6 +28,6 @@ endif
 
 include ../Makefile.dri
 
-GALLIUM_DRI_LIB_DEPS += -ldrm_intel
+GALLIUM_DRI_LIB_DEPS += $(INTEL_LIBS)
 
 symlinks:
index 256aa233fac5fddc963c95087293ea2236b41de1..63a2956dcd18410335455df69b229bf7c81fef60 100644 (file)
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
 
 include ../Makefile.dri
 
-GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
+GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
 
 symlinks:
index 740275099e30805ac613fa63d5c5301fccd9441a..2499ede706a7c69ec503cdbe5421ffe00d88ae76 100644 (file)
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
 
 include ../Makefile.dri
 
-GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
+GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
 
 symlinks:
index b45f243b852724029870f8aafeadbdbce0c23686..588946e806a3805f7ea0691b38c4259057db3a65 100644 (file)
@@ -21,6 +21,6 @@ DRIVER_DEFINES = \
 
 include ../Makefile.dri
 
-GALLIUM_DRI_LIB_DEPS += -ldrm_radeon
+GALLIUM_DRI_LIB_DEPS += $(RADEON_LIBS)
 
 symlinks:
index f05c81d1959704dc01dd3adbb2f9676915020a5a..08626a9a80dd09178725f3f29ed7d908aaba01c6 100644 (file)
@@ -48,17 +48,17 @@ egl_SYS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) -lEGL -lm -lpthread
 ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
 egl_CPPFLAGS += $(LIBDRM_CFLAGS)
 egl_LIBS += $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a
-egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIB)
+egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
 endif
 ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
 egl_CPPFLAGS += $(LIBDRM_CFLAGS)
 egl_LIBS += $(TOP)/src/gallium/winsys/sw/wayland/libws_wayland.a
 egl_LIBS += $(TOP)/src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
-egl_SYS += $(LIBDRM_LIB) $(WAYLAND_LIBS)
+egl_SYS += $(LIBDRM_LIBS) $(WAYLAND_LIBS)
 endif
 ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
 egl_CPPFLAGS += $(LIBDRM_CFLAGS)
-egl_SYS += $(LIBDRM_LIB) -lgbm
+egl_SYS += $(LIBDRM_LIBS) -lgbm
 endif
 ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
 egl_LIBS += $(TOP)/src/gallium/winsys/sw/fbdev/libfbdev.a
@@ -93,7 +93,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_I915=1
 egl_LIBS += \
        $(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
        $(TOP)/src/gallium/drivers/i915/libi915.a
-egl_SYS += -ldrm_intel
+egl_SYS += $(INTEL_LIBS)
 endif
 
 # nouveau
@@ -105,7 +105,7 @@ egl_LIBS += \
        $(TOP)/src/gallium/drivers/nv50/libnv50.a \
        $(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
        $(TOP)/src/gallium/drivers/nouveau/libnouveau.a
-egl_SYS += -ldrm_nouveau
+egl_SYS += $(NOUVEAU_LIBS)
 endif
 
 # r300
@@ -115,7 +115,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R300=1
 egl_LIBS += \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/r300/libr300.a
-egl_SYS += -ldrm_radeon
+egl_SYS += $(RADEON_LIBS)
 endif
 endif
 
@@ -126,7 +126,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R600=1
 egl_LIBS += \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/r600/libr600.a
-egl_SYS += -ldrm_radeon
+egl_SYS += $(RADEON_LIBS)
 endif
 endif
 
@@ -137,7 +137,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
 egl_LIBS += \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/radeonsi/libradeonsi.a
-egl_SYS += -ldrm_radeon
+egl_SYS += $(RADEON_LIBS)
 endif
 endif
 
index 423debf176dd54ba5c41f6c73f51b35c4723678e..17d5648a1b31ee7c7af92f4a0c1ce428320c3cbc 100644 (file)
@@ -14,7 +14,7 @@ GBM_INCLUDES = \
               -I$(TOP)/src/gallium/winsys \
               -I$(TOP)/src/gallium/include
 
-GBM_LIBS = $(LIBUDEV_LIBS) $(LIBDRM_LIB) -lm \
+GBM_LIBS = $(LIBUDEV_LIBS) $(LIBDRM_LIBS) -lm \
           $(TOP)/src/gallium/state_trackers/gbm/libgbm.a \
           $(GALLIUM_PIPE_LOADER_LIBS) $(GALLIUM_AUXILIARIES)
 
index 596539cc7099b592ccb24e8ce67fb8b8459a6ae8..f15cd25030839ca860f58ff15da4aee52c9dc068 100644 (file)
@@ -24,7 +24,7 @@ PIPE_LIBS = \
        $(TOP)/src/gallium/drivers/rbug/librbug.a \
        $(GALLIUM_AUXILIARIES)
 
-PIPE_SYS = $(LIBDRM_LIB) -lm -lpthread $(DLOPEN_LIBS)
+PIPE_SYS = $(LIBDRM_LIBS) -lm -lpthread $(DLOPEN_LIBS)
 
 PIPE_CFLAGS = $(LIBDRM_CFLAGS)
 
@@ -34,7 +34,7 @@ PIPE_LDFLAGS = -Wl,--no-undefined
 i915_LIBS = \
        $(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
        $(TOP)/src/gallium/drivers/i915/libi915.a
-i915_SYS = -ldrm_intel
+i915_SYS = $(INTEL_LIBS)
 
 # nouveau pipe driver
 nouveau_LIBS = \
@@ -43,25 +43,25 @@ nouveau_LIBS = \
        $(TOP)/src/gallium/drivers/nv50/libnv50.a \
        $(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
        $(TOP)/src/gallium/drivers/nouveau/libnouveau.a
-nouveau_SYS = -ldrm_nouveau
+nouveau_SYS = $(NOUVEAU_LIBS)
 
 # r300 pipe driver
 r300_LIBS = \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/r300/libr300.a
-r300_SYS += -ldrm_radeon
+r300_SYS += $(RADEON_LIBS)
 
 # r600 pipe driver
 r600_LIBS = \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/r600/libr600.a
-r600_SYS += -ldrm_radeon
+r600_SYS += $(RADEON_LIBS)
 
 # radeonsi pipe driver
 radeonsi_LIBS = \
        $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
        $(TOP)/src/gallium/drivers/radeonsi/libradeonsi.a
-radeonsi_SYS += -ldrm_radeon
+radeonsi_SYS += $(RADEON_LIBS)
 
 # vmwgfx pipe driver
 vmwgfx_LIBS = \
index 1ada550af15a729650dc45089dd1e8fd6f8daed1..e79c920feb7dea5eab23eb74d7e30879e2a9b198 100644 (file)
@@ -21,7 +21,7 @@ C_SOURCES = \
        $(COMMON_GALLIUM_SOURCES) \
        $(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
+DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
 
 include ../Makefile.vdpau
 
index 05e0b4f45f1ed9f9f1f9a9dabb7eef1eb3999c1a..6ef7f901f3d0c3a76fe853a7f943e1d1f799e6de 100644 (file)
@@ -17,7 +17,7 @@ C_SOURCES = \
        $(COMMON_GALLIUM_SOURCES) \
        $(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
+DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
 
 include ../Makefile.vdpau
 
index 6dd2be9fc0fd82671f62220dac80e72dcf1065ef..4ff674361aa1d9da3ea2771bd3931925ff6db556 100644 (file)
@@ -23,7 +23,7 @@ C_SOURCES = \
 DRIVER_DEFINES = \
        -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP
 
-DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
+DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
 
 include ../Makefile.vdpau
 
index 800f8d5254c3b5f81c31fb391da0b43b377aa0ff..d2ab488694407b26a5e80e20bdc4d15a68375886 100644 (file)
@@ -17,7 +17,7 @@ C_SOURCES = \
        $(COMMON_GALLIUM_SOURCES) \
        $(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
+DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
 
 include ../Makefile.xvmc
 
index d9ce72f11dfbeb29e3d037e7720387b9da9a2e81..3ef5b1aef02d9a3135c621c574ec4553196e5569 100644 (file)
@@ -17,7 +17,7 @@ C_SOURCES = \
        $(COMMON_GALLIUM_SOURCES) \
        $(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon
+DRIVER_LIBS = $(LIBDRM_LIBS) $(RADEON_LIBS) -lXfixes
 
 include ../Makefile.xvmc