-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCOMMONmakefile
More file actions
37 lines (26 loc) · 900 Bytes
/
COMMONmakefile
File metadata and controls
37 lines (26 loc) · 900 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
35
36
37
CPPTCL_LIBRARY = build/libcpptcl.so
all: $(CPPTCL_LIBRARY)
build/Makefile: CMakeLists.txt
(mkdir -p build; cd build; cmake -DTCL_VERSION_MINOR:STRING=$${TCL_VERSION_MINOR:-6} ..)
debug: CMakeLists.txt
(mkdir -p build; cd build; cmake -DCMAKE_BUILD_TYPE=Debug ..)
$(CPPTCL_LIBRARY): build/Makefile
(cd build; make)
install: all
(cd build; make install)
test: build/Makefile
(cd build; ctest)
examples: build/Makefile
(cd build; make examples)
clean:
rm -rf build build_xcode test/build
#
# We cannot control the tclsh link version. This depends on the installed alternatives.
#
test_extension: all
/usr/bin/env LD_LIBRARY_PATH=./build/examples TCLLIBPATH=./build/examples tclsh test/cpptcl_module_one.tcl
format:
find . -name \*.h -o -name \*.cc | xargs clang-format-4.0 -style=file -i
xcode:
mkdir -p build_xcode
(cd build_xcode; cmake -DCMAKE_BUILD_TYPE=Debug -G Xcode ..)