1LOCAL_PATH := $(call my-dir)
2
3# ---------------------------------------
4# First project
5# 
6# Build DRM1 core library
7#
8# Output: libdrm1.so
9# ---------------------------------------
10include $(CLEAR_VARS)
11
12ifeq ($(TARGET_ARCH), arm)
13LOCAL_DRM_CFLAG = -DDRM_DEVICE_ARCH_ARM
14endif
15
16ifeq ($(TARGET_ARCH), x86)
17LOCAL_DRM_CFLAG = -DDRM_DEVICE_ARCH_X86
18endif
19
20# DRM 1.0 core source files
21LOCAL_SRC_FILES :=                  \
22    src/objmng/drm_decoder.c        \
23    src/objmng/drm_file.c           \
24    src/objmng/drm_i18n.c           \
25    src/objmng/drm_time.c           \
26    src/objmng/drm_api.c            \
27    src/objmng/drm_rights_manager.c \
28    src/parser/parser_dcf.c         \
29    src/parser/parser_dm.c          \
30    src/parser/parser_rel.c         \
31    src/xml/xml_tinyparser.c
32
33# Header files path
34LOCAL_C_INCLUDES :=                 \
35    $(LOCAL_PATH)/include           \
36    $(LOCAL_PATH)/include/objmng    \
37    $(LOCAL_PATH)/include/parser    \
38    $(LOCAL_PATH)/include/xml       \
39    external/openssl/include        \
40    $(call include-path-for, system-core)/cutils
41
42LOCAL_CFLAGS := $(LOCAL_DRM_CFLAG)
43
44LOCAL_SHARED_LIBRARIES :=   \
45    libutils                \
46    libcutils               \
47    libcrypto
48
49LOCAL_MODULE := libdrm1
50
51include $(BUILD_SHARED_LIBRARY)
52
53# ---------------------------------------
54# Second project
55# 
56# Build DRM1 Java Native Interface(JNI) library
57#
58# Output: libdrm1_jni.so
59# ------------------------------------------------
60include $(CLEAR_VARS)
61
62# Source files of DRM1 Java Native Interfaces
63LOCAL_SRC_FILES :=      \
64    src/jni/drm1_jni.c
65
66# Header files path
67LOCAL_C_INCLUDES :=         \
68    $(LOCAL_PATH)/include   \
69    $(LOCAL_PATH)/include/parser \
70    $(JNI_H_INCLUDE)    \
71    $(call include-path-for, system-core)/cutils
72	
73
74LOCAL_SHARED_LIBRARIES := libdrm1 \
75    libnativehelper               \
76    libutils                      \
77    libcutils
78
79LOCAL_MODULE := libdrm1_jni
80
81include $(BUILD_SHARED_LIBRARY)
82