-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (34 loc) · 1.28 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
46
47
48
49
XMPLIBS=libxmp.so libxmp.so.4 libxmp.so.4.4.2
XMPLIBSPATH=$(foreach lib,$(XMPLIBS),build/libxmp/lib/$(lib))
NODE=/home/tc/.nvm/versions/node/v8*/bin/node
all: xmp.js ./build/xmp-cli/src/xmp $(NODE)
xmp.js: src/xmp.cljs
rm -rf target out
./node_modules/.bin/lumo -K -D andare:0.7.0 build.cljs
node_modules: node
$(NODE) install
node: $(NODE)
$(NODE): ~/.nvm
export NVM_DIR="${HOME}/.nvm" && source "$$NVM_DIR/nvm.sh" && nvm install 8
touch node
build/libxmp/.git:
git clone https://github.com/cmatsuoka/libxmp.git build/libxmp
build/libxmp/configure: build/libxmp/.git
cd build/libxmp && autoconf
build/libxmp/Makefile: build/libxmp/configure
cd build/libxmp && ./configure
$(XMPLIBSPATH): build/libxmp/Makefile
cd build/libxmp && make
build/xmp-cli/.git:
git clone https://github.com/chr15m/xmp-cli.git build/xmp-cli
cd build/xmp-cli && git checkout sync-delay-api
build/xmp-cli/configure: build/xmp-cli/.git
cd build/xmp-cli && ./autogen.sh
build/xmp-cli/Makefile: build/xmp-cli/configure
cd build/xmp-cli && PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:`pwd`/../libxmp LDFLAGS=-L`pwd`/../libxmp/lib CFLAGS=-I`pwd`/../libxmp/include ./configure
./build/xmp-cli/src/xmp: $(XMPLIBSPATH) build/xmp-cli/Makefile
cd build/xmp-cli/ && make
.PHONY: clean
clean:
rm -f xmp.js
rm -rf target out