jdk/makefiles/CompileNativeLibraries.gmk
author brutisso
Fri, 25 May 2012 22:35:13 +0200
changeset 12779 06778de5193e
parent 12317 9670c1610c53
child 12892 3ef14bab6254
permissions -rw-r--r--
7171936: LOG_G incorrectly defined in globalDefinitions.hpp Summary: Removed LOG_G and LOG_K. Moved LOG_M to where it is being used. Reviewed-by: twisti, johnc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    26
defalt: all
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
include $(SPEC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
include MakeBase.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    30
include NativeCompilation.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
# Setup the java compilers for the JDK build.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    33
include Setup.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    34
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    35
# Copy files (can now depend on $(COPY_FILES))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    36
include CopyFiles.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    37
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    38
# Include the javah generated headers.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    39
CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    40
CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    41
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    42
# Put the libraries here. Different locations for different host apis.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    43
ifeq ($(HOST_OS_API),posix)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    44
    ifneq ($(HOST_OS),macosx)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    45
        INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib/$(LIBARCH)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    46
        LIBARCHDIR=$(LIBARCH)/
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    47
    else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    48
        INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    49
        LIBARCHDIR=/
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    50
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    51
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    52
    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    53
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    54
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    55
$(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/newobjs/%$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    56
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    57
	$(CP) $< $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    58
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    59
BUILD_LIBRARIES=
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    60
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    61
# TODO: Temporary until awt is converted:
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    62
# OBJDIRNAME is the name of the directory where the object code is to
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    63
#   be placed. It's name depends on whether the data model architecture 
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    64
#   is 32-bit or not.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    65
ifneq ($(ARCH_DATA_MODEL), 32)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    66
  OBJDIRNAME  = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    67
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    68
  OBJDIRNAME  = obj$(OBJDIRNAME_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    69
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    70
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    71
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    72
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    73
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    74
                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    75
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    76
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    77
                        -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5 \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    78
		        -I$(JDK_TOPDIR)/src/share/native/java/io \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    79
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    80
		CFLAGS_posix:=-DUSE_MMAP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    81
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    82
			 $(EXPORT_ZIP_FUNCS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    83
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libzip/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    84
		LDFLAGS_winapi:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    85
                                -export:ZIP_ReadEntry -export:ZIP_GetNextEntry,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    86
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    87
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libzip,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    88
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    89
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    90
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    91
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    92
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    93
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    94
LIBUNPACK_LIB_FILE := $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    95
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    96
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    97
                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    98
		EXCLUDE_FILES:=main.cpp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    99
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   100
		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   101
			 -DNO_ZLIB -DUNPACK_JNI -DFULL,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   102
		CFLAGS_release:=-DPRODUCT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   103
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   104
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libunpack/mapfile-vers) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   105
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   106
		LDFLAGS_winapi:=-map:$(JDK_OUTPUTDIR)/newobjs/unpack.map /debug,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   107
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   108
		LDFLAGS_SUFFIX_posix:=$(LIBCXX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   109
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libunpack,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   110
		LIB:=$(LIBUNPACK_LIB_FILE),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   111
		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   112
		RC_FLAGS:=$(RC_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   113
			  /D "JDK_FNAME=unpack.dll" \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
			  /D "JDK_INTERNAL_NAME=unpack" \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   115
			  /D "JDK_FTYPE=0x2L"))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   116
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   117
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   118
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   119
ifeq ($(HOST_OS_API),winapi)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   120
    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(LIBUNPACK_LIB_FILE)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   121
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   122
	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.map,$<) $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   123
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   124
    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(LIBUNPACK_LIB_FILE)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   125
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   126
	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.pdb,$<) $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   127
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   128
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   129
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   130
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   131
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   132
                SRC:=$(JDK_TOPDIR)/src/share/native/common,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   133
		EXCLUDE_FILES:=check_version.c jdk_util.c jio.c jni_util.c verify_stub.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   134
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   135
		CFLAGS:=$(CFLAGS_JDKLIB) ${C_O_FLAG_HI} $(SHARED_LIBRARY_FLAGS), \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   136
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libverify/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   138
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   139
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libverify,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   140
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   141
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   142
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   143
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   144
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   145
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   146
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   147
                SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   148
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   149
		CFLAGS:=$(CFLAGS_JDKLIB) ${C_O_FLAG_NONE}\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   150
			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   151
		CFLAGS_winapi_debug:=-DLOGGING,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   152
		ARFLAGS:=$(ARFLAGS),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   153
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libfdlibm,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   154
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   155
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   156
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   157
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   158
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   159
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   160
LIBATTACH_EXCLUDE_FILES:=
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   161
ifneq ($(PLATFORM),solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   162
    LIBATTACH_EXCLUDE_FILES+=SolarisVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   163
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   164
ifneq ($(PLATFORM),linux)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   165
    LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   166
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   167
ifneq ($(PLATFORM),macosx)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   168
    LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   169
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   170
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   171
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   172
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tools/attach,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   173
		EXCLUDE_FILES:=$(LIBATTACH_EXCLUDE_FILES),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   174
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   175
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   176
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   177
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libattach/mapfile-$(PLATFORM)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   178
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   179
		LDFLAGS_solaris:=-ldoor,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   180
		LDFLAGS_winapi:=psapi.lib advapi32.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   181
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   182
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libattach,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   183
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   184
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   185
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   186
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   187
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   188
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   189
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   190
                SRC:=$(JDK_TOPDIR)/src/share/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   191
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   192
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   193
		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   194
                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   195
                        -I$(JDK_TOPDIR)/src/share/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   196
		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   197
                        -I$(JDK_TOPDIR)/src/share/back/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   198
                        -I$(JDK_TOPDIR)/src/share/back,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   199
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   200
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libdt_socket/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   201
		LDFLAGS_SUFFIX_linux:=-lpthread,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   202
		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   203
		LDFLAGS_SUFFIX_winapi:=-export:jdwpTransport_OnLoad ws2_32.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   204
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   205
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libdt_socket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   206
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   207
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   208
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   209
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   210
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   211
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   212
ifeq ($(HOST_OS_API),winapi)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   213
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   214
  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   215
                SRC:= $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   216
			$(JDK_TOPDIR)/src/share/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   217
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   218
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   219
		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   220
                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   221
                        -I$(JDK_TOPDIR)/src/share/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   222
		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   223
                        -I$(JDK_TOPDIR)/src/share/back/export, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   224
		LDFLAGS:=$(LDFLAGS_JDKLIB),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   225
		LDFLAGS_winapi:=-export:jdwpTransport_OnLoad,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   226
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   227
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libdt_shmem,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   228
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   229
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   230
  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   231
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   232
endif # PLATFORM
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   233
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   234
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   235
# JDWP_LOGGING causes log messages to be compiled into the library. These reference the 
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   236
# __FILE__ macro which here expands to the absolute path of the file while the old build 
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   237
# system used a relative path. This causes the binaries to differ in size.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   238
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   239
                SRC:=$(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/back,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   240
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   241
		CFLAGS:=$(CFLAGS_JDKLIB) -DJDWP_LOGGING $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   242
		 -I$(JDK_TOPDIR)/src/share/transport/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   243
                 -I$(JDK_TOPDIR)/src/share/back/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   244
                 -I$(JDK_TOPDIR)/src/share/npt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   245
                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   246
                 -I$(JDK_TOPDIR)/src/share/back \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   247
                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/back \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   248
		 -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   249
		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   250
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libjdwp/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   251
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   252
		LDFLAGS_SUFFIX_linux:=-ldl,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   253
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjdwp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   254
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   255
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   256
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   257
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   258
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   259
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   260
ifneq ($(PLATFORM),solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   261
   LIBJAAS_EXCLUDE_FILES:=Solaris.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   262
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   263
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   264
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   265
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/security/auth/module,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   266
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   267
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   268
		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   269
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   270
		LDFLAGS_winapi:=netapi32.lib user32.lib mpr.lib advapi32.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   271
		LDFLAGS_solaris:=$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libjaas/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   272
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   273
		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   274
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjaas,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   275
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   276
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   277
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   278
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   279
# Oddly enough, it is called jaas_nt.dll under winapi and libjaas_unix.so under posix.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   280
ifeq ($(PLATFORM),windows)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   281
    $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll : $(JDK_OUTPUTDIR)/newobjs/jaas.dll
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   282
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   283
	$(CP) $< $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   284
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   285
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   286
    $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   287
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   288
	$(CP) $< $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   289
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   290
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   291
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   292
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   293
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   294
ifeq ($(HOST_OS_API),posix)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   295
  # TODO make this work on macosx
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   296
  ifneq ($(HOST_OS),macosx)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   297
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   298
# NOTE: Change -L flag to point to new lib location after converting libnio. Also
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   299
#       add dependency on nio from sctp.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   300
    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   301
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch/sctp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   302
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   303
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   304
			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   305
			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   306
			-I$(JDK_TOPDIR)/src/share/native/java/net \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   307
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   308
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   309
		CFLAGS_linux:=-Werror,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   310
		LDFLAGS:=$(LDFLAGS_JDKLIB) -L$(JDK_OUTPUTDIR)/lib/$(LIBARCHDIR)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   311
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libsctp/mapfile-vers) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   312
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   313
		LDFLAGS_SUFFIX_linux:=-lpthread,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   314
		LDFLAGS_SUFFIX_posix:=-ldl -lnio -lnet,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   315
		LDFLAGS_SUFFIX_solaris:=-lsocket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   316
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   317
		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   318
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libsctp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   319
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   320
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   321
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   322
  endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   323
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   324
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   325
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   326
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   327
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   328
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   329
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tracing/dtrace,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   330
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   331
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   332
			-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   333
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   334
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libjsdt/mapfile-vers) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   335
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   336
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) -ldl,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   337
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjsdt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   338
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   339
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   340
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   341
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   342
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   343
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   344
ifdef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   345
    # TODO: Update awt lib path when awt is converted
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   346
    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   347
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   348
		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   349
		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   350
			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   351
			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   352
			       cmsnamed.c cmsopt.c cmspack.c cmspcs.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   353
			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   354
			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   355
			       LCMS.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   356
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   357
		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) $(C_O_FLAG_NORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   358
			$(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   359
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   360
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   361
		CFLAGS_solaris:=-xc99=no_lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   362
		CFLAGS_winapi:=-DCMS_IS_WINDOWS_,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   363
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   364
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/liblcms/mapfile-vers),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   365
		LDFLAGS_posix:=-L$(JDK_OUTPUTDIR)/lib/$(LIBARCHDIR)xawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   366
		LDFLAGS_solaris:=/usr/lib$(ISA_DIR)/libm.so.2,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   367
		LDFLAGS_winapi:=$(JDK_OUTPUTDIR)/tmp/sun/sun.awt/awt/$(OBJDIRNAME)/awt.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   368
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   369
		LDFLAGS_SUFFIX_posix:=-lawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   370
		LDFLAGS_SUFFIX_linux:=-lm,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   371
		BIN:=$(JDK_OUTPUTDIR)/newobjs/liblcms,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   372
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   373
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   374
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   375
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   376
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   377
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   378
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   379
ifdef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   380
    BUILD_LIBJPEG_MAPFILE := makefiles/mapfiles/libjpeg/mapfile-vers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   381
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   382
    BUILD_LIBJPEG_MAPFILE := makefiles/mapfiles/libjpeg/mapfile-vers-closed
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   383
    BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   384
    BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   385
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   386
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   387
ifeq ($(PLATFORM), solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   388
    ifneq ($(ARCH), amd64)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   389
        BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(ARCH)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   390
        $(JDK_OUTPUTDIR)/newobjs/libjpeg/mapfile-vers : $(JDK_TOPDIR)/$(BUILD_LIBJPEG_MAPFILE) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   391
							$(BUILD_LIBJPEG_REORDER)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   392
		$(MKDIR) -p $(@D)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   393
		$(CAT) $(JDK_TOPDIR)/$(BUILD_LIBJPEG_MAPFILE) > $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   394
		$(SED) -e 's=OUTPUTDIR=$(JDK_OUTPUTDIR)=' $(BUILD_LIBJPEG_REORDER) >> $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   395
        LIBJPEG_MAPFILE:=$(JDK_OUTPUTDIR)/newobjs/libjpeg/mapfile-vers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   396
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   397
        $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX): \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   398
			$(JDK_OUTPUTDIR)/newobjs/libjpeg/mapfile-vers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   399
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   400
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   401
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   402
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   403
# or 'vfork'": this warning indicates that some variable is placed to
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   404
# a register by optimized compiler and it's value might be lost on longjmp().
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   405
# Recommended way to avoid such warning is to declare the variable as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   406
# volatile to prevent the optimization. However, this approach does not
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   407
# work because we have to declare all variables as volatile in result.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   408
#ifndef CROSS_COMPILE_ARCH
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   409
#    CC_43_OR_NEWER := \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   410
#        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   411
#              \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   412
#    ifeq ($(CC_43_OR_NEWER),1)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   413
#        BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   414
#    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   415
#endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   416
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   417
$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   418
                SRC:=$(BUILD_LIBJPEG_CLOSED_SRC) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   419
		     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   420
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   421
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   422
			$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   423
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   424
		CFLAGS_solaris:=-xF,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   425
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   426
			 $(call SET_SHARED_LIBRARY_MAPFILE,$(BUILD_LIBJPEG_MAPFILE))\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   427
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   428
		LDFLAGS_linux:=-ldl,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   429
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   430
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjpeg,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   431
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   432
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   433
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   434
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   435
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   436
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   437
ifndef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   438
    FONT_HEADERS := -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   439
    BUILD_LIBFONTMANAGER_MAPFILE := makefiles/mapfiles/libfontmanager/mapfile-vers
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   440
    LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   441
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   442
    FONT_HEADERS := $(FREETYPE2_CFLAGS)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   443
    BUILD_LIBFONTMANAGER_MAPFILE := makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   444
    BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   445
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   446
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   447
ifeq ($(PLATFORM),windows)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   448
    LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   449
				    X11TextRenderer.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   450
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   451
    LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   452
				    lcdglyph.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   453
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   454
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   455
BUILD_LIBFONTMANAGER_CFLAGS_COMMON := $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   456
			-DLE_STANDALONE -DHEADLESS \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   457
			$(FONT_HEADERS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   458
			-I$(JDK_TOPDIR)/src/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   459
			-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   460
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   461
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   462
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   463
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   464
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   465
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   466
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   467
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   468
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   469
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/font\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   470
		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   471
		EXCLUDE_FILES:=$(LIBFONTMANAGER_EXCLUDE_FILES) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   472
			       AccelGlyphCache.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   473
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   474
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   475
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   476
		CFLAGS_posix:=$(C_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   477
		CXXFLAGS_posix:=$(CXX_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   478
		CFLAGS_windows=$(C_O_FLAG_NORM)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   479
				-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   480
				-DCC_NOEX, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   481
		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   482
			 $(call SET_SHARED_LIBRARY_MAPFILE,$(BUILD_LIBFONTMANAGER_MAPFILE)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   483
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   484
		LDFLAGS_solaris:=-L$(JDK_OUTPUTDIR)/lib/$(LIBARCHDIR)headless,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   485
		LDFLAGS_windows:=advapi32.lib user32.lib gdi32.lib $(JDK_OUTPUTDIR)/tmp/sun/sun.awt/awt/$(OBJDIRNAME)/awt.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   486
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   487
				$(BUILD_LIBFONTMANAGER_FONTLIB),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   488
		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   489
		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   490
		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   491
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libfontmanager,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   492
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   493
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   494
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   495
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   496
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   497
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   498
ifndef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   499
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   500
#    ifeq ($(PLATFORM), linux)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   501
#        ifeq ("$(CC_VER_MAJOR)", "3")
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   502
#            OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   503
#        endif                           
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   504
#    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   505
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   506
# The resulting size of the t2k lib file is (at least on linux) dependant on the order of 
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   507
# the input .o files. Because of this the new build will differ in size to the old build.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   508
    BUILD_LIBT2K_CFLAGS_COMMON:=-I$(JDK_TOPDIR)/src/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   509
		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   510
		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   511
		            -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   512
		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   513
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   514
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   515
		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   516
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   517
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   518
    $(eval $(call SetupNativeCompilation,BUILD_LIBT2K,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   519
                SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   520
		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   521
		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   522
		EXCLUDE_FILES:=orion.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   523
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   524
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(C_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   525
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(CXX_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   526
		CFLAGS_windows=-DCC_NOEX, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   527
		CXXFLAGS_windows=-DCC_NOEX, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   528
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   529
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libt2k/mapfile-vers) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   530
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   531
		LDFLAGS_windows:=user32.lib $(JDK_OUTPUTDIR)/newobjs/fontmanager.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   532
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   533
		LDFLAGS_SUFFIX_linux:=$(LIBCXX) $(LIBM) -L$(INSTALL_LIBRARIES_HERE) -lfontmanager,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   534
		LDFLAGS_SUFFIX_solaris:=$(LIBCXX) $(LIBM) -L$(INSTALL_LIBRARIES_HERE) -lfontmanager -lawt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   535
					-lawt_xawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   536
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libt2k,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   537
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   538
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   539
    # t2k is linked against fontmanager
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   540
    $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX): \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   541
	$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   542
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   543
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   544
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   545
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   546
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   547
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   548
ifeq ($(PLATFORM), windows)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   549
    ifeq ($(ARCH_DATA_MODEL), 32)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   550
        KERNEL32_LIB := kernel32.lib
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   551
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   552
    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   553
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   554
		INCLUDE_FILES:=jawt.cpp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   555
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   556
		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   557
			-EHsc -DUNICODE -D_UNICODE \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   558
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   559
		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   560
		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   561
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   562
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/windows, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   563
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   564
			 advapi32.lib $(JDK_OUTPUTDIR)/tmp/sun/sun.awt/awt/$(OBJDIRNAME)/awt.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   565
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   566
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   567
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   568
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   569
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   570
		$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   571
	echo Copying $(@F)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   572
	$(CP) $(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@	
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   573
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   574
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   575
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   576
else # PLATFORM not windows
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   577
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   578
    ifndef BUILD_HEADLESS_ONLY
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   579
        MAWT_AWT_LIB =-lawt_xawt
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   580
    else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   581
        MAWT_AWT_LIB =-lawt_headless
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   582
        HEADLESS_CFLAG += -DHEADLESS
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   583
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   584
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   585
    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   586
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   587
		INCLUDE_FILES:=jawt.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   588
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   589
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM), \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   590
		CFLAGS_linux:=$(HEADLESS_CFLAG),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   591
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   592
			 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libjawt/mapfile-vers) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   593
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   594
		LDFLAGS_solaris:=-L/usr/openwin/sfw/lib$(ISA_DIR) -L/usr/openwin/lib$(ISA_DIR),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   595
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(MAWT_AWT_LIB) -lawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   596
		LDFLAGS_SUFFIX_solaris:=-lXrender,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   597
		BIN:=$(JDK_OUTPUTDIR)/newobjs/libjawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   598
		LIB:=$(JDK_OUTPUTDIR)/newobjs/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   599
endif # PLATFORM
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   600
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   601
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   602
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   603
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   604
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   605
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   606
all: $(COPY_FILES) $(BUILD_LIBRARIES)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   607
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   608
.PHONY: all