From 9907b56e626ddff493bf4f232c2ae6fd9eb27bee Mon Sep 17 00:00:00 2001
From: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
Date: Sun, 13 Dec 2015 02:10:48 +0100
Subject: [PATCH] fixed incorrect way to pass linker parameters

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b52471f30..3d353ce25 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ CC = gcc
 LDLIBS  = -pthread -lrt -lm -lconfig -ls2ss
 
 CFLAGS += -std=gnu99 -Iinclude/ -I. -MMD -Wall -D_GIT_REV='"$(GIT_REV)"' -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1 -DV=$(V)
-LDFLAGS += -Wl,-L.,-rpath,'$$ORIGIN'
+LDFLAGS += -L. -Wl,-rpath,'$$ORIGIN'
 
 # pkg-config dependencies
 PKGS = libconfig
@@ -73,7 +73,7 @@ endif
 ifneq (,$(wildcard $(OPALDIR)/include_target/AsyncApi.h))
 	LIB_OBJS    += opal.o
 	LIB_CFLAGS  += -m32 -I$(OPALDIR)/include_target
-	LIB_LDFLAGS += -m32 -Wl,-L/lib/i386-linux-gnu/,-L/usr/lib/i386-linux-gnu/,-L$(OPALDIR)/lib/redhawk/
+	LIB_LDFLAGS += -m32 -L/lib/i386-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -L$(OPALDIR)/lib/redhawk/
 	LIB_LDLIBS  += -lOpalAsyncApiCore -lOpalCore -lOpalUtils -lirc
 endif