forked from rtklibexplorer/RTKLIB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
116 lines (88 loc) · 2.26 KB
/
Copy pathmakefile
File metadata and controls
116 lines (88 loc) · 2.26 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#-------------------------------------------------------------------------------
#
# makefile
#
# Purpose:
#
# Linux make file for software libraries
#
# Last modified:
#
# 2021/06/10 AHA Created
# 2022/11/02 AHA Added clean-up of old Qt makefiles
# 2022/11/22 AHA Restored compilation of iers lib
# 2025/03/31 AHA Switch to cmake
# 2025/04/09 AHA Adapt build targets
# 2025/04/10 AHA Avoid using rm -rf *
#
#-------------------------------------------------------------------------------
# Paths
RTKLIB = .
RTKLIB_bin = $(RTKLIB)/bin
RTKLIB_bld = $(RTKLIB)/build
IERS = $(RTKLIB)/lib/iers/gcc
GENCRC = $(RTKLIB)/util/gencrc
GENIONO = $(RTKLIB)/util/geniono
LOGFILE = $(RTKLIB)/util/logfile
RNX2RTCM = $(RTKLIB)/util/rnx2rtcm
SIMOBS = $(RTKLIB)/util/simobs/gcc
TESTEPH = $(RTKLIB)/util/testeph
UTEST = $(RTKLIB)/test/utest
# Get number of parallel build jobs
ifneq ($(shell which nproc 2> /dev/null),)
NJOBS = $(shell nproc)
else
NJOBS = 1
endif
# Parallel compilation on Linux and Cygwin
PMAKE = make
OS = $(shell uname -o)
ifeq ($(OS),GNU/Linux)
PMAKE = make -j $(NJOBS)
endif
ifeq ($(OS),Cygwin)
PMAKE = make -j $(NJOBS)
endif
# Operating system dependent settings for qmake
ifeq ($(shell which qmake-qt5 2> /dev/null),)
QMAKE = qmake
else
QMAKE = qmake-qt5 # if qmake is not available (e.g. openSuse)
endif
# Targets
all: init apps_
utils: iers_ gencrc_ logfile_ rnx2rtcm_ simobs_ # geniono_ testeph_
test: test_
# Create directory tree
init:
if [ ! -d "$(RTKLIB_bin)" ]; then mkdir -p $(RTKLIB_bin); fi
if [ ! -d "$(RTKLIB_bld)" ]; then mkdir -p $(RTKLIB_bld); fi
test_:
cd $(UTEST); $(PMAKE) utest
iers_:
cd $(IERS); $(PMAKE)
apps_:
cd $(RTKLIB_bld); cmake ..; $(PMAKE)
gencrc_:
cd $(GENCRC); $(PMAKE)
geniono_:
cd $(GENIONO); $(PMAKE)
logfile_:
cd $(LOGFILE); $(PMAKE)
rnx2rtcm_:
cd $(RNX2RTCM); $(PMAKE)
simobs_:
cd $(SIMOBS); $(PMAKE)
testeph_:
cd $(TESTEPH); $(PMAKE)
# Clean up
clean:
if [ -d "$(RTKLIB_bld)" ]; then cd $(RTKLIB_bld); $(PMAKE) clean; rm -rf ./*; fi
cd $(IERS); make clean
cd $(UTEST); make clean
cd $(GENCRC); make clean
cd $(GENIONO); make clean
cd $(LOGFILE); make clean
cd $(RNX2RTCM); make clean
cd $(SIMOBS); make clean
cd $(TESTEPH); make clean