This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
makefile
72 lines (62 loc) · 2.15 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
70
71
72
BINARY=sar.so
STEAM=/home/nekz/.steam/steam/steamapps/common/
SDIR=src/
ODIR=obj/
SRCS=$(wildcard $(SDIR)*.cpp)
SRCS+=$(wildcard $(SDIR)Features/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Demo/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Hud/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Routing/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Speedrun/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Speedrun/Rules/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Stats/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/ReplaySystem/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Tas/*.cpp)
SRCS+=$(wildcard $(SDIR)Features/Timer/*.cpp)
SRCS+=$(wildcard $(SDIR)Games/Linux/*.cpp)
SRCS+=$(wildcard $(SDIR)Modules/*.cpp)
SRCS+=$(wildcard $(SDIR)Utils/*.cpp)
OBJS=$(patsubst $(SDIR)%.cpp, $(ODIR)%.o, $(SRCS))
CC=g++-8
STFU=-Wno-unused-function -Wno-unused-variable -Wno-parentheses -Wno-unknown-pragmas
CFLAGS=-std=c++17 -m32 -fPIC -static-libstdc++ -shared -Wall -s $(STFU) -I$(SDIR)
#CFLAGS+=-D _DEBUG
EXPORT=cp -fu
PRINT=echo
DELETE=rm -rf
CREATE=mkdir -p
all: pre sar post
sar: $(OBJS)
@$(CC) $(CFLAGS) -o $(BINARY) $^ -lstdc++fs
$(ODIR)%.o: $(SDIR)%.cpp $(SDIR)%.hpp
@$(PRINT) $@
@$(CC) $(CFLAGS) -c -o $@ $<
clean:
@$(DELETE) $(OBJS) $(BINARY)
pre:
@$(CREATE) $(ODIR)
@$(CREATE) $(ODIR)Features/
@$(CREATE) $(ODIR)Features/Demo/
@$(CREATE) $(ODIR)Features/Hud/
@$(CREATE) $(ODIR)Features/Routing/
@$(CREATE) $(ODIR)Features/Speedrun/
@$(CREATE) $(ODIR)Features/Speedrun/Rules
@$(CREATE) $(ODIR)Features/Stats/
@$(CREATE) $(ODIR)Features/ReplaySystem/
@$(CREATE) $(ODIR)Features/Tas/
@$(CREATE) $(ODIR)Features/Timer/
@$(CREATE) $(ODIR)Games/Linux/
@$(CREATE) $(ODIR)Modules/
@$(CREATE) $(ODIR)Utils/
post:
# @$(EXPORT) "$(BINARY)" "$(STEAM)Portal 2/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)Aperture Tag/bin/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)Portal Stories Mel/bin/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)The Stanley Parable/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)The Beginners Guide/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)Half-Life 2/$(BINARY)"
# @$(EXPORT) "$(BINARY)" "$(STEAM)Portal/$(BINARY)"
get-deps:
sudo apt-get install -y g++-8-multilib
cvars:
node cvars.js "$(STEAM)Portal 2"