blob: 3080ab0367143a4d71529774ff52d8541ff4a69e [file] [log] [blame]
Jason Sams8af858e92009-07-23 16:10:46 -07001
Jason Sams94d8e90a2009-06-10 16:09:05 -07002LOCAL_PATH:=$(call my-dir)
Jason Samsd19f10d2009-05-22 14:03:28 -07003
Jason Sams94d8e90a2009-06-10 16:09:05 -07004
5# Build rsg-generator ====================
6include $(CLEAR_VARS)
Jason Samsd19f10d2009-05-22 14:03:28 -07007
8LOCAL_MODULE := rsg-generator
9
10# These symbols are normally defined by BUILD_XXX, but we need to define them
11# here so that local-intermediates-dir works.
12
13LOCAL_IS_HOST_MODULE := true
14LOCAL_MODULE_CLASS := EXECUTABLES
Jason Sams94d8e90a2009-06-10 16:09:05 -070015intermediates := $(local-intermediates-dir)
Jason Samsd19f10d2009-05-22 14:03:28 -070016
Jason Samsd19f10d2009-05-22 14:03:28 -070017LOCAL_SRC_FILES:= \
Joe Onoratodaed5242009-08-10 15:01:51 -070018 spec.l \
Jason Samsd19f10d2009-05-22 14:03:28 -070019 rsg_generator.c
Jason Sams94d8e90a2009-06-10 16:09:05 -070020
Jason Samsd19f10d2009-05-22 14:03:28 -070021include $(BUILD_HOST_EXECUTABLE)
22
Jason Sams94d8e90a2009-06-10 16:09:05 -070023# TODO: This should go into build/core/config.mk
Jason Samsd19f10d2009-05-22 14:03:28 -070024RSG_GENERATOR:=$(LOCAL_BUILT_MODULE)
25
Jason Samsd19f10d2009-05-22 14:03:28 -070026
Jason Sams94d8e90a2009-06-10 16:09:05 -070027
28# Build render script lib ====================
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070029
Jason Samsd19f10d2009-05-22 14:03:28 -070030include $(CLEAR_VARS)
31LOCAL_MODULE := libRS
32
33LOCAL_MODULE_CLASS := SHARED_LIBRARIES
34intermediates:= $(local-intermediates-dir)
35
Jason Samsd19f10d2009-05-22 14:03:28 -070036# Generate custom headers
37
38GEN := $(addprefix $(intermediates)/, \
39 rsgApiStructs.h \
40 rsgApiFuncDecl.h \
41 )
42
Jason Sams196ac852009-06-10 18:35:42 -070043$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
44$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070045$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
46$(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg
47 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070048
Jason Sams94d8e90a2009-06-10 16:09:05 -070049# used in jni/Android.mk
50rs_generated_source += $(GEN)
Jason Samsd19f10d2009-05-22 14:03:28 -070051LOCAL_GENERATED_SOURCES += $(GEN)
52
53# Generate custom source files
54
55GEN := $(addprefix $(intermediates)/, \
56 rsgApi.cpp \
57 rsgApiReplay.cpp \
58 )
Jack Palevicheaff3072009-05-26 17:23:34 -070059
Jason Sams196ac852009-06-10 18:35:42 -070060$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
61$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070062$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
63$(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg
64 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070065
Jason Sams94d8e90a2009-06-10 16:09:05 -070066# used in jni/Android.mk
67rs_generated_source += $(GEN)
Jason Sams196ac852009-06-10 18:35:42 -070068
Jason Samsd19f10d2009-05-22 14:03:28 -070069LOCAL_GENERATED_SOURCES += $(GEN)
70
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070071# libRS needs libacc, which isn't 64-bit clean, and so can't be built
72# for the simulator on gHardy, and therefore libRS needs to be excluded
73# from the simulator as well.
74ifneq ($(TARGET_SIMULATOR),true)
75
Jason Samsd19f10d2009-05-22 14:03:28 -070076LOCAL_SRC_FILES:= \
77 rsAdapter.cpp \
78 rsAllocation.cpp \
79 rsComponent.cpp \
80 rsContext.cpp \
81 rsDevice.cpp \
82 rsElement.cpp \
Jason Sams7aa4f3a2009-07-10 17:32:40 -070083 rsFileA3D.cpp \
Jason Samsbba134c2009-06-22 15:49:21 -070084 rsLight.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070085 rsLocklessFifo.cpp \
86 rsObjectBase.cpp \
87 rsMatrix.cpp \
Jason Sams7aa4f3a2009-07-10 17:32:40 -070088 rsMesh.cpp \
Romain Guyecc7ca02009-08-03 21:12:51 -070089 rsNoise.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070090 rsProgram.cpp \
91 rsProgramFragment.cpp \
92 rsProgramFragmentStore.cpp \
Jason Samsebfb4362009-09-23 13:57:02 -070093 rsProgramRaster.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070094 rsProgramVertex.cpp \
95 rsSampler.cpp \
96 rsScript.cpp \
97 rsScriptC.cpp \
Jason Samsc97bb882009-07-20 14:31:06 -070098 rsScriptC_Lib.cpp \
Jason Samsbb51c402009-11-25 13:22:07 -080099 rsShaderCache.cpp \
Jason Sams1bada8c2009-08-09 17:01:55 -0700100 rsSimpleMesh.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700101 rsThreadIO.cpp \
Jason Samsbb51c402009-11-25 13:22:07 -0800102 rsType.cpp \
103 rsVertexArray.cpp
Jason Samsd19f10d2009-05-22 14:03:28 -0700104
Jason Samsbb51c402009-11-25 13:22:07 -0800105
106LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc
Jason Samsd19f10d2009-05-22 14:03:28 -0700107LOCAL_LDLIBS := -lpthread -ldl
108LOCAL_MODULE:= libRS
Jason Sams94d8e90a2009-06-10 16:09:05 -0700109LOCAL_MODULE_TAGS := optional
Jason Samsd19f10d2009-05-22 14:03:28 -0700110
111include $(BUILD_SHARED_LIBRARY)
112
Jason Sams94d8e90a2009-06-10 16:09:05 -0700113# Include the subdirectories ====================
114include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\
Jason Sams94d8e90a2009-06-10 16:09:05 -0700115 java \
116 ))
Jason Samsd19f10d2009-05-22 14:03:28 -0700117
Marco Nelissen3f8f9da82009-08-12 09:41:07 -0700118endif #simulator