forked from asmuth-archive/libsmatrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (39 loc) · 1.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This file is part of the "libsmatrix" project
# (c) 2011-2013 Paul Asmuth <[email protected]>
#
# Licensed under the MIT License (the "License"); you may not use this
# file except in compliance with the License. You may obtain a copy of
# the License at: http://opensource.org/licenses/MIT
include src/Makefile.in
SHELL = /bin/sh
CC = clang
CFLAGS_ = $(CFLAGS) -Wall -Wextra -O3 -march=native -mtune=native -D NDEBUG -fPIC
LDFLAGS = -lpthread -lm -lruby
PREFIX = $(DESTDIR)/usr/local
LIBDIR = $(PREFIX)/lib
UNAME = $(shell uname)
SOURCES = src/smatrix.c src/smatrix_jni.c src/smatrix_ruby.c
all: src/smatrix.$(LIBEXT)
src/smatrix.$(LIBEXT):
cd src && make
install:
cp src/smatrix.$(LIBEXT) $(LIBDIR)
clean:
find . -name "*.o" -o -name "*.class" -o -name "*.so" -o -name "*.dylib" -o -name "*.bundle" | xargs rm
rm -rf src/java/target src/config.h src/smatrix_benchmark *.gem
ruby:
cd src/ruby && ruby extconf.rb
cd src/ruby && make
publish_ruby:
gem build src/ruby/libsmatrix.gemspec
mv *.gem src/ruby/
java:
cd src/java && make
publish_java: java
cd src/java && mvn deploy
benchmark: src/smatrix_benchmark
src/smatrix_benchmark full
src/smatrix_benchmark:
cd src && make smatrix_benchmark
test:
cd src/java && make test