-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
53 lines (47 loc) · 1.42 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
.PHONY: fdp virtualbox
fdp:
# Build the static and shared FDP libraries and the FDP test executables
ifeq ($(wildcard build/.),)
mkdir build
cd build/ &&\
cmake ..
endif
cd build/ &&\
make
# Generate the PyFDP distribution wheel
cp build/lib/libFDP.dylib PyFDP/PyFDP/
cd PyFDP/ &&\
python3 setup.py bdist_wheel
# Collect files for distribution
mkdir -p out-latest/include/FDP
cp -r FDP/include/ out-latest/include/FDP
cp build/lib/libFDP.a out-latest/
cp build/lib/libFDP.dylib out-latest/
cp build/bin/testFDP out-latest/
cp build/bin/testFDPClientServer out-latest/
cp build/bin/testFDPClientServer out-latest/
cp PyFDP/dist/PyFDP-*-py3-none-any.whl out-latest/
# Clean-up
rm -r PyFDP/PyFDP.egg-info/
rm -r PyFDP/PyFDP/libFDP.dylib
rm -r PyFDP/build/
rm -r PyFDP/dist/
virtualbox: fdp
ifeq ($(wildcard virtualbox/build/env.sh),)
mkdir -p virtualbox/build
cd virtualbox/ &&\
FDPINC="$(shell pwd)/out-latest/include"\
FDPLIB="$(shell pwd)/out-latest"\
"$(shell pwd)/virtualbox-build.py" "$(shell pwd)/virtualbox/build/"
endif
cd virtualbox/ &&\
source build/env.sh &&\
FDPINC="$(shell pwd)/out-latest/include"\
FDPLIB="$(shell pwd)/out-latest"\
kmk
rm -rf "$(shell pwd)/out-latest/VirtualBox"
"$(shell pwd)/virtualbox-pack.py" "$(shell pwd)/virtualbox/build/" "$(shell pwd)/out-latest/VirtualBox" "$(shell pwd)/out-latest/libFDP.dylib"
clean:
rm -rf build/
rm -rf out-latest/
rm -rf virtualbox/build/