LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := vice_xscpu64

MY_PATH2 := ../../../../../..

CG_SUBDIRS := $(MY_PATH2)/src/scpu64

# Add more subdirs here, like src/subdir1 src/subdir2

MY_PATH := $(LOCAL_PATH)

CG_SRCDIR := $(LOCAL_PATH)

LOCAL_CFLAGS := -DANDROID_COMPILE

LOCAL_C_INCLUDES :=	$(LOCAL_PATH)/include \
				$(LOCAL_PATH)/../sdl/include \
				$(LOCAL_PATH)/../locnet/include \
				$(LOCAL_PATH) \
				$(LOCAL_PATH)/../../../../../../src/arch/sdl \
				$(LOCAL_PATH)/../../../../../../src/c64 \
				$(LOCAL_PATH)/../../../../../../src/c64/cart \
				$(LOCAL_PATH)/../../../../../../src/sid \
				$(LOCAL_PATH)/../../../../../../src/viciisc \
				$(LOCAL_PATH)/../../../../../../src/drive \
				$(LOCAL_PATH)/../../../../../../src/lib/p64 \
				$(LOCAL_PATH)/../../../../../../src/tape \
				$(LOCAL_PATH)/../../../../../../src/userport \
				$(LOCAL_PATH)/../../../../../../src/video \
				$(LOCAL_PATH)/../../../../../../src/raster \
				$(LOCAL_PATH)/../../../../../../src/drive/iec/c64exp \
				$(LOCAL_PATH)/../../../../../../src/rtc \
				$(LOCAL_PATH)/../../../../../../src \
				$(LOCAL_PATH)/../.. \
				$(LOCAL_PATH)

LOCAL_PATH := $(MY_PATH)

LOCAL_CPPFLAGS := $(LOCAL_CFLAGS)
LOCAL_CXXFLAGS := $(LOCAL_CFLAGS)

#Change C++ file extension as appropriate
LOCAL_CPP_EXTENSION := .cpp

LOCAL_SRC_FILES := \
	$(MY_PATH2)/src/c64/c64bus.c \
	$(MY_PATH2)/src/c64/c64cia1.c \
	$(MY_PATH2)/src/c64/c64cia2.c \
	$(MY_PATH2)/src/c64/c64datasette.c \
	$(MY_PATH2)/src/c64/c64drive.c \
	$(MY_PATH2)/src/c64/c64embedded.c \
	$(MY_PATH2)/src/c64/c64export.c \
	$(MY_PATH2)/src/c64/c64fastiec.c \
	$(MY_PATH2)/src/c64/c64iec.c \
	$(MY_PATH2)/src/c64/c64io.c \
	$(MY_PATH2)/src/c64/c64keyboard.c \
	$(MY_PATH2)/src/c64/c64memsnapshot.c \
	$(MY_PATH2)/src/c64/c64scmodel.c \
	$(MY_PATH2)/src/c64/c64parallel.c \
	$(MY_PATH2)/src/c64/c64pla.c \
	$(MY_PATH2)/src/c64/c64printer.c \
	$(MY_PATH2)/src/c64/c64romset.c \
	$(MY_PATH2)/src/c64/c64rsuser.c \
	$(MY_PATH2)/src/c64/c64sound.c \
	$(MY_PATH2)/src/c64/c64video.c \
	$(MY_PATH2)/src/c64/patchrom.c \
	$(MY_PATH2)/src/c64/reloc65.c \
	$(MY_PATH2)/src/mouse.c

LOCAL_SRC_FILES += $(foreach F, $(CG_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.c))))

LOCAL_ARM_MODE := arm

include $(BUILD_STATIC_LIBRARY)
