1 #
   2 # Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 BUILDDIR  = ../../..
  27 MODULE    = swing
  28 PACKAGE   = javax.swing.plaf
  29 PRODUCT   = com
  30 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
  31 include $(BUILDDIR)/common/Defs.gmk
  32 
  33 #
  34 # Files
  35 #
  36 include FILES.gmk
  37 AUTO_FILES_JAVA_DIRS = javax/swing/plaf sun/swing com/sun/java/swing/plaf
  38 
  39 ifeq ($(PLATFORM), windows)
  40     # Don't build GTK L&F on Windows
  41     AUTO_JAVA_PRUNE = gtk
  42 endif
  43 
  44 ifdef DISABLE_NIMBUS
  45     AUTO_JAVA_PRUNE += nimbus
  46 endif
  47 
  48 MISC_FILES = $(MISC_SWING_FILES)
  49 ifneq ($(PLATFORM), windows)
  50     # Only include GTK icons on Solaris/Linux
  51     MISC_FILES += $(MISC_SWING_FILES_UNIX)
  52 endif
  53 
  54 NIMBUS_GENSRC_DIR = $(GENSRCDIR)/javax/swing/plaf/nimbus
  55 NIMBUS_SKIN_FILE = $(SWING_SRC)/plaf/nimbus/skin.laf
  56 NIMBUS_GENERATOR_JAR = $(BUILDTOOLJARDIR)/generatenimbus.jar
  57 
  58 FILES_java = $(FILES_SWING_java)
  59 
  60 #
  61 # Resources
  62 #
  63 LOCALE_SET_DEFINITION = jre
  64 RESOURCE_BUNDLES_COMPILED_PROPERTIES = \
  65         com/sun/swing/internal/plaf/basic/resources/basic.properties \
  66         com/sun/swing/internal/plaf/metal/resources/metal.properties \
  67         com/sun/swing/internal/plaf/synth/resources/synth.properties \
  68         com/sun/java/swing/plaf/motif/resources/motif.properties \
  69         com/sun/java/swing/plaf/windows/resources/windows.properties
  70 ifneq ($(PLATFORM), windows)
  71     # Only compile GTK resource bundles on Solaris/Linux
  72     RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
  73         com/sun/java/swing/plaf/gtk/resources/gtk.properties
  74 endif
  75 
  76 #
  77 # Rules.
  78 # Process LOGO_ICONS and Motif Icons first.
  79 #
  80 build: $(LOGO_ICONS) $(MISC_SWING_FILES_MOTIF_GIF) $(MISC_SWING_FILES_MOTIF_PNG) other_files
  81 
  82 $(NIMBUS_GENSRC_DIR): $(NIMBUS_SKIN_FILE) $(NIMBUS_GENERATOR_JAR)
  83         @$(ECHO) "Generating Nimbus source files:"
  84         $(RM) -r $(NIMBUS_GENSRC_DIR)
  85         $(BOOT_JAVA_CMD) -jar $(NIMBUS_GENERATOR_JAR) \
  86             -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(GENSRCDIR) \
  87             -packagePrefix $(PACKAGE).nimbus -lafName Nimbus
  88         @$(ECHO) "Finished generating Nimbus source files"
  89 
  90 clean:: classes.clean
  91         $(RM) -r $(NIMBUS_GENSRC_DIR)
  92 
  93 #
  94 # Include
  95 #
  96 ifndef DISABLE_NIMBUS
  97     CLASSES_INIT = $(NIMBUS_GENSRC_DIR)
  98 endif
  99 
 100 include $(BUILDDIR)/common/Classes.gmk
 101 
 102 ifndef OPENJDK
 103 $(LOGO_ICONS): $(CLASSBINDIR)/%.png: $(CLOSED_SRC)/share/classes/%.png
 104         $(install-file)
 105 
 106 $(MISC_SWING_FILES_MOTIF_GIF): $(CLASSBINDIR)/%.gif: $(CLOSED_SRC)/share/classes/%.gif
 107         $(install-file)
 108 
 109 $(MISC_SWING_FILES_MOTIF_PNG): $(CLASSBINDIR)/%.png: $(CLOSED_SRC)/share/classes/%.png
 110         $(install-file)
 111 endif   
 112 
 113 other_files: $(MISC_FILES)
 114 
 115 $(CLASSBINDIR)/%.wav: $(SHARE_SRC)/classes/%.wav
 116         $(install-file)
 117 
 118 $(CLASSBINDIR)/%.gif: $(SHARE_SRC)/classes/%.gif
 119         $(install-file)
 120 
 121 $(CLASSBINDIR)/%.png: $(SHARE_SRC)/classes/%.png
 122         $(install-file)
 123 
 124 $(CLASSBINDIR)/%.xml: $(SHARE_SRC)/classes/%.xml
 125         $(install-file)
 126 
 127 $(CLASSBINDIR)/%.css: $(SHARE_SRC)/classes/%.css
 128         $(install-file)
 129 
 130 $(CLASSBINDIR)/%.bdtd: $(SHARE_SRC)/classes/%.bdtd
 131         $(install-file)
 132 
 133 $(CLASSBINDIR)/%.txt: $(SHARE_SRC)/classes/%.txt
 134         $(install-file)
 135