-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathMakefile.init
125 lines (106 loc) · 5.22 KB
/
Makefile.init
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
118
119
120
121
122
123
124
125
default: all
fix_revision :
@if command -v git 2>&1 > /dev/null && git status 2>&1 > /dev/null; then \
echo "\"`git rev-parse HEAD`\"" > dist_revision_info; \
echo "\"`git rev-parse --abbrev-ref HEAD`\"" >> dist_revision_info; \
fi
all: fix_revision
@if ! autoreconf -m -iv --warning=none > autoreconf_log 2>&1; then \
if `grep -q"required directory" autoreconf_log`; then \
grep -h "required directory" autoreconf_log | awk -F'directory' {'print $$2'} | awk {'print $$1'} | sort | uniq | while read -r line; do mkdir -v $$line; done; \
if ! autoreconf -m -iv --warning=none; then \
cat autoreconf_log; \
exit 1;\
fi\
else \
cat autoreconf_log; \
exit 1;\
fi \
fi
@if test -e git_polimi_placeholder; then \
if ! test -e ext/flopoco/configure.ac; then \
git submodule update --init --recursive; \
fi; \
fi
clean:
rm -rf config.* configure.scan depcomp install-sh ltmain.sh missing mkinstalldirs autom4te.cache auxdir autoscan.log aclocal.m4 configure ylwrap
cleanIN:
for a in `find . -iname Makefile.in `; do rm -f "$$a"; done
cleanOrig:
for a in `find . -iname "*.orig" `; do rm -f "$$a"; done
cleanAll: clean cleanIN cleanOrig
for a in `find . -iname "*~" `; do rm -f "$$a"; done
checkCompile :
make -f etc/scripts/Makeall all CHECKS_FILE=./check_compilation
J ?= $(shell grep -c ^processor /proc/cpuinfo)
CONFIGURE_OPTIONS:=--enable-flopoco --enable-opt --enable-release
export LM_LICENSE_FILE=
dist :
make -f etc/scripts/Makeall dist CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)"
distclean :
@for dir in `find -name autom4te.cache`; do rm -r "$$dir"; done;
@for file in `find src -name Makefile.in`; do rm "$$file"; done;
@for file in `find -name test-driver`; do rm "$$file"; done;
@for file in `find ext -name aclocal.m4`; do rm "$$file"; done;
@rm -rf aclocal.m4 ar-lib autoreconf_log compile {,l}config.* configure depcomp install-sh ltmain.sh missing ylwrap
@rm -rf etc/aclocal.m4 etc/autoreconf_log etc/config.h.in etc/config.h.in~ etc/configure
@rm -rf etc/macros/libtool.m4 etc/macros/lt~obsolete.m4 etc/macros/ltoptions.m4 etc/macros/ltsugar.m4 etc/macros/ltversion.m4
@rm -rf etc/scripts/.test_panda.py.swp
@rm -rf ext/autoreconf_log ext/config.h.in ext/config.h.in~ ext/configure
@rm -rf ext/abseil-cpp/configure
@rm -rf ext/Coin-Cbc/missing
@rm -rf ext/flopoco/config.h.in ext/flopoco/config.h.in~ ext/flopoco/configure ext/flopoco/configure.ac ext/flopoco/m4 ext/flopoco/Makefile.am ext/flopoco/src/FPExpressions/ExpressionParser.h ext/flopoco/src/FPExpressions/FlopocoScanner.h ext/flopoco/src/Makefile.am
@rm -rf ext/libfplll-4.0.3/config.h.in ext/libfplll-4.0.3/config.h.in~ ext/libfplll-4.0.3/configure
@rm -rf ext/sollya/config.h.in ext/sollya/config.h.in~ ext/sollya/configure ext/sollya/m4/l*
install : all
@mkdir -p build
@cd build
@../configure $(CONFIGURE_OPTIONS) --prefix=$(pwd)/panda_installations
@if [ $$? != 0 ]; then \
false; \
exit; \
fi
@make -j$J
@if [ $$? != 0 ]; then \
false; \
exit; \
fi
@make install
@if [ $$? != 0 ]; then \
false; \
exit; \
fi
@make check -j$J
@if [ $$? != 0 ]; then \
false; \
exit; \
fi
compose-up :
@docker compose -f .devcontainer/docker-compose.yml up -d
compose-stop :
@docker compose -f .devcontainer/docker-compose.yml stop -t 0
compose-down :
@docker compose -f .devcontainer/docker-compose.yml down
buildenv-sync : compose-up fix_revision
@echo "Syncing local environment..."
@docker compose -f .devcontainer/docker-compose.yml exec buildenv rsync -avuq --filter=':- .gitignore' --exclude='/.git*' /mirror/ /workspace/
@echo "Sync completed"
buildenv-shell : buildenv-sync
@docker compose -f .devcontainer/docker-compose.yml exec -i -e J=$J buildenv bash
@docker compose -f .devcontainer/docker-compose.yml stop -t 0
buildenv-build : buildenv-sync
@echo "Configure options: $(APP_CONFIGURE)"
@docker compose -f .devcontainer/docker-compose.yml exec -e J=$J buildenv bash /workspace/.devcontainer/library-scripts/appimage-build.sh /panda_dist/distdir /panda_dist/bambu.AppImage $(APP_CONFIGURE)
@docker compose -f .devcontainer/docker-compose.yml exec buildenv chown -R $(shell id -u):$(shell id -g) /panda_dist/distdir || true
@docker compose -f .devcontainer/docker-compose.yml stop -t 0
buildenv-setup : buildenv-sync
@docker compose -f .devcontainer/docker-compose.yml exec buildenv bash /workspace/.devcontainer/library-scripts/compiler-download.sh / $(APP_COMPILERS) /compilers
@docker compose -f .devcontainer/docker-compose.yml exec buildenv bash /workspace/.devcontainer/library-scripts/compiler-setup.sh
@docker compose -f .devcontainer/docker-compose.yml exec buildenv bash /workspace/.devcontainer/library-scripts/appimage-setup.sh /panda_dist/distdir $(APP_COMPILERS) /compilers
@echo "Initializing PandA build environment"
@docker compose -f .devcontainer/docker-compose.yml exec buildenv make --directory=/workspace -f Makefile.init
@docker compose -f .devcontainer/docker-compose.yml stop -t 0
buildenv-init : buildenv-sync
@echo "Initializing PandA build environment"
@docker compose -f .devcontainer/docker-compose.yml exec buildenv make --directory=/workspace -f Makefile.init
@docker compose -f .devcontainer/docker-compose.yml stop -t 0