forked from khyperia/weechat-discord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.01 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
installdir=$(HOME)/.weechat
testdir=./test_dir
ifneq ($(wildcard /usr/include/openssl-1.0),)
export OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0
else ifneq ($(wildcard /usr/local/opt/openssl/include),)
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
endif
ifneq ($(wildcard /usr/lib/openssl-1.0),)
export OPENSSL_LIB_DIR=/usr/lib/openssl-1.0
else ifneq ($(wildcard /usr/local/opt/openssl/lib),)
export OPENSSL_LIB_DIR=/usr/local/opt/openssl/lib
endif
.PHONY: all install install_test test run format
all: src/*
cargo build --release
install: all | $(installdir)/plugins
cp target/release/libweecord.* $(installdir)/plugins
install_test: all | $(testdir)/plugins
cp target/release/libweecord.* $(testdir)/plugins
run: install
weechat -a
test: install_test
weechat -a -d $(testdir)
$(installdir):
mkdir $@
$(installdir)/plugins: | $(installdir)
mkdir $@
$(testdir):
mkdir $@
$(testdir)/plugins: | $(testdir)
mkdir $@
format:
cargo fmt -- --write-mode=overwrite
clang-format -style=mozilla -i src/*.c