forked from ffmpegwasm/ffmpeg.wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 995 Bytes
/
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
all: dev
MT_FLAGS := -sUSE_PTHREADS -pthread
DEV_ARGS := --progress=plain
DEV_CFLAGS := --profiling
DEV_MT_CFLAGS := $(DEV_CFLAGS) $(MT_FLAGS)
PROD_CFLAGS := -O3 -msimd128
PROD_MT_CFLAGS := $(PROD_CFLAGS) $(MT_FLAGS)
clean:
rm -rf ./packages/core$(PKG_SUFFIX)/dist
.PHONY: build
build:
make clean PKG_SUFFIX="$(PKG_SUFFIX)"
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \
FFMPEG_ST="$(FFMPEG_ST)" \
FFMPEG_MT="$(FFMPEG_MT)" \
docker buildx build \
--build-arg EXTRA_CFLAGS \
--build-arg EXTRA_LDFLAGS \
--build-arg FFMPEG_ST \
-o ./packages/core$(PKG_SUFFIX) \
$(EXTRA_ARGS) \
.
build-st:
make build \
FFMPEG_ST=yes
build-mt:
make build \
PKG_SUFFIX=-mt \
FFMPEG_MT=yes
dev:
make build-st EXTRA_CFLAGS="$(DEV_CFLAGS)" EXTRA_ARGS="$(DEV_ARGS)"
dev-mt:
make build-mt EXTRA_CFLAGS="$(DEV_MT_CFLAGS)" EXTRA_ARGS="$(DEV_ARGS)"
prd:
make build-st EXTRA_CFLAGS="$(PROD_CFLAGS)"
prd-mt:
make build-mt EXTRA_CFLAGS="$(PROD_MT_CFLAGS)"