Skip to content

Commit

Permalink
Use tabs instead of spaces in Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
vemakereporter authored Aug 7, 2019
1 parent 8cf2c1d commit 217a551
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ check: test-file test-static test-dynamic
LD_LIBRARY_PATH=$(DIST) ./$(DIST)/test-dynamic

test-file: $(DIST) $(TESTS) $(PROJ).c mpc.h tests/ptest.h
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) $(PROJ).c -lm -o $(DIST)/test-file
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) $(PROJ).c -lm -o $(DIST)/test-file

test-dynamic: $(DIST) $(TESTS) lib$(PROJ).so mpc.h tests/ptest.h
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) -lm -L$(DIST) -l$(PROJ) -o $(DIST)/test-dynamic
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) -lm -L$(DIST) -l$(PROJ) -o $(DIST)/test-dynamic

test-static: $(DIST) $(TESTS) lib$(PROJ).a mpc.h tests/ptest.h
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) -lm -L$(DIST) -l$(PROJ) -static -o $(DIST)/test-static
$(CC) $(filter-out -Werror, $(CFLAGS)) $(TESTS) -lm -L$(DIST) -l$(PROJ) -static -o $(DIST)/test-static

examples/%: $(DIST) examples/%.c $(PROJ).c mpc.h
$(CC) $(CFLAGS) $(filter-out $(DIST), $^) -lm -o $(DIST)/$@
$(CC) $(CFLAGS) $(filter-out $(DIST), $^) -lm -o $(DIST)/$@

lib$(PROJ).so: $(DIST) $(PROJ).c mpc.h
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
$(CC) $(CFLAGS) -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
$(CC) $(CFLAGS) -shared $(PROJ).c -o $(DIST)/lib$(PROJ).so
endif

lib$(PROJ).a: $(DIST) $(PROJ).c mpc.h
$(CC) $(CFLAGS) -c $(PROJ).c -o $(DIST)/$(PROJ).o
$(AR) rcs $(DIST)/lib$(PROJ).a $(DIST)/$(PROJ).o
$(CC) $(CFLAGS) -c $(PROJ).c -o $(DIST)/$(PROJ).o
$(AR) rcs $(DIST)/lib$(PROJ).a $(DIST)/$(PROJ).o

libs: lib$(PROJ).so lib$(PROJ).a

Expand Down

0 comments on commit 217a551

Please sign in to comment.