From 147545a488dbc353be3c5f9a4484c967e167bbdf Mon Sep 17 00:00:00 2001 From: halosghost Date: Wed, 29 May 2019 19:39:33 -0500 Subject: [PATCH] preliminarily detect windows platforms and call -fPIC accordingly --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index aa890bb..fd3460b 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,11 @@ examples/%: $(DIST) examples/%.c $(PROJ).c $(CC) $(CFLAGS) $(filter-out $(DIST), $^) -lm -o $(DIST)/$@ lib$(PROJ).so: $(DIST) $(PROJ).c +ifneq ($(OS),Windows_NT) $(CC) $(CFLAGS) -fPIC -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so +else + $(CC) $(CFLAGS) -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so +endif lib$(PROJ).a: $(DIST) $(PROJ).c $(CC) $(CFLAGS) -c $(PROJ).c -o $(DIST)/$(PROJ).o