-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (50 loc) · 1.41 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
BINARIES_DIR = bin/
GLOBAL_BINARIES_DIR = /usr/bin/
LIBRARY_DIR = lib/
LIBRARY_DIR_ZHLT = $(LIBRARY_DIR)kriswema/zhlt/
LIBRARY_DIR_RESGEN = $(LIBRARY_DIR)kriswema/resgen/
LIBRARY_DIR_HLFIX = $(LIBRARY_DIR)kriswema/hlfix/
all: hlfix zhlt resgen clean listbin
# Display callable targets.
help:
@echo Usage: make [command]
@egrep "^[a-z]*:" [Mm]akefile
# Prepare build environment
prepare: clean
mkdir -pv $(BINARIES_DIR)
mkdir -pv $(LIBRARY_DIR)
# List binary files
listbin:
@echo Generated binaries:
@ls -CF $(BINARIES_DIR)
# Clean build environment
clean:
@rm -fRv $(LIBRARY_DIR)
# Clean build environment and binaries
purge:
@make clean
@rm -fRv $(BINARIES_DIR)
# Build HLFix
hlfix: prepare
git clone git://github.com/kriswema/hlfix.git $(LIBRARY_DIR_HLFIX)
cd $(LIBRARY_DIR_HLFIX);\
git checkout -b 0.9-beta+kriswema1;\
make all
mv $(LIBRARY_DIR_HLFIX)bin/* $(BINARIES_DIR)
# Build ZHLT
zhlt: prepare
git clone git://github.com/kriswema/zhlt-linux.git $(LIBRARY_DIR_ZHLT)
cd $(LIBRARY_DIR_ZHLT);\
git checkout -b 3.5.0-linux2;\
make all
mv $(LIBRARY_DIR_ZHLT)bin/* $(BINARIES_DIR)
# Build RESGen
resgen: prepare
git clone git://github.com/kriswema/resgen.git $(LIBRARY_DIR_RESGEN)
cd $(LIBRARY_DIR_RESGEN);\
git checkout -b 2.0.2+kriswema1;\
make all
mv $(LIBRARY_DIR_RESGEN)bin/* $(BINARIES_DIR)
# Move binaries to system folder (make binaries global)
install:
cp $(BINARIES_DIR)* $(GLOBAL_BINARIES_DIR)