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 3439272..0848839 100644
--- a/plugins_src/accel/Makefile
+++ b/plugins_src/accel/Makefile
@@ -30,9 +30,6 @@ BEAM = 	$(LIBDIR)/wpc_pnoise.beam \
 	$(LIBDIR)/pnoise.beam \
 	$(LIBDIR)/wpc_pick.beam
 
-UNIVERSAL_FLAGS =
-COMMON_CFLAGS = -Wall -Werror -O3
-
 ifdef USEMINGWGCC
  SO_EXT = dll
  LIBS = -shared
@@ -47,8 +44,7 @@ else
    GL_LIBS =
  else
    LIBS = -shared -fpic
-   GL_LIBS = -L/usr/local/lib -lGLU -lGL
-   CFLAGS = $(COMMON_CFLAGS)
+   GL_LIBS = -lGLU -lGL
  endif
 endif
 
@@ -72,7 +68,7 @@ $(LIBDIR)/%.beam: %.erl
 
 $(LIBDIR)/%.$(SO_EXT): %.c
 	install -d $(LIBDIR)
-	$(GCC) $(COMMON_CFLAGS) -I$(ERL_INC) -o $@ $< $(LIBS) $(GL_LIBS)
+	$(GCC) $(CFLAGS) -fPIC -I$(ERL_INC) -o $@ $< $(LIBS) $(GL_LIBS)
 
 clean:
 	rm -f $(TARGET_FILES)
diff --git a/plugins_src/jpeg/Makefile b/plugins_src/jpeg/Makefile
index 6707f35..43eb52f 100644
--- a/plugins_src/jpeg/Makefile
+++ b/plugins_src/jpeg/Makefile
@@ -73,9 +73,7 @@ else
 
 $(LIBDIR)/wings_jpeg_image_drv.so: wings_jpeg_image_drv.c
 	install -d $(LIBDIR)
-	$(GCC) -fPIC -o $(LIBDIR)/wings_jpeg_image_drv.so -I$(ERL_INC) \
-	-I/usr/local/include -L/usr/local/lib \
-  wings_jpeg_image_drv.c $(LIBS) -ljpeg
+	$(GCC) $(CFLAGS) -fPIC -o $(LIBDIR)/wings_jpeg_image_drv.so -I$(ERL_INC) wings_jpeg_image_drv.c $(LIBS) -ljpeg
 
 endif