-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (45 loc) · 1.72 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
# Do not run this file. Run the Makefile in the egoboo source directory, instead
#!!!! do not specify the prefix in this file
#!!!! if you want to specify a prefix, do it on the command line
#For instance: "make PREFIX=$HOME/.local"
ifndef ($(PREFIX),"")
#!!!! error the PREFIX is not defined. The install will not work properly
endif
.PHONY: install uninstall
install:
ifeq ($(PREFIX),)
$(error PREFIX is empty, will not install)
endif
ifeq ($(PROJ_NAME),)
$(error PROJ_NAME is empty, will not install)
endif
######################################
# Thank you for installing the data files for egoboo!
#
# If you do not have root access on this machine,
# you can specify a prefix on the command line:
# "make install PREFIX=$$HOME/.local"
# where the environment variable PREFIX specifies a
# virtual root for your installation. In this example,
# it is a local installation for this username only.
#
# copy the data to the games folder
mkdir -p ${PREFIX}/share/games/${PROJ_NAME}
cp -rdf ./basicdat ${PREFIX}/share/games/${PROJ_NAME}
cp -rdf ./modules ${PREFIX}/share/games/${PROJ_NAME}
cp -rdf ./editor ${PREFIX}/share/games/${PROJ_NAME}
# copy the basic configuration files to the config directory
mkdir -p ${PREFIX}/etc/${PROJ_NAME}
cp -rdf ./setup.txt ${PREFIX}/etc/${PROJ_NAME}/setup.txt
cp -rdf ./controls.txt ${PREFIX}/etc/${PROJ_NAME}/controls.txt
#####################################
# Installation of the egoboo data files has completed
#####################################
uninstall:
ifeq ($(PREFIX),)
$(error PREFIX is empty, will not uninstall)
endif
ifeq ($(PROJ_NAME),)
$(error PROJ_NAME is empty, will not uninstall)
endif
rm -r ${PREFIX}/share/games/${PROJ_NAME}/ ${PREFIX}/etc/${PROJ_NAME}/