57 # and the targets generated are listed in a variable by that name. |
57 # and the targets generated are listed in a variable by that name. |
58 # |
58 # |
59 # Remaining parameters are named arguments. These are all passed on to |
59 # Remaining parameters are named arguments. These are all passed on to |
60 # SetupNativeCompilation, except for |
60 # SetupNativeCompilation, except for |
61 # EXTRA_RC_FLAGS -- additional RC_FLAGS to append. |
61 # EXTRA_RC_FLAGS -- additional RC_FLAGS to append. |
62 # HEADER_FLAGS - where to look for headers! FIXME:LIBS |
62 # EXTRA_HEADER_DIRS -- additional directories to look for headers in |
|
63 # EXTRA_SRC -- additional directories to look for source in |
63 SetupJdkLibrary = $(NamedParamsMacroTemplate) |
64 SetupJdkLibrary = $(NamedParamsMacroTemplate) |
64 define SetupJdkLibraryBody |
65 define SetupJdkLibraryBody |
65 ifeq ($$($1_OUTPUT_DIR), ) |
66 ifeq ($$($1_OUTPUT_DIR), ) |
66 $1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE)) |
67 $1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE)) |
67 endif |
68 endif |
70 $1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME) |
71 $1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME) |
71 endif |
72 endif |
72 |
73 |
73 ifeq ($$($1_SRC), ) |
74 ifeq ($$($1_SRC), ) |
74 $1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME)) |
75 $1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME)) |
|
76 endif |
|
77 $1_PRE_SRC := $$($1_SRC) |
|
78 ifneq ($$($1_EXTRA_SRC), ) |
|
79 $1_SRC += $$($1_EXTRA_SRC) |
75 endif |
80 endif |
76 |
81 |
77 ifeq ($$($1_VERSIONINFO_RESOURCE), ) |
82 ifeq ($$($1_VERSIONINFO_RESOURCE), ) |
78 $1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE) |
83 $1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE) |
79 else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE) |
84 else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE) |
88 else ifeq ($$($1_RC_FLAGS), DISABLE) |
93 else ifeq ($$($1_RC_FLAGS), DISABLE) |
89 $1_RC_FLAGS := |
94 $1_RC_FLAGS := |
90 endif |
95 endif |
91 |
96 |
92 ifneq ($$($1_HEADERS_FROM_SRC), false) |
97 ifneq ($$($1_HEADERS_FROM_SRC), false) |
93 $1_SRC_HEADER_FLAGS := \ |
98 $1_SRC_HEADER_FLAGS := $$(foreach dir, $$(wildcard $$($1_SRC) $$($1_EXTRA_SRC) \ |
94 $$(foreach dir, $$($1_SRC), -I$$(dir)) \ |
99 $$(call FindHeaderDirForModule, $$(MODULE))), -I$$(dir)) |
95 -I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
96 # |
|
97 endif |
100 endif |
|
101 ifneq ($$($1_EXTRA_HEADER_DIRS), ) |
|
102 $1_EXTRA_HEADER_FLAGS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), -I$$(dir)) |
|
103 endif |
|
104 |
98 ifneq ($$($1_CFLAGS), ) |
105 ifneq ($$($1_CFLAGS), ) |
99 $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS) |
106 $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS) |
100 endif |
107 endif |
101 ifneq ($$($1_CXXFLAGS), ) |
108 ifneq ($$($1_CXXFLAGS), ) |
102 $1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS) |
109 $1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS) |
103 endif |
110 endif |
104 ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), ) |
111 ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), ) |
105 $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS) |
112 $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS) |
106 endif |
113 endif |
107 $1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS) |
114 $1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS) |
108 |
115 |
109 # Since we reuse the rule name ($1), all our arguments will pass through. |
116 # Since we reuse the rule name ($1), all our arguments will pass through. |
110 # We lose in transparency, but gain in brevity in this call... |
117 # We lose in transparency, but gain in brevity in this call... |