-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
70 lines (53 loc) · 1.72 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
RTMIDI=`pkg-config --cflags --libs rtmidi`
SDL2=`sdl2-config --cflags --libs`
# SDL2=`../test/SDL/build/sdl2-config --cflags --libs`
SDL2_ttf=`pkg-config --cflags --libs SDL2_ttf`
LUA=`pkg-config --cflags --libs lua`
# SPI_DEV_MEM=`-lbcm2835 -lbcm_host -DUSE_SPI_DEV_MEM`
ifneq ($(shell uname -m),x86_64)
RPI := -DIS_RPI=1
BIN_PLATFORM := arm
else
PIXEL_SDL := $(SDL2)
BIN_PLATFORM := x86
endif
BUILD=-Wno-narrowing -ldl $(RTMIDI)
INC=-I.
# track header file to be sure that build is automatically trigger if any dependency changes
TRACK_HEADER_FILES = -MMD -MF pixel.$(BIN_PLATFORM).d
pixel: pixelLibs buildPixel runPixel
rebuildPixel: pixelRebuild buildPixel runPixel
sync:
bash sync.sh
make pixel
pixelLibs:
@echo "\n------------------ plugins ------------------\n"
make -C host
make -C plugins/audio
make -C plugins/components/Pixel
@echo "\nbuild plugins done."
pixelRebuild:
make -C host rebuild
make -C plugins/audio rebuild
make -C plugins/components/Pixel rebuild
buildPixel:
@echo "\n------------------ build zicPixel ------------------\n"
make pixel.$(BIN_PLATFORM)
pixel.$(BIN_PLATFORM):
g++ -g -fms-extensions -o pixel.$(BIN_PLATFORM) zicPixel.cpp -ldl $(INC) $(RPI) $(RTMIDI) $(PIXEL_SDL) $(SPI_DEV_MEM) $(LUA) $(TRACK_HEADER_FILES)
# Safeguard: include only if .d files exist
-include $(wildcard pixel.$(BIN_PLATFORM).d)
runPixel:
@echo "\n------------------ run zicPixel ------------------\n"
./pixel.$(BIN_PLATFORM)
dev:
rm -rf config/
npm run dev
push_wiki:
node doc.js
cd wiki && git add . && git commit -m "wiki" && git push
git add wiki && git commit -m "wiki" && git push
push:
node doc.js
cd wiki && git add . && git commit -m "wiki" || true && git push
git add . && git commit -m "$(m)" && git push