changeset 6139:7ecc80d2ff2e

8003477: build-infra: Remove explicit source file listings for libs when possible Reviewed-by: ohair, ohrstrom
author erikj
date Wed, 28 Nov 2012 13:29:35 +0100
parents ad5741112252
children 51d2fd6d9850
files makefiles/CompileNativeLibraries.gmk
diffstat 1 files changed, 25 insertions(+), 181 deletions(-) [+]
line wrap: on
line diff
--- a/makefiles/CompileNativeLibraries.gmk	Wed Nov 28 13:20:43 2012 +0100
+++ b/makefiles/CompileNativeLibraries.gmk	Wed Nov 28 13:29:35 2012 +0100
@@ -905,57 +905,34 @@
 
 ##########################################################################################
 
-BUILD_LIBZIP_FILES:=\
-        CRC32.c \
-	Adler32.c \
-	Deflater.c \
-	Inflater.c \
-	ZipFile.c \
-	zip_util.c
-
+BUILD_LIBZIP_EXCLUDES :=
 ifeq ($(USE_EXTERNAL_LIBZ),true)
-	LIBZ:=-lz
+    LIBZ := -lz
+    LIBZIP_EXCLUDES += zlib-1.2.5
 else
-BUILD_LIBZIP_FILES += \
-	compress.c \
-	deflate.c \
-	gzclose.c \
-	gzlib.c \
-	gzread.c \
-	gzwrite.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zadler32.c \
-	zcrc32.c \
-	zutil.c
-LIBZ_INCLUDE:=-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+    ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
 endif
 
-BUILD_LIBZIP_REORDER:=
+BUILD_LIBZIP_REORDER :=
 ifeq ($(OPENJDK_TARGET_OS), solaris)
     ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-        BUILD_LIBZIP_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
+        BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
     endif
 endif
 
 ifeq ($(LIBZIP_CAN_USE_MMAP), true)
-     BUILD_LIBZIP_MMAP:=-DUSE_MMAP
+     BUILD_LIBZIP_MMAP := -DUSE_MMAP
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
                 LIBRARY:=zip,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip \
-                     $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
-		INCLUDE_FILES:=$(BUILD_LIBZIP_FILES), \
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
+		SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip,\
+		EXCLUDES:=$(LIBZIP_EXCLUDES),\
 		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(LIBZ_INCLUDE) \
+                        $(ZLIB_CPPFLAGS) \
 		        -I$(JDK_TOPDIR)/src/share/native/java/io \
                         -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io,\
 		CFLAGS_posix:=$(BUILD_LIBZIP_MMAP) -UDEBUG,\
@@ -1238,15 +1215,7 @@
     $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
                 LIBRARY:=lcms,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
-		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
-		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
-			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
-			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
-			       cmsnamed.c cmsopt.c cmshalf.c cmspack.c cmspcs.c \
-			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
-			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
-			       LCMS.c,\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) \
@@ -2006,7 +1975,7 @@
 ##########################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS_API),posix)
-  # TODO make this work on macosx
+
   ifneq ($(OPENJDK_TARGET_OS),macosx)
 
     SCTP_WERROR := -Werror
@@ -2034,7 +2003,6 @@
 		LDFLAGS_SUFFIX_posix:=-lnio -lnet,\
 		LDFLAGS_SUFFIX_solaris:=-lsocket -ljava -ljvm -lc,\
 		LDFLAGS_SUFFIX_macosx:=-ljava -ljvm,\
-		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsctp))
 
     BUILD_LIBRARIES += $(BUILD_LIBSCTP)
@@ -2105,7 +2073,7 @@
 
 ifneq ($(USE_EXTERNAL_LIBZ),true)
 	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBJLI_CFLAGS += $(LIBZ_INCLUDE)
+	LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
 	BUILD_LIBJLI_FILES += \
 		inflate.c \
 		inftrees.c \
@@ -2416,8 +2384,14 @@
 	$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen \
-        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+else
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
+endif
+
 
 LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
 	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
@@ -2443,104 +2417,11 @@
 	LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 endif
 
-LIBSPLASHSCREEN_FILES:=\
-	java_awt_SplashScreen.c \
-	splashscreen_gfx_impl.c \
-	splashscreen_gif.c \
-	splashscreen_impl.c \
-	splashscreen_jpeg.c \
-	splashscreen_png.c \
-	png.c \
-	pngerror.c \
-	pngget.c \
-	pngmem.c  \
-	pngpread.c \
-	pngread.c \
-	pngrio.c \
-	pngrtran.c \
-	pngrutil.c \
-	pngset.c \
-	pngtrans.c \
-	pngwio.c \
-	pngwrite.c \
-	pngwtran.c \
-	pngwutil.c \
-	dgif_lib.c \
-	gif_err.c \
-	gifalloc.c \
-	jcomapi.c \
-	jdapimin.c \
-	jdapistd.c \
-	jdcoefct.c \
-	jdcolor.c \
-	jddctmgr.c \
-	jdhuff.c \
-	jdinput.c \
-	jdmainct.c \
-	jdmarker.c \
-	jdmaster.c \
-	jdmerge.c \
-	jdphuff.c \
-	jdpostct.c \
-	jdsample.c \
-	jerror.c \
-	jidctflt.c \
-	jidctfst.c \
-	jidctint.c \
-	jidctred.c \
-	jmemmgr.c \
-	jmemnobs.c \
-	jquant1.c \
-	jquant2.c \
-	jutils.c \
-	jcapimin.c \
-	jcapistd.c \
-	jccoefct.c \
-	jccolor.c \
-	jcdctmgr.c \
-	jchuff.c \
-	jcinit.c \
-	jcmainct.c \
-	jcmarker.c \
-	jcmaster.c \
-	jcparam.c \
-	jcphuff.c \
-	jcprepct.c \
-	jcsample.c \
-	jctrans.c \
-	jdtrans.c \
-	jfdctflt.c \
-	jfdctfst.c \
-	jfdctint.c
-
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-LIBSPLASHSCREEN_FILES += splashscreen_sys.c
-else
-LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
-LIBSPLASHSCREEN_FILES += splashscreen_sys.m
-endif
-
 LIBSPLASHSCREEN_LDFLAGS_SUFFIX:=
 
 ifneq ($(USE_EXTERNAL_LIBZ),true)
 	LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBSPLASHSCREEN_CFLAGS += $(LIBZ_INCLUDE)
-	LIBSPLASHSCREEN_FILES += \
-		compress.c \
-		deflate.c \
-		gzclose.c \
-		gzlib.c \
-		gzread.c \
-		gzwrite.c \
-		infback.c \
-		inffast.c \
-		inflate.c \
-		inftrees.c \
-		trees.c \
-		uncompr.c \
-		zadler32.c \
-		zcrc32.c \
-		zutil.c
+	LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
@@ -2560,7 +2441,7 @@
 		LIBRARY:=splashscreen,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBSPLASHSCREEN_DIRS),\
-		INCLUDE_FILES:=$(LIBSPLASHSCREEN_FILES),\
+		EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB),\
@@ -2683,14 +2564,13 @@
 BUILD_LIBKRB5_NAME:=
 ifeq ($(OPENJDK_TARGET_OS), windows)
      BUILD_LIBKRB5_NAME:=w2k_lsa_auth
-     BUILD_LIBKRB5_FILES:=NativeCreds.c WindowsDirectory.c
      BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
 			 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
 			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
      BUILD_LIBKRB5_NAME:=osxkrb5
-     BUILD_LIBKRB5_FILES:=nativeccache.c
+     BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=-framework Kerberos
 endif
 
@@ -2698,9 +2578,7 @@
 $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
 		LIBRARY:=$(BUILD_LIBKRB5_NAME),\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-                     $(BUILD_LIBKRB5_SRC) ,\
-		INCLUDE_FILES:=$(BUILD_LIBKRB5_FILES),\
+		SRC:=$(BUILD_LIBKRB5_SRC),\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
@@ -3071,18 +2949,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBAPPLESCRIPTENGINE_FILES:=\
-	AppleScriptEngine.m \
-        AppleScriptExecutionContext.m \
-        AS_NS_ConversionUtils.m \
-        NS_Java_ConversionUtils.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE,\
 		LIBRARY:=AppleScriptEngine,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/apple/applescript,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBAPPLESCRIPTENGINE_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
@@ -3107,18 +2978,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSXAPP_FILES:=\
-	NSApplicationAWT.m \
-	QueuingApplicationDelegate.m \
-	PropertiesUtilities.m \
-	ThreadUtilities.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP,\
 		LIBRARY:=osxapp,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/sun/osxapp,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSXAPP_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
@@ -3151,14 +3015,6 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSX_FILES:=\
-    Dispatch.m \
-    CFileManager.m \
-    KeystoreImpl.m \
-    JavaAppLauncher.m \
-    MacOSXPreferencesFile.m \
-    SCDynamicStoreConfig.m
-
 LIBOSX_DIRS:=\
   $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
   $(JDK_TOPDIR)/src/macosx/native/java/util \
@@ -3171,7 +3027,6 @@
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBOSX_DIRS),\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSX_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
                         $(foreach dir,$(LIBOSX_DIRS),-I$(dir)) \
@@ -3341,22 +3196,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-LIBOSXUI_FILES:=\
-        AquaFileView.m \
-        AquaLookAndFeel.m \
-        AquaNativeResources.m \
-        JRSUIConstantSync.m \
-        JRSUIController.m \
-        JRSUIFocus.m \
-        ScreenPopupFactory.m \
-        ScreenMenu.m
-
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI,\
 		LIBRARY:=osxui,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/com/apple/laf,\
 		LANG:=C,\
-		INCLUDE_FILES:=$(LIBOSXUI_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
                         -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \