[cardcity] service drafts
[myCabin.git] / Makefile
blob857cf056c4100c4fa82481be076302559e99ea28
1 # Copyright (c) 2018, Jack J. Mao
2 # All rights reserved.
3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file.
6 projs_mk = souls2d
7 projs_go = etc/default-etc \
8 etc/default-ports \
9 logfileserv \
10 jormungandr/jormgate \
11 jormungandr/jormhub \
12 persiskv \
13 10words \
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
19 projs_ts = ksarts
21 PREFIX ?= /usr/local/opt/mycabin
22 MYROOT ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
25 .POSIX:
27 .PHONY: all install vender node_modules $(projs_mk) $(projs_go) $(projs_ts)
30 all: $(projs_mk) $(projs_go) $(projs_ts)
32 install:
33 ( \
34 mkdir -p $(PREFIX) && \
35 cp -r bin etc lib srv $(PREFIX)/ && \
36 cp supervisorctl.sh supervisord.sh README.md LICENSE $(PREFIX)/ \
39 vendor:
40 ( cd "src/func.xyz" && \
41 GOPATH="$(MYROOT)" \
42 GOBIN="$(MYROOT)/bin" \
43 GOCACHE="$(MYROOT)/.cache/go-build" \
44 go mod vendor \
47 node_modules:
48 ( cd "src/func.xyz" && \
49 npm install \
52 $(projs_mk):
53 ( cd "src/func.xyz/$@" && \
54 $(MAKE) PREFIX="$(MYROOT)" && $(MAKE) install PREFIX="$(MYROOT)" \
57 $(projs_go):
58 ( cd "src/func.xyz/$@" && \
59 GOPATH="$(MYROOT)" \
60 GOBIN="$(MYROOT)/bin" \
61 GOCACHE="$(MYROOT)/.cache/go-build" \
62 go install . \
65 $(projs_ts):
66 ( cd "src/func.xyz/$@" && \
67 tsc -b . && rollup -c \