From e6d92d88f7f60eff02b7ae727b1555ba25a715e8 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Sun, 21 Nov 2021 12:05:21 -0700 Subject: [PATCH] fix makefile libs target --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20ec113..548b820 100644 --- a/Makefile +++ b/Makefile @@ -38,14 +38,14 @@ $(DIST)/test-static: $(TESTS) $(DIST)/lib$(PROJ).a $(PROJ).h tests/ptest.h examples/%: $(DIST) examples/%.c $(PROJ).c $(PROJ).h $(CC) $(CFLAGS) $(filter-out $(DIST) $(PROJ).h, $^) -lm -o $(DIST)/$@ -$(DIST)/lib$(PROJ).so: $(PROJ).c $(PROJ).h +$(DIST)/lib$(PROJ).so: $(DIST) $(PROJ).c $(PROJ).h 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 -$(DIST)/lib$(PROJ).a: $(PROJ).c $(PROJ).h +$(DIST)/lib$(PROJ).a: $(DIST) $(PROJ).c $(PROJ).h $(CC) $(CFLAGS) -c $(PROJ).c -o $(DIST)/$(PROJ).o $(AR) rcs $(DIST)/lib$(PROJ).a $(DIST)/$(PROJ).o