jdk/make/java/jli/Makefile
changeset 8768 4e98f3b11578
parent 7668 d4a77089c587
child 8793 a25480ff1a6b
--- a/jdk/make/java/jli/Makefile	Tue Mar 08 15:10:48 2011 -0800
+++ b/jdk/make/java/jli/Makefile	Wed Mar 09 19:52:48 2011 -0500
@@ -79,13 +79,17 @@
 	zutil.c
 
 ifneq ($(PLATFORM), windows)
-
-FILES_c += \
-	$(CTARGDIR)ergo.c \
-	$(CTARGDIR)ergo_$(ERGO_FAMILY).c
+  FILES_c += ergo.c 
+  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
+  # if the architecture specific ergo file exists then
+  # use it, else use the generic definitions from ergo.c
+  ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),)
+    FILES_c += $(ERGO_ARCH_FILE)
+  else
+    OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO
+  endif
 endif
 
-
 # Names of arch directories
 LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
 ifeq ($(PLATFORM), solaris)