forked from rime/librime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.xcode
33 lines (24 loc) · 907 Bytes
/
Makefile.xcode
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
RIME_ROOT = $(CURDIR)
RIME_COMPILER_OPTIONS = CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++"
.PHONY: all release debug clean test thirdparty
all: release
release:
cmake . -Bxbuild -GXcode -DBUILD_STATIC=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
cmake --build xbuild --config Release
debug:
cmake . -Bxdebug -GXcode -DBUILD_STATIC=ON -DBUILD_SEPARATE_LIBS=ON
cmake --build xdebug --config Debug
clean:
rm -rf xbuild > /dev/null 2>&1 || true
rm -rf xdebug > /dev/null 2>&1 || true
rm build.log > /dev/null 2>&1 || true
rm -f thirdparty/lib/* > /dev/null 2>&1 || true
make -f Makefile.thirdparty clean-src
test: release
(cd xbuild/test; LD_LIBRARY_PATH=../lib/Release Release/rime_test)
test-debug: debug
(cd xdebug/test; Debug/rime_test)
thirdparty:
$(RIME_COMPILER_OPTIONS) make -f Makefile.thirdparty
thirdparty/%:
make -f Makefile.thirdparty $(@:thirdparty/%=%)