216 # This has to be included here to allow changes to the source
217 # directories and excluded files before they are expanded
218 # by the definition of Src_Files.
219 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make
220
221 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
222 define findsrc
223 $(notdir $(shell find $(1)/. ! -name . -prune \
224 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
225 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
226 endef
227
228 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
229
230 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
231
232 JVM_OBJ_FILES = $(Obj_Files)
233
234 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
235
236 mapfile : $(MAPFILE) vm.def
237 rm -f $@
238 awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
239 { system ("cat vm.def"); } \
240 else \
241 { print $$0 } \
242 }' > $@ < $(MAPFILE)
243
244 mapfile_reorder : mapfile $(REORDERFILE)
245 rm -f $@
246 cat $^ > $@
247
248 vm.def: $(Res_Files) $(Obj_Files)
249 sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@
250
251 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
252 STATIC_CXX = false
253 else
254 ifeq ($(ZERO_LIBARCH), ppc64)
255 STATIC_CXX = false
256 else
257 STATIC_CXX = true
258 endif
259 endif
260
261 ifeq ($(LINK_INTO),AOUT)
262 LIBJVM.o =
263 LIBJVM_MAPFILE =
264 LIBS_VM = $(LIBS)
265 else
266 LIBJVM.o = $(JVM_OBJ_FILES)
267 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
268 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
269 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
270
|
216 # This has to be included here to allow changes to the source
217 # directories and excluded files before they are expanded
218 # by the definition of Src_Files.
219 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make
220
221 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
222 define findsrc
223 $(notdir $(shell find $(1)/. ! -name . -prune \
224 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
225 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
226 endef
227
228 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
229
230 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
231
232 JVM_OBJ_FILES = $(Obj_Files)
233
234 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
235
236 mapfile : $(MAPFILE) vm.def mapfile_ext
237 rm -f $@
238 awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
239 { system ("cat mapfile_ext"); system ("cat vm.def"); } \
240 else \
241 { print $$0 } \
242 }' > $@ < $(MAPFILE)
243
244 mapfile_reorder : mapfile $(REORDERFILE)
245 rm -f $@
246 cat $^ > $@
247
248 vm.def: $(Res_Files) $(Obj_Files)
249 sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@
250
251 mapfile_ext:
252 rm -f $@
253 touch $@
254 if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \
255 cat $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext > $@; \
256 fi
257
258 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
259 STATIC_CXX = false
260 else
261 ifeq ($(ZERO_LIBARCH), ppc64)
262 STATIC_CXX = false
263 else
264 STATIC_CXX = true
265 endif
266 endif
267
268 ifeq ($(LINK_INTO),AOUT)
269 LIBJVM.o =
270 LIBJVM_MAPFILE =
271 LIBS_VM = $(LIBS)
272 else
273 LIBJVM.o = $(JVM_OBJ_FILES)
274 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
275 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
276 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
277
|