1 #
   2 # Copyright (c) 2006, 2008, 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   = java2d
  28 PRODUCT  = sun
  29 include $(BUILDDIR)/common/Defs.gmk
  30 
  31 ifdef OPENJDK
  32     SUBDIRS += lcms
  33     ICCPROFILE_SRC_DIR = $(SHARE_SRC)/lib/cmm/lcms
  34 else # !OPENJDK
  35     SUBDIRS += kcms
  36     ICCPROFILE_SRC_DIR = $(CLOSED_SRC)/share/lib/cmm/kcms
  37 endif # OPENJDK
  38 
  39 include $(BUILDDIR)/common/Subdirs.gmk
  40 
  41 #
  42 # ICC Profiles used by the CMM.
  43 #
  44 ICCPROFILE_DEST_DIR = $(LIBDIR)/cmm
  45 
  46 iccprofiles: $(ICCPROFILE_DEST_DIR)/sRGB.pf $(ICCPROFILE_DEST_DIR)/GRAY.pf \
  47              $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf $(ICCPROFILE_DEST_DIR)/PYCC.pf \
  48              $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
  49 
  50 $(ICCPROFILE_DEST_DIR)/sRGB.pf: $(ICCPROFILE_SRC_DIR)/sRGB.pf
  51         $(install-file)
  52         $(call chmod-file, 444)
  53 
  54 $(ICCPROFILE_DEST_DIR)/GRAY.pf: $(ICCPROFILE_SRC_DIR)/GRAY.pf
  55         $(install-file)
  56         $(call chmod-file, 444)
  57 
  58 $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf: $(ICCPROFILE_SRC_DIR)/CIEXYZ.pf
  59         $(install-file)
  60         $(call chmod-file, 444)
  61 
  62 $(ICCPROFILE_DEST_DIR)/PYCC.pf: $(ICCPROFILE_SRC_DIR)/PYCC.pf
  63         $(install-file)
  64         $(call chmod-file, 444)
  65 
  66 $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf: $(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf
  67         $(install-file)
  68         $(call chmod-file, 444)
  69 
  70 iccprofiles.clean:
  71         $(RM) -r $(ICCPROFILE_DEST_DIR)
  72 
  73 
  74 clobber: iccprofiles.clean
  75         $(SUBDIRS-loop)
  76 
  77 clean: iccprofiles.clean
  78         $(SUBDIRS-loop)
  79 
  80 all build:: iccprofiles
  81         $(SUBDIRS-loop)
  82 
  83 openjdk::
  84         $(MAKE) OPENJDK=true build
  85 
  86 .PHONY: iccprofiles iccprofiles.clean copy-files openjdk