-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
49 lines (41 loc) · 1.57 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
METAMOD=metamod-1.19-linux.src.tar.gz
HLSDK=hlsdk-2.3-p4.tar.gz
DOWNLOAD_DIR=tmp/
.PHONY: include
all: fix
$(MAKE) -C include/metamod/metamod OPT=opt
mkdir -p bin
$(MAKE) -C src/metamodplugin/
xbuild src/sharpmod.sln
download:
mkdir $(DOWNLOAD_DIR)
wget http://sourceforge.net/projects/metamod/files/Metamod%20Sourcecode/1.19/metamod-1.19-linux.src.tar.gz/download --directory-prefix=$(DOWNLOAD_DIR)
wget http://metamod.sourceforge.net/files/sdk/$(HLSDK) --directory-prefix=$(DOWNLOAD_DIR)
touch download
echo "This is a placeholder in order to make the Makefile script work correctly, do not delete this file manually" > download
includedir: download
mkdir include
mv $(DOWNLOAD_DIR)/download $(DOWNLOAD_DIR)/metamod-1.19-linux.src.tar.gz
tar xzvf $(DOWNLOAD_DIR)/metamod-1.19-linux.src.tar.gz --directory include/
mv include/metamod-1.19 include/metamod
tar xzvf $(DOWNLOAD_DIR)/$(HLSDK) --directory include/
mv include/$(patsubst %.tar.gz,%,$(HLSDK)) include/hlsdk
touch includedir
fix: includedir
ln -sf ../../metamod-hack-fix.patch include/metamod/
patch -p1 -i metamod-hack-fix.patch --directory=include/metamod/
echo "This is a placeholder in order to make the Makefile script work correctly, do not delete this file manually" > fix
rm include/metamod/metamod-hack-fix.patch
touch fix
clean:
rm -rvf tmp
rm -f download
rm -f fix
rm -rvf include
rm -f includedir
rm -rvf bin
$(MAKE) -C src/metamodplugin/ clean
rm -rvf `find src/ -name obj` `find src/ -name *.mdb` `find src/ -name *.pidb` `find src/ -name bin`
rm -rvf doc/html
doxygen:
doxygen doc/Doxyfile