flycast/shell/nacl/Makefile

52 lines
1.4 KiB
Makefile
Raw Normal View History

2014-01-20 21:10:17 +00:00
VALID_TOOLCHAINS := pnacl newlib glibc
CONFIG ?= Debug
include $(NACL_SDK_ROOT)/tools/common.mk
2014-01-20 21:10:17 +00:00
LOCAL_PATH := $(call my-dir)
NOT_ARM := 1
2015-07-28 15:28:53 +00:00
CPP_REC := 1
#NO_REND := 1
2015-07-29 02:58:41 +00:00
NO_NIXPROF := 1
2014-01-20 21:10:17 +00:00
RZDCY_SRC_DIR = ../../core
include $(RZDCY_SRC_DIR)/core.mk
TARGET = reicast
DEPS = nacl_io
LIBS = ppapi_gles2 ppapi_cpp ppapi pthread nacl_io
2013-12-19 17:10:14 +00:00
CFLAGS = -Wno-error -Wno-ignored-attributes
CFLAGS += -O3 -fno-strict-aliasing -ffast-math
CFLAGS += -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps
CFLAGS += -D RELEASE -D TARGET_NO_JIT -D TARGET_NACL32 -DGLES
CFLAGS += -D TARGET_NO_EXCEPTIONS -D TARGET_NO_NVMEM -D TARGET_NO_WEBUI -D TARGET_NO_COREIO_HTTP
2013-12-19 17:10:14 +00:00
SOURCES = $(RZDCY_FILES) ../../core/nacl/nacl.cpp
2013-12-19 17:10:14 +00:00
# Project Build flags
WARNINGS ?=-Wno-long-long -Wno-switch-enum
CXXFLAGS += -std=gnu++0x $(WARNINGS)
2013-12-19 17:10:14 +00:00
# Build rules generated by macros from common.mk:
2013-12-19 17:10:14 +00:00
$(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep))))
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
2013-12-19 17:10:14 +00:00
# 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
2013-12-19 17:10:14 +00:00
SHELL = sh
2013-12-19 17:10:14 +00:00
$(eval $(call NMF_RULE,$(TARGET),))