VALID_TOOLCHAINS := pnacl newlib glibc clang-newlib win

NACL_SDK_ROOT:=$(subst \,/,${NACL_SDK_ROOT})

include $(NACL_SDK_ROOT)/tools/common.mk

TARGET = sample
LIBS = ppapi_cpp ppapi

CFLAGS = -Wall -DIUTEST_NO_GETCWD
SAMPLE_DIR = ../../samples
SAMPLE_SRCS = $(SAMPLE_DIR)/main.cpp \
              $(SAMPLE_DIR)/assertion.cpp \
              $(SAMPLE_DIR)/disabledtest.cpp \
              $(SAMPLE_DIR)/exception.cpp \
              $(SAMPLE_DIR)/fixture.cpp \
              $(SAMPLE_DIR)/matcher.cpp \
              $(SAMPLE_DIR)/parameterized.cpp \
              $(SAMPLE_DIR)/printto.cpp \
              $(SAMPLE_DIR)/simple.cpp \
              $(SAMPLE_DIR)/typed.cpp
SOURCES =$(SAMPLE_SRCS)

# Build rules generated by macros from common.mk:

$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))

ifeq ($(CONFIG),Release)
$(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),))
