1 # Copyright (c) 2018, Jack J. Mao
3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file.
7 projs_go
= etc
/default-etc \
10 jormungandr
/jormgate \
14 the-story
/mytao-sshd \
15 the-story
/mytao-pangea \
16 cardcity
/cmd
/cardcity-updater \
17 cardcity
/cmd
/cardcity-cron \
18 cardcity
/cmd
/cardcity-gate
21 PREFIX ?
= /usr
/local
/opt
/mycabin
22 MYROOT ?
= $(dir $(abspath
$(lastword
$(MAKEFILE_LIST
))))
27 .PHONY
: all install vender node_modules
$(projs_mk
) $(projs_go
) $(projs_ts
)
30 all: $(projs_mk
) $(projs_go
) $(projs_ts
)
34 mkdir
-p
$(PREFIX
) && \
35 cp
-r bin etc lib srv
$(PREFIX
)/ && \
36 cp supervisorctl.sh supervisord.sh README.md LICENSE
$(PREFIX
)/ \
40 ( cd
"src/func.xyz" && \
42 GOBIN
="$(MYROOT)/bin" \
43 GOCACHE
="$(MYROOT)/.cache/go-build" \
48 ( cd
"src/func.xyz" && \
53 ( cd
"src/func.xyz/$@" && \
54 $(MAKE
) PREFIX
="$(MYROOT)" && $(MAKE
) install PREFIX
="$(MYROOT)" \
58 ( cd
"src/func.xyz/$@" && \
60 GOBIN
="$(MYROOT)/bin" \
61 GOCACHE
="$(MYROOT)/.cache/go-build" \
66 ( cd
"src/func.xyz/$@" && \
67 tsc
-b .
&& rollup
-c \