source-engine/thirdparty/FakeSteamAPI/Makefile

56 lines
2.0 KiB
Makefile
Raw Normal View History

2020-10-23 13:11:42 +00:00
DLLNAME=libsteam_api
ifeq ($(NDK),1)
CC = $(shell $(NDK_PATH)/ndk-which gcc)
CXX = $(shell $(NDK_PATH)/ndk-which g++)
LD = $(shell $(NDK_PATH)/ndk-which ld)
AR = $(shell $(NDK_PATH)/ndk-which ar)
LINK = $(shell $(NDK_PATH)/ndk-which g++)
STRIP = $(shell $(NDK_PATH)/ndk-which strip)
else
CXX=g++
CC=gcc
endif
DLL_SRCDIR=.
DEFINES = -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -DANDROID
DEFINES += -DVPC -DRAD_TELEMETRY_DISABLED -DNDEBUG -DGNUC -DPOSIX -DCOMPILER_GCC -D_DLL_EXT=.so -D_LINUX -DLINUX -DPOSIX -D_POSIX -DBINK_VIDEO -DGL_GLEXT_PROTOTYPES -DDX_TO_GL_ABSTRACTION -DUSE_SDL -DDEV_BUILD -DFRAME_POINTER_OMISSION_DISABLED -DSOURCE1=1 -D_LINUX=1 -D_POSIX=1 -DLINUX=1 -DPOSIX=1
SRCS = FakeSteamAPI_ContextProvider.cpp FakeSteamAPI_Core.cpp FakeSteamAPI_Settings.cpp FakeSteamAPI_Utilities.cpp
SRCS_C =
OBJS = $(patsubst %.cpp,%.o,$(SRCS))
OBJS += $(patsubst %.c,%.o,$(SRCS_C))
LIBS =
OPTFLAGS=-pipe -fno-exceptions -fPIC -fvisibility=hidden
CXXFLAGS=$(OPTFLAGS) -fpermissive -std=gnu++0x -Wno-narrowing -m32
CFLAGS=$(OPTFLAGS) -m32
INCLUDES=-I.
LDFLAGS = -shared -Wl,--no-warn-mismatch -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -m32
ifeq ($(NDK),1)
SYSROOT := "$(NDK_PATH)/platforms/android-$(APP_API_LEVEL)/arch-arm"
CFLAGS += "--sysroot=$(SYSROOT)"
CXXFLAGS += "--sysroot=$(SYSROOT)"
INCLUDES += -I$(NDK_PATH)/sources/cxx-stl/stlport/stlport/ -I$(NDK_PATH)/sources/android/support/include -I$(SYSROOT)/usr/include
LDFLAGS += -L$(SYSROOT)/usr/lib -Wl,--build-id --sysroot=$(SYSROOT)
else
INCLUDES += -I$(HOME)/ndk-include/cxx-stl/stlport/stlport/ -I$(HOME)/ndk-include//android/support/include/
endif
%.o : %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c "$<" -o $(PWD)/"$@"
%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c "$<" -o $(PWD)/"$@"
$(DLLNAME).so : $(OBJS)
$(CXX) -o $(DLLNAME).so $(LDFLAGS) $(OBJS) $(LIBS)
clean:
-rm -f $(OBJS)
-rm -f $(DLLNAME).so