From 70f60c9c89b4773089c621faf0e5765d9488e9fa Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sun, 24 Oct 2010 14:06:50 +0100 Subject: Ensure -L$(TOP)/$(LIB_DIR) appears in link line before any -L in $LDFLAGS Ensure -L$(TOP)/$(LIB_DIR) (the staging dir for build products), appears in the link line before any -L in $LDFLAGS, so that we link driver we are building with libEGL we have just built, and not an installed version [olv: make a similar change to targets/egl] Signed-off-by: Jon TURNEY --- src/egl/drivers/Makefile.template | 4 ++-- src/gallium/targets/egl/Makefile | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/egl/drivers/Makefile.template b/src/egl/drivers/Makefile.template index 08e82c65e9b..47709e3c59f 100644 --- a/src/egl/drivers/Makefile.template +++ b/src/egl/drivers/Makefile.template @@ -24,8 +24,8 @@ $(EGL_DRIVER_PATH): $(EGL_DRIVER) $(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template @$(MKLIB) -o $(EGL_DRIVER) -noprefix \ - -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -L$(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \ + -linker '$(CC)' -ldflags '-L$(TOP)/$(LIB_DIR) $(LDFLAGS)' \ + $(MKLIB_OPTIONS) \ $(EGL_OBJECTS) $(EGL_LIBS) -l$(EGL_LIB) .c.o: diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile index 38e60dbafbf..57979c4e9d4 100644 --- a/src/gallium/targets/egl/Makefile +++ b/src/gallium/targets/egl/Makefile @@ -39,7 +39,7 @@ egl_CPPFLAGS := \ -I$(TOP)/src/gallium/state_trackers/egl \ -I$(TOP)/src/egl/main \ -DPIPE_PREFIX=\"$(PIPE_PREFIX)\" -DST_PREFIX=\"$(ST_PREFIX)\" -egl_SYS := -lm $(DLOPEN_LIBS) -L$(TOP)/$(LIB_DIR) -lEGL +egl_SYS := -lm $(DLOPEN_LIBS) -lEGL egl_LIBS := $(TOP)/src/gallium/state_trackers/egl/libegl.a ifneq ($(findstring x11, $(EGL_PLATFORMS)),) @@ -134,17 +134,17 @@ GL_LIBS := $(TOP)/src/mesa/libmesagallium.a # OpenGL ES 1.x state tracker GLESv1_CM_CPPFLAGS := -I$(TOP)/src/mesa -GLESv1_CM_SYS := $(DRI_LIB_DEPS) -L$(TOP)/$(LIB_DIR) -l$(GLESv1_CM_LIB) +GLESv1_CM_SYS := $(DRI_LIB_DEPS) -l$(GLESv1_CM_LIB) GLESv1_CM_LIBS := $(TOP)/src/mesa/libes1gallium.a # OpenGL ES 2.x state tracker GLESv2_CPPFLAGS := -I$(TOP)/src/mesa -GLESv2_SYS := $(DRI_LIB_DEPS) -L$(TOP)/$(LIB_DIR) -l$(GLESv2_LIB) +GLESv2_SYS := $(DRI_LIB_DEPS) -l$(GLESv2_LIB) GLESv2_LIBS := $(TOP)/src/mesa/libes2gallium.a # OpenVG state tracker OpenVG_CPPFLAGS := -I$(TOP)/src/gallium/state_trackers/vega -OpenVG_SYS := -lm -L$(TOP)/$(LIB_DIR) -l$(VG_LIB) +OpenVG_SYS := -lm -l$(VG_LIB) OpenVG_LIBS := $(TOP)/src/gallium/state_trackers/vega/libvega.a @@ -181,14 +181,16 @@ OUTPUTS := $(addprefix $(OUTPUT_PATH)/, $(OUTPUTS)) default: $(OUTPUTS) define mklib -$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \ +$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CC)' \ + -L$(TOP)/$(LIB_DIR) -ldflags '$(LDFLAGS)' \ -install $(OUTPUT_PATH) $(MKLIB_OPTIONS) $< \ -Wl,--start-group $(common_LIBS) $($(1)_LIBS) -Wl,--end-group \ $(common_SYS) $($(1)_SYS) endef define mklib-cxx -$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ +$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CXX)' \ + -L$(TOP)/$(LIB_DIR) -ldflags '$(LDFLAGS)' \ -cplusplus -install $(OUTPUT_PATH) $(MKLIB_OPTIONS) $< \ -Wl,--start-group $(common_LIBS) $($(1)_LIBS) -Wl,--end-group \ $(common_SYS) $($(1)_SYS) -- cgit v1.2.3