Blob Blame History Raw
--- Make.config.orig     2017-03-24 09:10:50.668087091 +0100
+++ Make.config  2017-03-24 09:15:20.450478199 +0100
@@ -83,11 +83,8 @@
   CFLAGS += -ggdb -fno-stack-protector -O0
 endif

-CFLAGS   += -fPIC -Wreturn-type -Wall -Wextra -Wparentheses -Wformat -pedantic \
-              -Wno-long-long -Wunused-variable -Wunused-label -Wno-unused-result \
-              -Wunused-value -Wunused-function -Wno-variadic-macros -Wunused-local-typedefs \
-              -Wno-unused-parameter -Werror=format-security \
-              -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += @@OPTFLAGS \
+          -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

 CFLAGS   += -std=c++11 -D__STDC_FORMAT_MACROS

--- epglv/Makefile.orig	2016-11-01 12:29:30.224997026 +0100
+++ epglv/Makefile	2016-11-01 12:54:44.588650263 +0100
@@ -7,18 +7,16 @@
 include ../Make.config
 
 ARCH := $(shell getconf LONG_BIT)
+INCLUDEDIR := /usr/include
+LIBDIR := @@LIBDIR
 
 ifneq (,$(findstring "arm", $(shell uname -m)))
-	CPP_FLAGS_32 := -m32
-	CPP_FLAGS_64 := -m64
+	CFLAGS:= @@OPTFLAGS \
+	-fPIC
 endif
 
-CPP_FLAGS := $(CPP_FLAGS_$(ARCH)) -Wall \
-	-fPIC \
-	-I/usr/local/include/mysql \
-	-L/usr/lib/mysql \
-	-L/usr/local/lib/mysql \
-	-I/usr/include/mysql \
+CPP_FLAGS := -I$(INCLUDEDIR)/mysql -fPIC \
+	-L$(LIBDIR)/mysql \
 	$(shell mysql_config --libs) \
 	-DMYSQL_DYNAMIC_PLUGIN \
 	-DDEBUG_MYSQL=0
@@ -32,7 +30,7 @@
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
-	$(CC) $(CPP_FLAGS) -pipe -O3 -shared -o $(TARGET) $(OBJS)
+	$(CC) $(CPP_FLAGS) $(CFLAGS) -shared -o $(TARGET) $(OBJS)
 
 install: $(TARGET)
 	strip $(TARGET)
@@ -50,7 +48,7 @@
 
 %.o: %.c
 src/%.o: src/%.c
-	$(CC) -c $(CPP_FLAGS) -pipe -O3 -shared $< -o $@
+	$(CC) -c $(CPP_FLAGS) $(CFLAGS) -shared $< -o $@
 
 #--------------------------------------------------------
 # dependencies