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 Feb 3, 2024
1 parent 8dc206b commit e495a13
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 @@ -13,7 +13,7 @@ endif

all: train predict

lib: linear.o newton.o blas/blas.a
lib: linear.o newton.o blas/blas.a liblinear.a
$(CXX) $(SHARED_LIB_FLAG) linear.o newton.o blas/blas.a -o liblinear.so.$(SHVER)

train: newton.o linear.o train.c blas/blas.a
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 e495a13

Please sign in to comment.