Skip to content

Commit e495a13

Browse files
committed
Add static library target
1 parent 8dc206b commit e495a13

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif
1313

1414
all: train predict
1515

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

1919
train: newton.o linear.o train.c blas/blas.a
@@ -31,7 +31,10 @@ linear.o: linear.cpp linear.h
3131
blas/blas.a: blas/*.c blas/*.h
3232
make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)';
3333

34+
liblinear.a: linear.o newton.o
35+
ar -rcvs liblinear.a linear.o newton.o blas/*.o
36+
3437
clean:
3538
make -C blas clean
3639
make -C matlab clean
37-
rm -f *~ newton.o linear.o train predict liblinear.so.$(SHVER)
40+
rm -f *~ newton.o linear.o train predict liblinear.a liblinear.so.$(SHVER)

0 commit comments

Comments
 (0)