-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
117 lines (96 loc) · 3.73 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
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
117
version=1.0.14a
file=""
all: npm dist daidalus compile install-dependencies
@echo "\033[0;32m** To start DAA-Displays, type ./restart.sh in the command prompt and open a browser at http://localhost:8082 **\033[0m"
tsc: ts
ts:
# generate javascript files
npm run build
# copy html files
rsync src/*.html dist/
# copy images
rsync src/images/*.gif dist/images/
npm:
@npm install
# generate javascript files
npm run build
zip:
@echo "\033[0;32m** Creating a zip file with universal daa-displays distribution **\033[0m"
zip -9 -r daa-displays-$(version).zip ./dist/* ./daidalus-submodules/v1.0.2/* ./daidalus-submodules/v2.0.2/* ./*.json ./LICENSE ./CHANGELOG -x "*.DS_Store" "./dist/daa-output/*/*.json" "./dist/daa-logic/*.exe"
unzip -l daa-displays-$(version).zip > daa-displays-$(version).txt
dist:
@echo "\033[0;32m** Copying dist folder **\033[0m"
rsync src/daa-test/*.html dist/daa-test/
rsync src/restart.sh src/kill.sh src/README.md src/Makefile src/*.html src/package.json dist/
rsync -a src/LICENSES dist/
rsync -a src/daa-logic dist/
rsync -a src/daa-config dist/
rsync -a src/daa-scenarios dist/
rsync -a src/daa-output dist/
rsync -a src/images dist/
rsync -a src/aeronav dist/
rsync src/daa-server/daa-server.json src/daa-server/package.json src/daa-server/start-server.sh dist/daa-server/
-rsync src/daa-server/package-lock.json dist/daa-server
rsync -a src/daa-server/tileServer dist/daa-server
rsync -a src/daa-displays/svgs dist/daa-displays/
rsync -a src/daa-displays/ColladaModels dist/daa-displays/
rsync -a src/daa-displays/css dist/daa-displays/
rsync -a src/daa-displays/images dist/daa-displays/
rsync -a src/daa-displays/sounds dist/daa-displays/
rsync -a src/daa-displays/themes dist/daa-displays/
rsync -a src/daa-displays/wwd dist/daa-displays/
rsync -a src/contrib dist/
@echo "\033[0;32m** Done copying dist folder! **\033[0m"
# To compile particular releases of DAIDALUS in Java or CPP (by default everthing)
daidalus-releases=
only-danti=
only-java=$(only-danti)
only-cpp=
daidalus:
@echo "\033[0;32m** Making DAIDALUS submodules **\033[0m"
git submodule update --init --remote
@cd daidalus-submodules; make -e daidalus-releases=$(daidalus-releases) -e only-java=$(only-java) -e only-cpp=$(only-cpp)
@echo "\033[0;32m** Done making DAIDALUS submodules! **\033[0m"
compile:
@echo "\033[0;32m** Making Java and C++ applications **\033[0m"
cd dist && make clean compile -e daidalus-releases=$(daidalus-releases) -e only-java=$(only-java) -e only-cpp=$(only-cpp) -e only-danti=$(only-danti)
@echo "\033[0;32mDone making Java and C++ applications! \033[0m"
install-dependencies:
@echo "\033[0;32m** Installing dependencies **\033[0m"
@cd dist && make install-dependencies
@echo "\033[0;32mDone installing dependencies! \033[0m"
resolutions:
npm install -no-save npm-force-resolutions
node node_modules/npm-force-resolutions/index.js
clean:
@echo "\033[0;33m** Cleaning dist and daidalus-submodules folder **\033[0m"
cd daidalus-submodules; make clean
test ! -d dist || ( cd dist && make clean )
@echo "\033[0;33mDone cleaning! \033[0m"
delete-dist:
@echo "\033[0;33m** Removing dist folder, .class files, .jar files, and node_modules **\033[0m"
-@rm -rf dist
-@rm -rf node_modules
-@cd src && rm -rf node_modules
-@cd src/daa-server && rm -rf node_modules
-@cd src/daa-logic && make clean
@echo "\033[0;33m Done removing dist folder! \033[0m"
audit:
npm audit
cd src/daa-server && npm audit
audit-fix:
npm audit fix
cd src/daa-server && npm audit fix
maxlines=4096
# make split file=xxx.daa
split:
@( \
node dist/daa-displays/utils/daa-split.js $(file) $(maxlines)\
)
eslint:
npx eslint 'src/**/*.ts'
eslint-log:
npx eslint 'src/**/*.ts' > eslint.log
eslint-fix:
npx eslint --fix 'src/**/*.ts'
.PHONY: dist