forked from HeapsIO/hlsteam
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
69 lines (51 loc) · 1.74 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
LBITS := $(shell getconf LONG_BIT)
UNAME := $(shell uname)
CFLAGS = -Wall -O3 -I src -I native/include -fPIC -I sdk/public
ifndef ARCH
ARCH = $(LBITS)
endif
ifndef HASHLINK_SRC
HASHLINK_SRC = ../../../hashlink
endif
LIBARCH=$(ARCH)
LIBHL=libhl.xxx
ifeq ($(UNAME),Darwin)
OS=osx
# universal lib in osx32 dir
LIBARCH=32
LIBHL=libhl.dylib
else
OS=linux
CFLAGS += -std=c++0x
LIBHL=libhl.so
endif
SDKVER=142
#SDKURL=https://partner.steamgames.com/downloads/steamworks_sdk_${SDKVER}.zip
LFLAGS = -lhl -lsteam_api -lstdc++ -L native/lib/$(OS)$(LIBARCH) -L $(HASHLINK_SRC) -L sdk/redistributable_bin/$(OS)$(LIBARCH)
SRC = native/cloud.o native/common.o native/controller.o native/friends.o native/gameserver.o \
native/matchmaking.o native/networking.o native/stats.o native/ugc.o
all: ${SRC}
${CC} ${CFLAGS} -shared -o steam.hdll ${SRC} ${LFLAGS}
prepare:
rm -rf native/lib/$(OS)$(LIBARCH)
mkdir -p native/include
mkdir -p native/lib/$(OS)$(LIBARCH)
cp $(HASHLINK_SRC)/src/hl.h native/include/
cp $(HASHLINK_SRC)/$(LIBHL) native/lib/$(OS)$(LIBARCH)/
chmod +x sdk/tools/ContentBuilder/builder_linux/steamcmd.sh
chmod +x sdk/tools/ContentBuilder/builder_linux/linux32/steamcmd
chmod +x sdk/tools/ContentBuilder/builder_linux/linux32/steamerrorreporter
rm -rf sdk/tools/ContentBuilder/.git*
rm -rf sdk/tools/ContentBuilder/scripts/
rm -rf SteamContentBuilder/
git clone [email protected]:deadcells/SteamContentBuilder.git
mv SteamContentBuilder/.git* sdk/tools/ContentBuilder/ 2>/dev/null
mv SteamContentBuilder/* sdk/tools/ContentBuilder/
rmdir SteamContentBuilder
.SUFFIXES : .cpp .o
.cpp.o :
${CC} ${CFLAGS} -o $@ -c $<
clean_o:
rm -f ${SRC}
clean: clean_o
rm -f steam.hdll