-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.28 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
.PHONY: all clean format debug release pull update
all: release
OSX_BUILD_UNIVERSAL_FLAG=
GENERATOR=
ifeq ($(GEN),ninja)
GENERATOR=-G "Ninja"
endif
ifeq (${OSX_BUILD_UNIVERSAL}, 1)
OSX_BUILD_UNIVERSAL_FLAG=-DOSX_BUILD_UNIVERSAL=1
endif
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 -DBUILD_TPCH_EXTENSION=1 ${OSX_BUILD_UNIVERSAL_FLAG}
pull:
git submodule init
git submodule update --recursive --remote
clean:
rm -rf build
debug: pull
mkdir -p build/debug && \
cd build/debug && \
cmake $(GENERATOR) -DCMAKE_BUILD_TYPE=Debug ${BUILD_FLAGS} ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=../../rocksdb_scanner -B. && \
cmake --build . --config Debug
# release: pull
# do not pull now that we changed a file in the duckdb folder..
release:
mkdir -p build/release && \
cd build/release && \
cmake $(GENERATOR) -DCMAKE_BUILD_TYPE=RelWithDebInfo ${BUILD_FLAGS} ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=../../rocksdb_scanner -B. && \
cmake --build . --config Release
test: release
./build/release/test/unittest --test-dir .
format:
cp duckdb/.clang-format .
find src -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
find . -iname CMakeLists.txt | xargs cmake-format -i
rm .clang-format
update:
git submodule update --remote --merge