summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody Schafer2018-10-29 16:30:55 -0400
committerCody Schafer2018-10-29 16:30:55 -0400
commit6773f25306c23c36e2efcbb3b60481d660c25356 (patch)
tree5f46963b89fcb22351a661a75f5831dd8fbbffef
parent38a6f37e84b04e3fbbd348136a7a517dac4e7114 (diff)
downloadaur-6773f25306c23c36e2efcbb3b60481d660c25356.tar.gz
add missing file
-rw-r--r--0001-rework-Makefile-to-allow-overriding-CFLAGS-when-pack.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/0001-rework-Makefile-to-allow-overriding-CFLAGS-when-pack.patch b/0001-rework-Makefile-to-allow-overriding-CFLAGS-when-pack.patch
new file mode 100644
index 00000000000..86b7e4dc456
--- /dev/null
+++ b/0001-rework-Makefile-to-allow-overriding-CFLAGS-when-pack.patch
@@ -0,0 +1,45 @@
+From 5d9cfe38465ae99b510eeff0e5145cac3b11cba2 Mon Sep 17 00:00:00 2001
+From: Cody Schafer <cody@berkshiregrey.com>
+Date: Mon, 29 Oct 2018 16:05:51 -0400
+Subject: [PATCH] rework Makefile to allow overriding CFLAGS when packaging
+
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6adc84f..355f5d6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,8 +14,8 @@ OPTIMIZE = -O3
+ WARN = -Wall -Wextra -pedantic
+ CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE
+ CINCS += -I${INC} -I${VENDOR} -I${BUILD}
+-CFLAGS += -std=c99 -g ${WARN} ${CDEFS} ${OPTIMIZE} ${CINCS}
+-CFLAGS += -fPIC
++CFLAGS ?= -g ${WARN} ${OPTIMIZE}
++PKG_CFLAGS = -std=c99 -fPIC ${CINCS} ${CDEFS} ${CFLAGS}
+
+ # Note: -lm is only needed if using built-in floating point generators
+ LDFLAGS += -lm
+@@ -23,7 +23,7 @@ LDFLAGS += -lm
+ all: ${BUILD}/lib${PROJECT}.a
+ all: ${BUILD}/test_${PROJECT}
+
+-TEST_CFLAGS += ${CFLAGS} -I${SRC}
++TEST_CFLAGS += ${PKG_CFLAGS} -I${SRC}
+ TEST_LDFLAGS += ${LDFLAGS}
+
+ OBJS= ${BUILD}/theft.o \
+@@ -74,7 +74,7 @@ ${BUILD}/test_${PROJECT}: ${OBJS} ${TEST_OBJS}
+ ${CC} -o $@ ${OBJS} ${TEST_OBJS} ${TEST_CFLAGS} ${TEST_LDFLAGS}
+
+ ${BUILD}/%.o: ${SRC}/%.c ${SRC}/*.h ${INC}/* | ${BUILD}
+- ${CC} -c -o $@ ${CFLAGS} $<
++ ${CC} -c -o $@ ${PKG_CFLAGS} $<
+
+ ${BUILD}/%.o: ${TEST}/%.c ${SRC}/*.h ${INC}/* | ${BUILD}
+ ${CC} -c -o $@ ${TEST_CFLAGS} $<
+--
+2.19.1
+