Merge pull request #140 from holmanb/holmanb/fix-make-target
fix makefile libs target
This commit is contained in:
4
Makefile
4
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
|
examples/%: $(DIST) examples/%.c $(PROJ).c $(PROJ).h
|
||||||
$(CC) $(CFLAGS) $(filter-out $(DIST) $(PROJ).h, $^) -lm -o $(DIST)/$@
|
$(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)
|
ifneq ($(OS),Windows_NT)
|
||||||
$(CC) $(CFLAGS) -fPIC -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
|
$(CC) $(CFLAGS) -fPIC -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
|
||||||
else
|
else
|
||||||
$(CC) $(CFLAGS) -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
|
$(CC) $(CFLAGS) -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
|
||||||
endif
|
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
|
$(CC) $(CFLAGS) -c $(PROJ).c -o $(DIST)/$(PROJ).o
|
||||||
$(AR) rcs $(DIST)/lib$(PROJ).a $(DIST)/$(PROJ).o
|
$(AR) rcs $(DIST)/lib$(PROJ).a $(DIST)/$(PROJ).o
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user