-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 891 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 891 Bytes
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
UNAME := $(shell uname)
# FIXME: pkg-config requires separating CMOzjpeg into distinct repository
ifeq ($(UNAME), Linux)
MOZJPEG_PREFIX = /opt/mozjpeg
MOZJPEG_LIB = $(MOZJPEG_PREFIX)/lib64
export LD_LIBRARY_PATH=$(MOZJPEG_LIB)
else
BREW_PREFIX := $(shell brew --prefix 2>/dev/null || echo /usr/local)
MOZJPEG_PREFIX = $(BREW_PREFIX)/opt/mozjpeg
MOZJPEG_LIB = $(MOZJPEG_PREFIX)/lib
endif
LDFLAGS = -Xlinker -lz -Xlinker -ljpeg -Xlinker -lturbojpeg -Xlinker -L$(MOZJPEG_LIB)
CFLAGS = -Xcc -DNDEBUG -Xcc -I$(MOZJPEG_PREFIX)/include
update:
swift package update
debug:
swift build -v -c debug $(LDFLAGS) $(CFLAGS)
release:
swift build -v -c release $(LDFLAGS) $(CFLAGS)
test:
TEST_FIXTURES_DIR=`pwd`/Resources/Samples/ swift test $(LDFLAGS) $(CFLAGS)
format:
swiftformat --disable redundantSelf ./Sources
lint:
swiftformat --lint --verbose --disable redundantSelf ./Sources