-
-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathMakefile-steam
42 lines (38 loc) · 1.51 KB
/
Makefile-steam
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
# Steam SDK has to be present in extern/steamworks/
# (at least public/ and redistributable_bin/ subdirs).
#
# It can be downloaded from:
# https://partner.steamgames.com/doc/sdk
#
# After extracting files run fix_steamworks.sh script.
# To run keeper with steam support, don't forget to copy
# appropriate .so / .dll file where the game executable is.
ifndef MACHINE
MACHINE=$(shell $(GCC) -dumpmachine)
endif
# Detecting system
ifeq ($(MACHINE), x86_64-linux-gnu)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/linux64/
STEAM_LIB_NAME=steam_api
else ifeq ($(MACHINE), x86_64-pc-linux-gnu)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/linux64/
STEAM_LIB_NAME=steam_api
else ifeq ($(MACHINE), x86_64-unknown-linux-gnu)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/linux64/
STEAM_LIB_NAME=steam_api
else ifeq ($(MACHINE), i386-pc-linux-gnu)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/linux32/
STEAM_LIB_NAME=steam_api
else ifeq ($(findstring x86_64-w64-mingw32, $(MACHINE)), x86_64-w64-mingw32)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/win64/
STEAM_LIB_NAME=steam_api64
else ifeq ($(findstring i686-w64-mingw32, $(MACHINE)), i686-w64-mingw32)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/
STEAM_LIB_NAME=steam_api
else ifeq ($(findstring x86_64-apple-darwin, $(MACHINE)), x86_64-apple-darwin)
STEAM_LIB_DIR=extern/steamworks/redistributable_bin/osx/
STEAM_LIB_NAME=steam_api
#TODO: else handle error
endif
CFLAGS += -DUSE_STEAMWORKS
STEAM_LIBS=-L $(STEAM_LIB_DIR) -l $(STEAM_LIB_NAME)