-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.mk.in
70 lines (53 loc) · 2.45 KB
/
Makefile.mk.in
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Read huginn/LICENSE.md file for copyright and licensing information.
$(eval DIR_ROOT?=$(subst /Makefile.mk.in,,$(lastword $(realpath $(foreach DIR,$(subst /, ,$(CURDIR)), $(eval DIR_ROOT_TEST=$(DIR_ROOT_TEST)/$(DIR))$(DIR_ROOT_TEST)/Makefile.mk.in)))))
PRJNAME = huginn
VERSION = 0
SUBVERSION = 0
EXTRAVERSION = 6
include $(DIR_ROOT)/_aux/mk/00_sanity.mk
include $(DIR_ROOT)/_aux/mk/10_basic.mk
include $(DIR_BUILD)/configure.mk
override EXTRA_LIBS:= $(filter-out -lyaal_hdata% -lyaal_hconsole%,$(EXTRA_LIBS))
LIBS = pthread
$(eval $(call NEW_TARGET,huginn,src,,@RDYNAMIC@))
DO_@DO_TARGET@=1
EXEC_NAME = 1exec
include $(DIR_ROOT)/_aux/inc-helper-pre.mk
override CXXFLAGS+= @DEFS@
override LXXFLAGS+= $(NO_AS_NEEDED)
override EXTRA_LIBRARY_PATHS=$(EXTRA_LXXFLAGS) -L$(PREFIX)/lib
include $(DIR_ROOT)/_aux/inc-helper-post.mk
CLOU_BIN=$(DIR_BUILD)/$(PRJNAME)/$(EXEC_NAME)
CLOU_CONF=$(DIR_ROOT)/$(PRJNAME)rc:$(PRJNAME)/rc \
$(DIR_ROOT)/src/init.sample:$(PRJNAME)/init \
$(DIR_ROOT)/src/init.shell.sample:$(PRJNAME)/init.shell \
$(DIR_ROOT)/src/rc.shell.sample:$(PRJNAME)/rc.shell
SOFTWARE=jupyter codemirror pygments vim/* emacs sublime geshi
CLOU_SHARE=$(foreach software,$(SOFTWARE),$(patsubst %,%::1,$(wildcard $(DIR_ROOT)/_deploy/$(software)/*)))
CLOU_MODULES=$(DIR_ROOT)/packages/*.hgn
CLOU_DOC=$(DIR_ROOT)/README.md $(DIR_ROOT)/LICENSE.md
CLOU_MAN=$(DIR_ROOT)/build/doc/$(PRJNAME).1
install-local:
@$(call invoke,ln -sf $(PRJNAME) $(DIR_BIN)/hgnsh && ln -sf $(PRJNAME).1 $(DIR_MAN)/man1/hgnsh.1)
uninstall-local:
@$(call invoke,rm -f $(DIR_BIN)/hgnsh $(DIR_MAN)/man1/hgnsh.1)
test: release
@cd ${DIR_ROOT} && \
HUGINNPATH=${DIR_ROOT}/packages ./build/release/huginn/1exec Testing tests && \
HUGINNPATH=${DIR_ROOT}/packages TARGET=release ./tests/linter.sh && \
TARGET=release verbose=yes ./tests/reformater-tests.sh && \
TARGET=release ./tests/shell-tests.sh
.PHONY: icons
ICONS_RES=32 64 128 256 512
ICONS_PNG=$(patsubst %,$(DIR_ROOT)/build/data/icons/huginn_%.png,$(ICONS_RES))
ICON_ICO=$(DIR_ROOT)/build/data/icons/huginn.ico
icons: $(ICON_ICO)
clean-icons:
@/bin/rm $(ICONS_PNG) $(ICON_ICO)
$(DIR_ROOT)/build/data/icons/huginn_%.png: $(DIR_ROOT)/src/huginn.svg
@$(MKDIR_P) $(DIR_ROOT)/build/data/icons \
&& convert -density 1000 -resize x$$(($(*)-$(*)/64)) -extent $(*)x$(*) -gravity center -background none $(<) $(@)
$(ICON_ICO): $(ICONS_PNG)
@$(MKDIR_P) $(DIR_ROOT)/build/data/icons \
&& convert $(ICONS_PNG) $(@)
# vim: ft=make