Skip to content

Commit

Permalink
Add static library target
Browse files Browse the repository at this point in the history
  • Loading branch information
berney committed Jan 13, 2021
1 parent e9037b8 commit b04ceea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OS = $(shell uname)

all: train predict

lib: linear.o newton.o blas/blas.a
lib: linear.o newton.o blas/blas.a liblinear.a
if [ "$(OS)" = "Darwin" ]; then \
SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \
else \
Expand All @@ -31,7 +31,10 @@ linear.o: linear.cpp linear.h
blas/blas.a: blas/*.c blas/*.h
make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)';

liblinear.a: linear.o newton.o
ar -rcvs liblinear.a linear.o newton.o blas/*.o

clean:
make -C blas clean
make -C matlab clean
rm -f *~ newton.o linear.o train predict liblinear.so.$(SHVER)
rm -f *~ newton.o linear.o train predict liblinear.a liblinear.so.$(SHVER)

0 comments on commit b04ceea

Please sign in to comment.