Skip to content

Commit

Permalink
Added install target to makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidski committed Dec 7, 2016
1 parent 2fdc614 commit 6a78fdf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CXX ?= g++
CFLAGS = -Wall -Wconversion -O3 -fPIC
SHVER = 2
OS = $(shell uname)
PREFIX = /usr/local

all: svm-train svm-predict svm-scale

Expand All @@ -23,3 +24,11 @@ svm.o: svm.cpp svm.h
$(CXX) $(CFLAGS) -c svm.cpp
clean:
rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)

install: all
test -d $(PREFIX) || mkdir -p $(PREFIX)
test -d $(PREFIX)/include || mkdir -p $(PREFIX)/include
test -d $(PREFIX)/lib || mkdir -p $(PREFIX)/lib
install -m 0644 svm.h $(PREFIX)/include
install -m 0755 svm.o $(PREFIX)/lib

0 comments on commit 6a78fdf

Please sign in to comment.