mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
build libclasspath.a, which contains native methods for the classpath
This commit is contained in:
parent
f29b1b9b6f
commit
d3774d54bc
16
makefile
16
makefile
@ -130,6 +130,8 @@ jni-sources = $(shell find $(classpath) -name '*.cpp')
|
|||||||
jni-objects = $(call cpp-objects,$(jni-sources),$(classpath),$(native-build))
|
jni-objects = $(call cpp-objects,$(jni-sources),$(classpath),$(native-build))
|
||||||
jni-cflags = $(cflags)
|
jni-cflags = $(cflags)
|
||||||
|
|
||||||
|
libclasspath = $(native-build)/libclasspath.a
|
||||||
|
|
||||||
generated-code = \
|
generated-code = \
|
||||||
$(native-build)/type-enums.cpp \
|
$(native-build)/type-enums.cpp \
|
||||||
$(native-build)/type-declarations.cpp \
|
$(native-build)/type-declarations.cpp \
|
||||||
@ -189,7 +191,7 @@ generator-objects = \
|
|||||||
$(call cpp-objects,$(generator-sources),$(src),$(native-build))
|
$(call cpp-objects,$(generator-sources),$(src),$(native-build))
|
||||||
generator = $(native-build)/generator
|
generator = $(native-build)/generator
|
||||||
|
|
||||||
archive = $(native-build)/lib$(name).a
|
libvm = $(native-build)/lib$(name).a
|
||||||
vm = $(native-build)/$(name)
|
vm = $(native-build)/$(name)
|
||||||
|
|
||||||
classpath-sources = $(shell find $(classpath) -name '*.java')
|
classpath-sources = $(shell find $(classpath) -name '*.java')
|
||||||
@ -218,7 +220,7 @@ endif
|
|||||||
args = $(flags) $(input)
|
args = $(flags) $(input)
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(vm) $(archive) $(classpath-dep) $(test-dep)
|
build: $(vm) $(libvm) $(libclasspath) $(classpath-dep) $(test-dep)
|
||||||
|
|
||||||
$(test-classes): $(classpath-dep)
|
$(test-classes): $(classpath-dep)
|
||||||
|
|
||||||
@ -316,13 +318,19 @@ $(jni-objects): $(native-build)/%.o: $(classpath)/%.cpp
|
|||||||
@mkdir -p $(dir $(@))
|
@mkdir -p $(dir $(@))
|
||||||
$(cxx) $(jni-cflags) -c $(<) -o $(@)
|
$(cxx) $(jni-cflags) -c $(<) -o $(@)
|
||||||
|
|
||||||
$(archive): $(vm-objects)
|
$(libvm): $(vm-objects)
|
||||||
@echo "creating $(@)"
|
@echo "creating $(@)"
|
||||||
rm -rf $(@)
|
rm -rf $(@)
|
||||||
$(ar) cru $(@) $(^)
|
$(ar) cru $(@) $(^)
|
||||||
$(ranlib) $(@)
|
$(ranlib) $(@)
|
||||||
|
|
||||||
$(vm): $(vm-objects) $(jni-objects) $(classpath-object) $(driver-object)
|
$(libclasspath): $(jni-objects)
|
||||||
|
@echo "creating $(@)"
|
||||||
|
rm -rf $(@)
|
||||||
|
$(ar) cru $(@) $(^)
|
||||||
|
$(ranlib) $(@)
|
||||||
|
|
||||||
|
$(vm): $(vm-objects) $(classpath-object) $(jni-objects) $(driver-object)
|
||||||
@echo "linking $(@)"
|
@echo "linking $(@)"
|
||||||
ifeq ($(platform),windows)
|
ifeq ($(platform),windows)
|
||||||
$(dlltool) -z $(@).def $(^)
|
$(dlltool) -z $(@).def $(^)
|
||||||
|
Loading…
Reference in New Issue
Block a user