Blob Blame Raw
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 21 Mar 2013 18:53:10 +0400
Subject: [PATCH] Respect CFLAGS

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

diff --git a/plugins_src/accel/Makefile b/plugins_src/accel/Makefile
index 3877264d..2d0b599d 100644
--- a/plugins_src/accel/Makefile
+++ b/plugins_src/accel/Makefile
@@ -39,9 +39,6 @@ ERL_DIR := $(shell echo $(FRD) | erl | sed -n '/^=:/s/^=://p')
 ERL_INC = "$(ERL_DIR)/usr/include"
 BEAM = $(LIBDIR)/wpc_pick.beam
 
-UNIVERSAL_FLAGS =
-COMMON_CFLAGS = -Wall
-
 ifeq ($(UseMCL),true)
  OUT = -Fe:
  SO_EXT = dll
@@ -63,8 +60,7 @@ else
     GL_LIBS =
   else
     LIBS = -shared -fpic
-    GL_LIBS = -L/usr/local/lib -lGLU -lGL
-    CFLAGS = $(COMMON_CFLAGS) -Werror -O3
+    GL_LIBS = -lGLU -lGL
   endif
  endif
 endif
@@ -88,7 +84,7 @@ $(LIBDIR)/%.beam: %.erl
 
 $(LIBDIR)/%.$(SO_EXT): %.c
 	install -d $(LIBDIR)
-	$(GCC) $(CFLAGS) -I$(ERL_INC) $(OUT) $@ $< $(LIBS) $(GL_LIBS)
+	$(GCC) $(CFLAGS) -fPIC -I$(ERL_INC) -o $@ $< $(LIBS) $(GL_LIBS)
 
 clean:
 	rm -f $(TARGET_FILES) vc*.pdb wings_pick_drv.obj