]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
allow to override PIC_FLAGS and compiler std
authorSimon Sobisch <simonsobisch@web.de>
Mon, 6 May 2019 19:07:06 +0000 (21:07 +0200)
committerGitHub <noreply@github.com>
Mon, 6 May 2019 19:07:06 +0000 (21:07 +0200)
Makefile

index 93fffcccb24a88b1deeb1998bca297cfb42bfa0f..7368179d303b3a48955a1e04ad1365cca6f48f79 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,8 @@ INSTALL_LIBRARY_PATH = $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
 
 INSTALL ?= cp -a
 
+CC = gcc -std=c89
+
 # validate gcc version for use fstack-protector-strong
 MIN_GCC_VERSION = "4.9"
 GCC_VERSION := "`$(CC) -dumpversion`"
@@ -34,7 +36,8 @@ else
     CFLAGS += -fstack-protector
 endif
 
-R_CFLAGS = -fPIC -std=c89 -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat -Wundef -Wswitch-default -Wconversion $(CFLAGS)
+PIC_FLAGS = -fPIC
+R_CFLAGS = $(PIC_FLAGS) -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat -Wundef -Wswitch-default -Wconversion $(CFLAGS)
 
 uname := $(shell sh -c 'uname -s 2>/dev/null || echo false')