ModuleWrapper.gmk revision 1289:5a5a7a59ebdd
133965Sjdp# 278828Sobrien# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 378828Sobrien# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 433965Sjdp# 533965Sjdp# This code is free software; you can redistribute it and/or modify it 633965Sjdp# under the terms of the GNU General Public License version 2 only, as 733965Sjdp# published by the Free Software Foundation. Oracle designates this 833965Sjdp# particular file as subject to the "Classpath" exception as provided 933965Sjdp# by Oracle in the LICENSE file that accompanied this code. 1033965Sjdp# 1133965Sjdp# This code is distributed in the hope that it will be useful, but WITHOUT 1233965Sjdp# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1333965Sjdp# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1433965Sjdp# version 2 for more details (a copy is included in the LICENSE file that 1533965Sjdp# accompanied this code). 1633965Sjdp# 1733965Sjdp# You should have received a copy of the GNU General Public License version 1833965Sjdp# 2 along with this work; if not, write to the Free Software Foundation, 1933965Sjdp# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2033965Sjdp# 2133965Sjdp# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2233965Sjdp# or visit www.oracle.com if you need additional information or have any 2333965Sjdp# questions. 2433965Sjdp# 2533965Sjdp 2633965Sjdp################################################################################ 2733965Sjdp# This makefile is called from Main.gmk, through a macro in MakeHelpers.gmk 2833965Sjdp# and wraps calls to makefiles for specific modules and build phases. Having 2933965Sjdp# this wrapper reduces the need for boilerplate code. It also provides 3033965Sjdp# opportunity for automatic copying of files to an interim exploded runnable 3133965Sjdp# image. 3233965Sjdp 3333965Sjdpdefault: all 3433965Sjdp 3533965Sjdpinclude $(SPEC) 3633965Sjdpinclude MakeBase.gmk 3733965Sjdp 3833965Sjdp# All makefiles should add the targets to be built to this variable. 3933965SjdpTARGETS := 4033965Sjdp 4133965Sjdp# Include the file being wrapped. 4233965Sjdpinclude $(MAKEFILE_PREFIX)-$(MODULE).gmk 4333965Sjdp 4433965Sjdp# Setup copy rules from the modules directories to the jdk image directory. 4533965Sjdpifeq ($(OPENJDK_TARGET_OS), windows) 4633965Sjdp TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map 4733965Sjdp 4833965Sjdp $(eval $(call SetupCopyFiles,COPY_LIBS_TO_BIN, \ 4933965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ 5033965Sjdp DEST := $(JDK_OUTPUTDIR)/bin, \ 5133965Sjdp FILES := $(filter $(TO_BIN_FILTER), \ 5233965Sjdp $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \ 5333965Sjdp $(TARGETS))))) 5433965Sjdp 5533965Sjdp $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \ 5633965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ 5733965Sjdp DEST := $(JDK_OUTPUTDIR)/lib, \ 5833965Sjdp FILES := $(filter-out $(TO_BIN_FILTER), \ 5933965Sjdp $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \ 6033965Sjdp $(TARGETS))))) 6133965Sjdp 6233965Sjdpelse 6333965Sjdp $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \ 6433965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ 6533965Sjdp DEST := $(JDK_OUTPUTDIR)/lib, \ 6633965Sjdp FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \ 6733965Sjdp $(TARGETS)))) 6833965Sjdpendif 6989857Sobrien 7033965Sjdp$(eval $(call SetupCopyFiles,COPY_INCLUDE, \ 7133965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \ 7233965Sjdp DEST := $(JDK_OUTPUTDIR)/include, \ 7333965Sjdp FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)/%, \ 7433965Sjdp $(TARGETS)))) 7533965Sjdp 7633965Sjdp$(eval $(call SetupCopyFiles,COPY_CMDS, \ 7733965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \ 7833965Sjdp DEST := $(JDK_OUTPUTDIR)/bin, \ 7933965Sjdp FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/%, $(TARGETS)))) 8033965Sjdp 8133965Sjdp$(eval $(call SetupCopyFiles,COPY_CONF, \ 8233965Sjdp SRC := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE), \ 8333965Sjdp DEST := $(JDK_OUTPUTDIR)/conf, \ 8433965Sjdp FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)/%, \ 8533965Sjdp $(TARGETS)))) 8633965Sjdp 8733965Sjdpall: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ 8833965Sjdp $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) 8933965Sjdp