-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
38 lines (30 loc) · 942 Bytes
/
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
ifeq ($(SRCDIR),)
SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
endif
# Tips: you can set OUTPUT to Rime user directory in the command line
ifeq ($(OUTPUT),)
OUTPUT := $(SRCDIR)/output
endif
ifeq ($(PREFIX),)
PREFIX := /usr
endif
ifeq ($(RIME_DATA_DIR),)
RIME_DATA_DIR := $(PREFIX)/share/rime-data
endif
# `build_bin=1 make` would build binaries for input schemas enabled by default.
# Note this doesn't work for `extra`, because non of the extra input schemas are
# enabled by default.
all preset extra minimal:
$(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)$${build_bin:+-bin}
install clean:
$(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)
VERSION = $(shell date "+%Y%m%d")
dist:
git submodule update --init
$(MAKE) -C plum OUTPUT=$(OUTPUT) all
tar czf brise-$(VERSION).tar.gz \
--exclude=.git \
--exclude=output \
--exclude='brise-*.tar.gz' \
-C .. brise
.PHONY: all preset extra minimal install clean dist