-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
87 lines (74 loc) · 2.41 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
GRDIR = /usr/local/gr
CONFIG = xft=no
UNAME := $(shell uname)
default: all
pre-check:
@lib/Precheck "${GRDIR}" || \
( echo "FATAL: Source and target directory are identical"; exit 1 )
Makedefs:
@lib/Preflight $(CONFIG) >Makedefs
all: pre-check
$(MAKE) -C lib/gks GRDIR=$(GRDIR)
$(MAKE) -C lib/gr GRDIR=$(GRDIR)
$(MAKE) -C lib/gr3 GRDIR=$(GRDIR)
$(MAKE) -C lib/grm GRDIR=$(GRDIR)
install: default
$(MAKE) -C lib/gks GRDIR=$(GRDIR) install
$(MAKE) -C lib/gr GRDIR=$(GRDIR) install
$(MAKE) -C lib/gr3 GRDIR=$(GRDIR) install
$(MAKE) -C lib/grm GRDIR=$(GRDIR) install
clean:
rm -f Makedefs
$(MAKE) -C lib/gks clean
$(MAKE) -C lib/gr clean
$(MAKE) -C lib/gr3 clean
$(MAKE) -C lib/grm clean
$(MAKE) -C 3rdparty clean
rm -f gr.pkg
realclean: clean
$(MAKE) -C 3rdparty realclean
rm -rf build
find packaging -type f \( -name '*.deb' -o -name '*.rpm' \) -exec rm \{\} \;
rm -rf tmp
self:
sh 3rdparty/makeself.sh
osxpkg:
mkdir -p tmp/bin tmp/gr
rsync -a /usr/local/gr/ tmp/gr/
ln -s ../gr/bin/gr tmp/bin/gr
ln -s ../gr/Applications/glgr.app/Contents/MacOS/glgr tmp/bin/glgr
ln -s ../gr/Applications/gksqt.app/Contents/MacOS/gksqt tmp/bin/gksqt
sudo chown -R -h root:wheel tmp/
pkgbuild --identifier de.fz-juelich.gr --root tmp --install-location /usr/local --ownership preserve gr.pkg
sudo rm -rf tmp
code-format:
ifeq ($(UNAME), Darwin)
@find -E . -type f \
-regex '.*\.(c|cpp|cxx|m|h|hpp|hxx)' \
! -path './3rdparty/*' \
! -path './apps/*' \
-exec clang-format -i -verbose -style=file {} \;
@CMAKE_FORMAT="$$(./.setup_cmakeformat.sh)" && \
find -E . -type f \
-regex '(.*/CMakeLists\.txt)|(.*\.cmake)' \
! -path './3rdparty/*' \
! -path './apps/*' \
-exec echo "Formatting "{} \; \
-exec "$${CMAKE_FORMAT}" -i {} \;
else
@find . -type f \
-regextype posix-extended \
-regex '.*\.(c|cpp|cxx|m|h|hpp|hxx)' \
! -path './3rdparty/*' \
! -path './apps/*' \
-exec clang-format -i -verbose -style=file {} \;
@CMAKE_FORMAT="$$(./.setup_cmakeformat.sh)" && \
find . -type f \
-regextype posix-extended \
-regex '(.*/CMakeLists\.txt)|(.*\.cmake)' \
! -path './3rdparty/*' \
! -path './apps/*' \
-exec echo "Formatting "{} \; \
-exec "$${CMAKE_FORMAT}" -i {} \;
endif
.PHONY: default pre-check all install clean realclean self osxpkg code-format