moonlight-chrome/Makefile
2016-02-12 22:23:26 -05:00

32 lines
941 B
Makefile

VALID_TOOLCHAINS := newlib pnacl
TARGET = moonlight-chrome
include $(NACL_SDK_ROOT)/tools/common.mk
# Include Moonlight-Common-C makefile
include common-c.mk
LIBS = ppapi ppapi_cpp pthread nacl_io
CFLAGS = -Wall -Wno-missing-braces
SOURCES = \
$(COMMON_C_SOURCE) \
libchelper.c \
main.cpp \
# Build rules generated by macros from common.mk:
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
# The PNaCl workflow uses both an unstripped and finalized/stripped binary.
# On NaCl, only produce a stripped binary for Release configs (not Debug).
ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif
$(eval $(call NMF_RULE,$(TARGET),))