Skip to content

Commit

Permalink
fix makefile libs target
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Nov 21, 2021
1 parent 84a820c commit e6d92d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e6d92d8

Please sign in to comment.