-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
39 lines (28 loc) · 1.07 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
UNAME := $(shell uname)
# FIXME: pkg-config requires separating CMOzjpeg into distinct repository
export LD_LIBRARY_PATH=/opt/mozjpeg/lib64/
ifeq ($(UNAME), Linux)
PREFIX=/
LDFLAGS = -Xlinker -lz -Xlinker -ljpeg -Xlinker -lturbojpeg -Xlinker -L${PREFIX}opt/mozjpeg/lib64
CFLAGS = -Xcc -DNDEBUG -Xcc -I${PREFIX}opt/mozjpeg/include
else
PREFIX=/usr/local/
LDFLAGS = -Xlinker -lz -Xlinker -ljpeg -Xlinker -lturbojpeg -Xlinker -L${PREFIX}opt/[email protected]/lib
CFLAGS = -Xcc -DNDEBUG -Xcc -I${PREFIX}opt/[email protected]/include
endif
update:
swift package update
xcode:
swift package generate-xcodeproj --xcconfig-overrides custom-settings.xcconfig
@echo "Add manually TEST_FIXTURES_DIR env to the project in XCode"
@echo "TEST_FIXTURES_DIR=`pwd`/Resources/Samples"
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