Fix error: "-fPIC ignored for target (all code is position independent)" for Windows build.

This commit is contained in:
flederwiesel 2019-11-19 12:19:49 +01:00
parent 2ee7048144
commit 8a2852bb86

View file

@ -27,13 +27,14 @@
CC?=$(CCARCH)gcc
STRIP?=$(CCARCH)strip
CFLAGS=-fPIC $(if $(DEBUG),-O0 -g,-O3) -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections
CFLAGS=$(if $(DEBUG),-O0 -g,-O3) -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections
LDFLAGS=-shared
ifeq ($(OS),Windows_NT)
EXT=dll
else
EXT=so
CFLAGS += -fPIC
LDFLAGS += -Wl,--hash-style=gnu
endif