-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
69 lines (64 loc) · 2.3 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
# do not forget that to build pvcollib, you have to install compiler and tools first !
#---------------------------------------------------------------------------------
all:
cd tools && \
make && \
make install && \
cd ../pvcollib && \
make && \
cd ../coleco-examples && \
make && \
make install && \
echo && \
echo Build finished successfully ! && \
echo
clean:
cd tools ; \
make clean ; \
cd ../pvcollib ; \
make clean ; \
cd ../devkitcol ; \
rm -f ./tools/* ; \
cd ../coleco-examples ; \
make clean ; \
rm -rf release
# requirements to launch the "release" rule
doxygenInstalled := $(shell command -v doxygen 2> /dev/null)
operatingSystem=
ifeq ($(OS),Windows_NT)
operatingSystem=windows
else
# only for linux platforms, we use the os-release file
ifneq (,$(wildcard /etc/os-release))
include /etc/os-release
# convert to lower case the result
operatingSystem=linux_$(shell echo $(NAME) | tr A-Z a-z)
else
ifeq ($(shell uname -s),Darwin)
operatingSystem=darwin
else
$(error "Unable to detect your operating system, please update the code in global pvcollib Makefile to continue")
endif
endif
endif
#---------------------------------------------------------------------------------
# to create the release version for github containing binaries and all coleco-examples :
release: all
ifndef doxygenInstalled
$(error "doxygen is not installed but is mandatory to create the release version.")
endif
ifeq ($(operatingSystem),)
$(error "Unable to detect your operating system to create the release version.")
endif
rm -rf release && mkdir -p release/pvcollib && \
cp -r devkitcol release/pvcollib/devkitcol && \
mkdir release/pvcollib/pvcollib && cp -r pvcollib/include release/pvcollib/pvcollib/include && \
cp -r pvcollib/lib release/pvcollib/pvcollib/lib && \
mkdir release/pvcollib/pvcollib/docs && cp -r pvcollib/docs/html release/pvcollib/pvcollib/docs/html && \
cp pvcollib/pvcollib_Logo.png release/pvcollib/pvcollib/pvcollib_Logo.png && \
cp pvcollib/pvcollib_license.txt release/pvcollib/pvcollib/pvcollib_license.txt && \
cp pvcollib/pvcollib_version.txt release/pvcollib/pvcollib/pvcollib_version.txt && \
cp -r coleco-examples release/pvcollib/coleco-examples && \
cd release && zip -r -m pvcollib_32b_$(operatingSystem).zip pvcollib && \
echo && echo Release created successfully ! && echo
.PHONY: all