jdk/makefiles/CompileNativeLibraries.gmk
author erikj
Thu, 07 Jun 2012 20:40:50 -0700
changeset 12892 3ef14bab6254
parent 12317 9670c1610c53
child 13164 72c5d01a857d
permissions -rw-r--r--
7170079: Adjustments to build-infra makefiles Reviewed-by: ohair, ohrstrom, ihse, jonas Contributed-by: jonas <jonas.oreland@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>
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
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    55
$(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/objs/%$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    56
	$(ECHO) Copying $(@F)
12317
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
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    73
BUILD_LIBZIP_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    74
        CRC32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    75
	Adler32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    76
	Deflater.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    77
	Inflater.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    78
	ZipFile.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    79
	zip_util.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    80
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    81
ifeq ($(USE_EXTERNAL_LIBZ),true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    82
	LIBZ := -lz
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    83
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    84
BUILD_LIBZIP_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    85
	compress.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    86
	deflate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    87
	gzclose.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    88
	gzlib.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    89
	gzread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    90
	gzwrite.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    91
	infback.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    92
	inffast.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    93
	inflate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    94
	inftrees.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    95
	trees.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    96
	uncompr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    97
	zadler32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    98
	zcrc32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    99
	zutil.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   100
	LIBZ_INCLUDE := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   101
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   102
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   103
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   104
                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   105
                     $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   106
		INCLUDE_FILES := $(BUILD_LIBZIP_FILES), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   107
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   108
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   109
                        $(LIBZ_INCLUDE) \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   110
		        -I$(JDK_TOPDIR)/src/share/native/java/io \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   111
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   112
		CFLAGS_posix:=-DUSE_MMAP -UDEBUG,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   113
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   115
			 $(EXPORT_ZIP_FUNCS), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   116
		LDFLAGS_winapi:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   117
                                -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   118
                                java.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   119
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBZ),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   120
		BIN:=$(JDK_OUTPUTDIR)/objs/libzip,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   121
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   122
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   123
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   124
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   125
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   126
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   127
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
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   130
LIBUNPACK_LIB_FILE := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   131
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   132
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   133
                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   134
		EXCLUDE_FILES:=main.cpp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   135
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   136
		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
			 -DNO_ZLIB -DUNPACK_JNI -DFULL,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   138
		CFLAGS_release:=-DPRODUCT,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   139
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   140
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   141
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   142
		LDFLAGS_winapi:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map /debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   143
				jvm.lib java.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   144
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   145
		LDFLAGS_SUFFIX_posix:=$(LIBCXX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   146
		BIN:=$(JDK_OUTPUTDIR)/objs/libunpack,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   147
		LIB:=$(LIBUNPACK_LIB_FILE),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   148
		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   149
		RC_FLAGS:=$(RC_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   150
			  /D "JDK_FNAME=unpack.dll" \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   151
			  /D "JDK_INTERNAL_NAME=unpack" \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   152
			  /D "JDK_FTYPE=0x2L"))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   153
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   154
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   155
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   156
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   157
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
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
ifeq ($(HOST_OS_API),winapi)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   160
    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(LIBUNPACK_LIB_FILE)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   161
	$(ECHO) Copying $(@F)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   162
	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.map,$<) $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   163
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   164
    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(LIBUNPACK_LIB_FILE)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   165
	$(ECHO) Copying $(@F)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   166
	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.pdb,$<) $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   167
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   168
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   169
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   170
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   171
BUILD_LIBFDLIBM_OPTIMIZATION:= $(C_O_FLAG_HI)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   172
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   173
ifneq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   174
      BUILD_LIBFDLIBM_OPTIMIZATION := $(C_O_FLAG_NONE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   175
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   176
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   177
ifneq ($(PLATFORM),macosx)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   178
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   179
                SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   180
		LANG:=C,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   181
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFDLIBM_OPTIMIZATION) \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   182
			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   183
		CFLAGS_winapi_debug:=-DLOGGING,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   184
		ARFLAGS:=$(ARFLAGS),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   185
		BIN:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   186
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   187
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   188
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   189
# On macosx they do partial (incremental) linking of fdlibm
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   190
#   code it here...rather than add support to NativeCompilation
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   191
#   as this is firt time I see it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   192
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   193
                SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   194
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   195
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFDLIBM_OPTIMIZATION) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   196
			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   197
		LDFLAGS := -nostdlib -r,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   198
		BIN:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   199
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   200
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   201
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   202
	$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   203
	$(CP) -a $< $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   204
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   205
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   206
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   207
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   208
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
LIBATTACH_EXCLUDE_FILES:=
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   212
ifneq ($(PLATFORM),solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   213
    LIBATTACH_EXCLUDE_FILES+=SolarisVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   214
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   215
ifneq ($(PLATFORM),linux)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   216
    LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   217
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   218
ifneq ($(PLATFORM),macosx)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   219
    LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   220
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   221
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   222
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   223
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tools/attach,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   224
		EXCLUDE_FILES:=$(LIBATTACH_EXCLUDE_FILES),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   225
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   226
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   227
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(PLATFORM), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   228
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   229
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   230
		LDFLAGS_solaris:=-ldoor,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   231
		LDFLAGS_winapi:=psapi.lib advapi32.lib java.lib jvm.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   232
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   233
		BIN:=$(JDK_OUTPUTDIR)/objs/libattach,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   234
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   235
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   236
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   237
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   238
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   239
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   240
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   241
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   242
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   243
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   244
                SRC:=$(JDK_TOPDIR)/src/share/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   245
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   246
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   247
		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   248
                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   249
                        -I$(JDK_TOPDIR)/src/share/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   250
		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   251
                        -I$(JDK_TOPDIR)/src/share/back/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   252
                        -I$(JDK_TOPDIR)/src/share/back,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   253
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   254
		LDFLAGS:=$(LDFLAGS_JDKLIB), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   255
		LDFLAGS_SUFFIX_linux:=-lpthread,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   256
		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   257
		LDFLAGS_SUFFIX_winapi:=-export:jdwpTransport_OnLoad ws2_32.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   258
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   259
		BIN:=$(JDK_OUTPUTDIR)/objs/libdt_socket,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   260
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   261
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   262
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   263
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   264
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   265
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   266
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   267
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   268
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   269
ifeq ($(HOST_OS_API),winapi)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   270
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   271
  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   272
                SRC:= $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   273
			$(JDK_TOPDIR)/src/share/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   274
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   275
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   276
		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   277
                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   278
                        -I$(JDK_TOPDIR)/src/share/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   279
		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   280
                        -I$(JDK_TOPDIR)/src/share/back/export, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   281
		LDFLAGS:=$(LDFLAGS_JDKLIB),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   282
		LDFLAGS_winapi:=-export:jdwpTransport_OnLoad,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   283
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   284
		BIN:=$(JDK_OUTPUTDIR)/objs/libdt_shmem,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   285
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   286
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   287
  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   288
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   289
endif # PLATFORM
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   290
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
# 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
   293
# __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
   294
# 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
   295
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   296
                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
   297
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   298
		CFLAGS:=$(CFLAGS_JDKLIB) -DJDWP_LOGGING $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   299
		 -I$(JDK_TOPDIR)/src/share/transport/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   300
                 -I$(JDK_TOPDIR)/src/share/back/export \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   301
                 -I$(JDK_TOPDIR)/src/share/npt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   302
                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   303
                 -I$(JDK_TOPDIR)/src/share/back \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   304
                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/back \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   305
		 -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   306
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   307
		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   308
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   309
		LDFLAGS_SUFFIX_linux:=$(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   310
		BIN:=$(JDK_OUTPUTDIR)/objs/libjdwp,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   311
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   312
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   313
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   314
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   315
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   316
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   318
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   319
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   320
LIBJAAS_MAPFILE :=
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   321
ifneq ($(PLATFORM),solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   322
   LIBJAAS_EXCLUDE_FILES:=Solaris.c
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   323
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   324
   # only on solaris...wonder why
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   325
   LIBJAAS_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   326
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   327
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   328
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   329
                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
   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),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   332
		MAPFILE := $(LIBJAAS_MAPFILE),\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   333
		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   334
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   335
		LDFLAGS_winapi:=netapi32.lib user32.lib mpr.lib advapi32.lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   336
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   337
		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   338
		BIN:=$(JDK_OUTPUTDIR)/objs/libjaas,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   339
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   340
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   341
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   342
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   343
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   344
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   345
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   346
# 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
   347
ifeq ($(PLATFORM),windows)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   348
    $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll : $(JDK_OUTPUTDIR)/objs/jaas.dll
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   349
	$(ECHO) Copying $(@F)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   350
	$(CP) $< $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   351
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   352
else
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   353
    $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   354
	$(ECHO) Copying $(@F)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   355
	$(CP) $< $@
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   356
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   357
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   358
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   359
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   360
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   361
ifeq ($(HOST_OS_API),posix)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   362
  # TODO make this work on macosx
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   363
  ifneq ($(HOST_OS),macosx)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   364
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   365
    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   366
                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
   367
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   368
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   369
			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   370
			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   371
			-I$(JDK_TOPDIR)/src/share/native/java/net \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   372
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   373
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   374
		CFLAGS_linux:=-Werror,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   375
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   376
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   377
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   378
		LDFLAGS_SUFFIX_linux:=-lpthread,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   379
		LDFLAGS_SUFFIX_posix:=$(LIBDL) -lnio -lnet,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   380
		LDFLAGS_SUFFIX_solaris:=-lsocket,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   381
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   382
		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   383
		BIN:=$(JDK_OUTPUTDIR)/objs/libsctp,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   384
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   385
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   386
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   387
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   388
    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   389
  endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   390
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   391
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   392
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   393
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   394
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   395
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   396
			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tracing/dtrace,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   397
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   398
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   399
			-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   400
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   401
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   402
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   403
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   404
		BIN:=$(JDK_OUTPUTDIR)/objs/libjsdt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   405
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   406
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   407
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   408
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   409
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   410
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   411
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   412
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   413
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   414
ifdef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   415
    # TODO: Update awt lib path when awt is converted
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   416
    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   417
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   418
		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   419
		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   420
			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   421
			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   422
			       cmsnamed.c cmsopt.c cmspack.c cmspcs.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   423
			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   424
			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   425
			       LCMS.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   426
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   427
		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) $(C_O_FLAG_NORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   428
			$(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   429
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   430
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   431
		CFLAGS_solaris:=-xc99=no_lib,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   432
		CFLAGS_winapi:=-DCMS_IS_WINDOWS_,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   433
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   434
		LDFLAGS:=$(LDFLAGS_JDKLIB), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   435
		LDFLAGS_solaris:=/usr/lib$(ISA_DIR)/libm.so.2,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   436
		LDFLAGS_winapi:=awt.lib java.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   437
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   438
		LDFLAGS_SUFFIX_posix:=-lawt,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   439
		LDFLAGS_SUFFIX_linux:=-lm,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   440
		BIN:=$(JDK_OUTPUTDIR)/objs/liblcms,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   441
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   442
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   443
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   444
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   445
    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   446
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   447
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   448
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   449
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   450
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   451
ifdef OPENJDK
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   452
    BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   453
else
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   454
    BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   455
    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
   456
    BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   457
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   458
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   459
BUILD_LIBJPEG_REORDER :=
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   460
ifeq ($(PLATFORM), solaris)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   461
    ifneq ($(ARCH), amd64)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   462
        BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(ARCH)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   463
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   464
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   465
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   466
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   467
# or 'vfork'": this warning indicates that some variable is placed to
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   468
# 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
   469
# Recommended way to avoid such warning is to declare the variable as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   470
# volatile to prevent the optimization. However, this approach does not
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   471
# work because we have to declare all variables as volatile in result.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   472
#ifndef CROSS_COMPILE_ARCH
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   473
#    CC_43_OR_NEWER := \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   474
#        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   475
#              \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   476
#    ifeq ($(CC_43_OR_NEWER),1)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   477
#        BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   478
#    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   479
#endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   480
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   481
$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   482
                SRC:=$(BUILD_LIBJPEG_CLOSED_SRC) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   483
		     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   484
		LANG:=C,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   485
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   486
			$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   487
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   488
		MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   489
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   490
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   491
		LDFLAGS_linux:=$(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   492
		LDFLAGS_winapi:=java.lib jvm.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   493
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   494
		REORDER := $(BUILD_LIBJPEG_REORDER),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   495
		BIN:=$(JDK_OUTPUTDIR)/objs/libjpeg,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   496
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   497
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   498
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   499
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   500
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   501
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   502
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   503
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   504
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   505
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   506
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   507
			-I$(BUILD_LIBMLIB_SRC) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   508
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt/medialib 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   509
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   510
BUILD_LIBMLIB_LDLIBS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   511
BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   512
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   513
ifneq ($(PLATFORM), sparc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   514
	BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   515
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   516
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   517
ifeq ($(ARCH_DATA_MODEL), 64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   518
	BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   519
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   520
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   521
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   522
	BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   523
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   524
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   525
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   526
		SRC:=$(BUILD_LIBMLIB_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   527
		EXCLUDE_FILES:=awt_ImagingLib.c mlib_c_ImageBlendTable.c,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   528
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   529
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   530
                        $(BUILD_LIBMLIB_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   531
		MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   532
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   533
                         $(BUILD_LIBMLIB_LDLIBS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   534
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   535
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   536
                LDFLAGS_SUFFIX_posix := -lm,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   537
		BIN:=$(JDK_OUTPUTDIR)/objs/libmlib_image,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   538
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   539
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   540
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   541
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   542
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   543
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   544
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   545
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   546
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   547
ifeq ($(PLATFORM),solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   548
ifeq ($(ARCH),sparc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   549
	BUILD_LIBMLIB_IMAGE_V := 1
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   550
else ifeq ($(ARCH), sparcv9)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   551
	BUILD_LIBMLIB_IMAGE_V := 1
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   552
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   553
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   554
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   555
ifeq ($(BUILD_LIBMLIB_IMAGE_V), 1)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   556
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   557
BUILD_LIBMLIB_IMAGE_V_FILES :=  \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   558
        mlib_v_ImageLookUp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   559
        mlib_ImageCreate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   560
        mlib_ImageAffine.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   561
        mlib_ImageConvMxN.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   562
        mlib_ImageConvKernelConvert.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   563
        mlib_sys.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   564
        mlib_ImageLookUp_64.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   565
        mlib_ImageLookUp_Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   566
        mlib_ImageColorTrue2Index.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   567
        mlib_c_ImageThresh1_U8.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   568
        mlib_v_ImageLookUpS16S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   569
        mlib_v_ImageLookUpS16S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   570
        mlib_v_ImageLookUpS16U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   571
        mlib_v_ImageLookUpS16U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   572
        mlib_v_ImageLookUpS32S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   573
        mlib_v_ImageLookUpS32S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   574
        mlib_v_ImageLookUpS32U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   575
        mlib_v_ImageLookUpS32U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   576
        mlib_v_ImageLookUpSIS16S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   577
        mlib_v_ImageLookUpSIS16S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   578
        mlib_v_ImageLookUpSIS16U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   579
        mlib_v_ImageLookUpSIS16U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   580
        mlib_v_ImageLookUpSIS32S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   581
        mlib_v_ImageLookUpSIS32S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   582
        mlib_v_ImageLookUpSIS32U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   583
        mlib_v_ImageLookUpSIS32U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   584
        mlib_v_ImageLookUpSIU16S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   585
        mlib_v_ImageLookUpSIU16S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   586
        mlib_v_ImageLookUpSIU16U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   587
        mlib_v_ImageLookUpSIU16U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   588
        mlib_v_ImageLookUpSIU8S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   589
        mlib_v_ImageLookUpSIU8S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   590
        mlib_v_ImageLookUpSIU8U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   591
        mlib_v_ImageLookUpSIU8U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   592
        mlib_v_ImageLookUpU16S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   593
        mlib_v_ImageLookUpU16S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   594
        mlib_v_ImageLookUpU16U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   595
        mlib_v_ImageLookUpU16U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   596
        mlib_v_ImageLookUpU8S16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   597
        mlib_v_ImageLookUpU8S32Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   598
        mlib_v_ImageLookUpU8U16Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   599
        mlib_v_ImageLookUpU8U8Func.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   600
        mlib_v_ImageAffineIndex_BC.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   601
        mlib_v_ImageAffine_BC.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   602
        mlib_v_ImageAffine_BC_S16.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   603
        mlib_v_ImageAffine_BC_U16.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   604
        mlib_v_ImageAffine_BL.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   605
        mlib_v_ImageAffine_BL_S16.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   606
        mlib_v_ImageAffine_BL_U16.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   607
        mlib_v_ImageAffine_NN.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   608
        mlib_v_ImageFilters.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   609
        mlib_ImageAffineEdge.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   610
        mlib_ImageAffine_BC_D64.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   611
        mlib_ImageAffine_BC_F32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   612
        mlib_ImageAffine_BC_S32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   613
        mlib_ImageAffine_BL_D64.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   614
        mlib_ImageAffine_BL_F32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   615
        mlib_ImageAffine_BL_S32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   616
        mlib_ImageAffine_NN.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   617
        mlib_ImageAffine_NN_Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   618
        mlib_ImageFilters.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   619
        mlib_ImageScanPoly.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   620
        mlib_ImageConv_8nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   621
        mlib_ImageConv_8ext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   622
        mlib_ImageConv_16nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   623
        mlib_ImageConv_16ext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   624
        mlib_ImageConv_u16nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   625
        mlib_ImageConv_u16ext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   626
        mlib_ImageConv_32nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   627
        mlib_ImageConv_F32nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   628
        mlib_ImageConvMxN_Fp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   629
        mlib_ImageConvMxN_ext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   630
        mlib_ImageConv_D64nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   631
        mlib_ImageClipping.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   632
        mlib_ImageConvCopyEdge_Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   633
        mlib_ImageConvClearEdge_Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   634
        mlib_ImageConv2x2_f.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   635
        mlib_ImageConvClearEdge_Fp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   636
        mlib_v_ImageConvMxN_8.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   637
        mlib_v_ImageConvClearEdge.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   638
        mlib_v_ImageConvCopyEdge.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   639
        mlib_v_ImageConvMxN_8ext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   640
        mlib_v_ImageConvVersion.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   641
        mlib_v_ImageConv_8nw.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   642
        mlib_ImageConvCopyEdge_Fp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   643
        mlib_v_ImageChannelInsert_1.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   644
        mlib_v_ImageChannelExtract_43.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   645
        mlib_v_ImageChannelExtract_1.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   646
        mlib_ImageCopy_Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   647
        mlib_v_ImageCopy_f.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   648
        mlib_ImageUtils.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   649
        mlib_ImageDivTables.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   650
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   651
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   652
# TODO
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   653
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   654
# ASFLAGS += -P
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   655
# INLINE = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   656
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   657
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   658
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   659
		     $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   660
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   661
		INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   662
		CFLAGS:=$(BUILD_LIBMLIB_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   663
                        $(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   664
		MAPFILE := $(JDK_TOPDIR)/$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   665
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   666
                         $(BUILD_LIBMLIB_LDLIBS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   667
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   668
		BIN:=$(JDK_OUTPUTDIR)/objs/libmlib_image_v,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   669
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image_v$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   670
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   671
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image_v$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   672
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   673
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   674
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   675
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   676
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   677
ifndef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   678
    FONT_HEADERS := -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   679
    BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   680
    LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   681
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   682
    FONT_HEADERS := $(FREETYPE2_CFLAGS)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   683
    BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   684
    BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   685
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   686
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   687
ifeq ($(PLATFORM),windows)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   688
    LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   689
				    X11TextRenderer.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   690
else
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   691
    LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   692
				    lcdglyph.c
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   693
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   694
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   695
BUILD_LIBFONTMANAGER_CFLAGS_COMMON := $(SHARED_LIBRARY_FLAGS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   696
			-DLE_STANDALONE -DHEADLESS \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   697
			$(FONT_HEADERS) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   698
			-I$(JDK_TOPDIR)/src/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   699
			-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   700
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   701
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   702
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   703
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   704
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   705
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   706
			-I$(JDK_TOPDIR)/src/share/native/sun/java2d
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   707
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   708
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   709
                SRC:=$(JDK_TOPDIR)/src/share/native/sun/font\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   710
		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   711
		EXCLUDE_FILES:=$(LIBFONTMANAGER_EXCLUDE_FILES) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   712
			       AccelGlyphCache.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   713
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   714
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   715
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   716
		CFLAGS_posix:=$(C_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   717
		CXXFLAGS_posix:=$(CXX_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   718
		CFLAGS_windows=$(C_O_FLAG_NORM)\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   719
				-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   720
				-DCC_NOEX, \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   721
		MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   722
		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   723
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   724
		LDFLAGS_windows:=advapi32.lib user32.lib gdi32.lib awt.lib java.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   725
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   726
				$(BUILD_LIBFONTMANAGER_FONTLIB),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   727
		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   728
		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   729
		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   730
		BIN:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   731
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   732
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   733
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   734
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   735
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   736
ifneq (,$(findstring $(PLATFORM),solaris macosx))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   737
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   738
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   739
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   740
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   741
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   742
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   743
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   744
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   745
ifndef OPENJDK
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   746
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   747
#    ifeq ($(PLATFORM), linux)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   748
#        ifeq ("$(CC_VER_MAJOR)", "3")
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   749
#            OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   750
#        endif                           
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   751
#    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   752
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   753
# 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
   754
# 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
   755
    BUILD_LIBT2K_CFLAGS_COMMON:=-I$(JDK_TOPDIR)/src/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   756
		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   757
		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   758
		            -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   759
		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   760
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   761
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   762
		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   763
		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   764
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   765
    $(eval $(call SetupNativeCompilation,BUILD_LIBT2K,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   766
                SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/font \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   767
		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   768
		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   769
		EXCLUDE_FILES:=orion.c,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   770
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   771
		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(C_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   772
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(CXX_O_FLAG_HI),\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   773
		CFLAGS_windows=-DCC_NOEX, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   774
		CXXFLAGS_windows=-DCC_NOEX, \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   775
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   776
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   777
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   778
		LDFLAGS_windows:=user32.lib $(JDK_OUTPUTDIR)/objs/fontmanager.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   779
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   780
		LDFLAGS_SUFFIX_macosx:=$(LIBCXX) $(LIBM) -lfontmanager,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   781
		LDFLAGS_SUFFIX_linux:=$(LIBCXX) $(LIBM) -lfontmanager,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   782
		LDFLAGS_SUFFIX_solaris:=$(LIBCXX) $(LIBM) -lfontmanager -lawt \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   783
					-lawt_xawt,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   784
		BIN:=$(JDK_OUTPUTDIR)/objs/libt2k,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   785
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   786
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   787
    # t2k is linked against fontmanager
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   788
    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX): \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   789
	$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   790
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   791
    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   792
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   793
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   794
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   795
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   796
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   797
# TODO replace with X_FLAGS / X_LIBS
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   798
#   and add them to configure
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   799
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   800
OPENWIN_LIB := $(OPENWIN_HOME)/lib
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   801
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   802
BUILD_LIBJAWT_LIB := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   803
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   804
ifeq ($(PLATFORM), windows)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   805
    ifeq ($(ARCH_DATA_MODEL), 32)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   806
        KERNEL32_LIB := kernel32.lib
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   807
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   808
    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   809
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   810
		INCLUDE_FILES:=jawt.cpp,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   811
		LANG:=C++,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   812
		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   813
			-EHsc -DUNICODE -D_UNICODE \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   814
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   815
		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   816
		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   817
			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   818
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/windows, \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   819
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   820
			 advapi32.lib awt.lib,\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   821
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   822
		BIN:=$(JDK_OUTPUTDIR)/objs/libjawt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   823
		LIB:=$(BUILD_LIBJAWT_LIB)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   824
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   825
$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   826
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   827
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT_LIB)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   828
	$(ECHO) Copying $(@F)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   829
	$(CP) $< $@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   830
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   831
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   832
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   833
else # PLATFORM not windows
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   834
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   835
    JAWT_LIBS := -lawt
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   836
    ifndef BUILD_HEADLESS_ONLY
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   837
        JAWT_LIBS += -lawt_xawt
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   838
    else
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   839
        JAWT_LIBS += -lawt_headless
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   840
        HEADLESS_CFLAG += -DHEADLESS
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   841
    endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   842
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   843
    JAWT_FILES := jawt.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   844
    ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   845
	JAWT_FILES := jawt.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   846
	JAWT_LIBS := -lawt_lwawt
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   847
    endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   848
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   849
    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   850
                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   851
                     $(JDK_TOPDIR)/src/macosx/native/sun/awt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   852
		INCLUDE_FILES:=$(JAWT_FILES),\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   853
		LANG:=C,\
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   854
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM), \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   855
		CFLAGS_linux:=$(HEADLESS_CFLAG),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   856
		CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   857
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   858
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   859
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   860
		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_LIB)$(ISA_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   861
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(JAWT_LIBS),\
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   862
		LDFLAGS_SUFFIX_solaris:=-lXrender,\
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   863
		LDFLAGS_SUFFIX_macosx:= -framework Cocoa, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   864
		BIN:=$(JDK_OUTPUTDIR)/objs/libjawt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   865
		LIB:=$(BUILD_LIBJAWT_LIB)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   866
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   867
ifndef BUILD_HEADLESS_ONLY
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   868
$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   869
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   870
$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   871
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   872
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   873
endif # PLATFORM
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   874
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   875
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   876
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   877
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   878
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   879
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   880
BUILD_LIBVERIFY_SRC := check_code.c check_format.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   881
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   882
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   883
	ifneq ($(ARCH), amd64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   884
		BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(ARCH)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   885
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   886
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   887
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   888
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   889
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   890
		SRC:=$(JDK_TOPDIR)/src/share/native/common,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   891
		INCLUDE_FILES:=$(BUILD_LIBVERIFY_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   892
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   893
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   894
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   895
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   896
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   897
		LDFLAGS_SUFFIX_posix:=-ljvm -lc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   898
		LDFLAGS_SUFFIX_windows:=jvm.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   899
		REORDER := $(BUILD_LIBVERIFY_REORDER),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   900
		BIN:=$(JDK_OUTPUTDIR)/objs/libverify,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   901
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   902
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   903
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   904
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   905
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   906
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   907
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   908
ifneq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   909
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   910
BUILD_LIBJDBCODBC_DIR     := $(JDK_OUTPUTDIR)/objs/libjdbcodbc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   911
BUILD_LIBJDBCODBC_NAME    := $(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   912
BUILD_LIBJDBCODBC_CFLAGS  := 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   913
BUILD_LIBJDBCODBC_TARGET  := $(JDK_OUTPUTDIR)/objs/$(BUILD_LIBJDBCODBC_NAME)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   914
BUILD_LIBJDBCODBC_LIBS    :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   915
BUILD_LIBJDBCODBC_LDFLAGS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   916
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   917
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   918
	BUILD_LIBJDBCODBC_LDFLAGS := $(LDFLAGS_JDKLIB)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   919
	BUILD_LIBJDBCODBC_LIBS += odbc32.lib odbccp32.lib java.lib advapi32.lib
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   920
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   921
	BUILD_LIBJDBCODBC_CFLAGS := -DUNIX
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   922
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   923
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   924
# This mimics "current" build system exactly. Link against fake -lodbcinst -lodbc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   925
#   but...those are linked with the -soname, causing the dependency to be dropped on linux (gnu ld)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   926
#   but kept with other linker (solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   927
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   928
# IMO very weird behaviour...very weird
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   929
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   930
	BUILD_LIBJDBCODBC_LDFLAGS += $(patsubst defs,nodefs,$(LDFLAGS_JDKLIB)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   931
				      -Xlinker -z -Xlinker nodefs
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   932
	BUILD_LIBJDBCODBC_LIBS += -L$(BUILD_LIBJDBCODBC_DIR) -lodbcinst -lodbc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   933
	BUILD_LIBJDBCODBC_FAKE_LIBS := $(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbcinst$(SHARED_LIBRARY_SUFFIX) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   934
                                       $(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbc$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   935
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   936
	BUILD_LIBJDBCODBC_SONAME := $(call SET_SHARED_LIBRARY_NAME,$(BUILD_LIBJDBCODBC_NAME))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   937
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   938
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   939
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   940
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   941
$(eval $(call SetupNativeCompilation,BUILD_FAKEODBCINST,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   942
		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   943
		INCLUDE_FILES := dummyodbc1.c,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   944
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   945
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   946
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LDFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   947
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   948
		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   949
		LIB:=$(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbcinst$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   950
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   951
$(eval $(call SetupNativeCompilation,BUILD_FAKEODBC,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   952
		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   953
		INCLUDE_FILES := dummyodbc2.c,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   954
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   955
		CFLAGS:=$(BUILD_LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   956
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LDFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   957
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   958
		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   959
		LIB:=$(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbc$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   960
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   961
$(BUILD_LIBJDBCODBC_FAKE_LIBS) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   962
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   963
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   964
$(BUILD_LIBJDBCODBC_TARGET) : $(BUILD_LIBJDBCODBC_FAKE_LIBS)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   965
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   966
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   967
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   968
$(eval $(call SetupNativeCompilation,BUILD_LIBJDBCODBC,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   969
		SRC:=$(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   970
		EXCLUDE_FILES := dummyodbc.c,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   971
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   972
		CFLAGS:=$(BUILD_LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   973
			$(SHARED_LIBRARY_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   974
		LDFLAGS:=$(BUILD_LIBJDBCODBC_LDFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   975
			 $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LIBS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   976
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   977
		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   978
		LIB:=$(BUILD_LIBJDBCODBC_TARGET)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   979
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   980
$(BUILD_LIBJDBCODBC_TARGET) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   981
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   982
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   983
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   984
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   985
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   986
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   987
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   988
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   989
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   990
BUILD_LIBINSTRUMENT_SRC     := $(JDK_TOPDIR)/src/share/instrument \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   991
                               $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   992
                               $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/instrument
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   993
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   994
BUILD_LIBINSTRUMENT_FILES   := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   995
	EncodingSupport.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   996
	EncodingSupport_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   997
	FileSystemSupport_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   998
	InstrumentationImplNativeMethods.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   999
	InvocationAdapter.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1000
	JarFacade.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1001
	JPLISAgent.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1002
	JPLISAssert.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1003
	JavaExceptions.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1004
	PathCharsValidator.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1005
	Reentrancy.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1006
	Utilities.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1007
	canonicalize_md.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1008
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1009
BUILD_LIBINSTRUMENT_DIR     := $(JDK_OUTPUTDIR)/objs/libinstrument
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1010
BUILD_LIBINSTRUMENT_NAME    := $(LIBRARY_PREFIX)instrument$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1011
BUILD_LIBINSTRUMENT_CFLAGS  := -I$(JDK_TOPDIR)/src/share/instrument \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1012
                               -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/instrument \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1013
                               -I$(JDK_TOPDIR)/src/share/bin
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1014
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1015
BUILD_LIBINSTRUMENT_TARGET  := $(JDK_OUTPUTDIR)/objs/$(BUILD_LIBINSTRUMENT_NAME)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1016
BUILD_LIBINSTRUMENT_LDFLAGS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1017
BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1018
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1019
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1020
  BUILD_LIBINSTRUMENT_LDFLAGS += jli_static.lib java.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1021
				 -export:Agent_OnAttach
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1022
  # equivalent of strcasecmp is stricmp on Windows
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1023
  BUILD_LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1024
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1025
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1026
ifneq (,$(findstring $(PLATFORM), macosx))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1027
	ifneq ($(ARCH), universal)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1028
		BUILD_LIBINSTRUMENT_LDFLAGS += -Wl,-all_load
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1029
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1030
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1031
	BUILD_LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/libjli_static.a
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1032
	BUILD_LIBINSTRUMENT_LDFLAGS += -liconv
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1033
	BUILD_LIBINSTRUMENT_LDFLAGS += -framework Cocoa -framework Security -framework ApplicationServices
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1034
	BUILD_LIBINSTRUMENT_LDFLAGS += $(LIBZ)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1035
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1036
	BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX += -ljli $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1037
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1038
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1039
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1040
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1041
		SRC:=$(BUILD_LIBINSTRUMENT_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1042
		INCLUDE_FILES:=$(BUILD_LIBINSTRUMENT_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1043
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1044
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1045
                        $(BUILD_LIBINSTRUMENT_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1046
		CFLAGS_debug := -DJPLIS_LOGGING,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1047
		CFLAGS_release := -DNO_JPLIS_LOGGING,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1048
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1049
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1050
			 $(call SET_SHARED_LIBRARY_ORIGIN,jli) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1051
                         $(BUILD_LIBINSTRUMENT_LDFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1052
		LDFLAGS_SUFFIX:=$(LIBZ) $(BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1053
		BIN:=$(BUILD_LIBINSTRUMENT_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1054
		LIB:=$(BUILD_LIBINSTRUMENT_TARGET)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1055
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1056
$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1057
$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1058
$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1059
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1060
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(BUILD_LIBINSTRUMENT_NAME)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1061
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1062
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1063
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1064
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1065
                           $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/management \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1066
                           $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/management
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1067
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1068
BUILD_LIBMANAGEMENT_EXCLUDES :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1069
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1070
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1071
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1072
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1073
	BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1074
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1075
	BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1076
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1077
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1078
ifneq ($(PLATFORM),solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1079
	BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1080
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1081
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1082
ifneq ($(PLATFORM),linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1083
	BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1084
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1085
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1086
ifneq ($(PLATFORM),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1087
	BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1088
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1089
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1090
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1091
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1092
		SRC:=$(BUILD_LIBMANAGEMENT_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1093
		EXCLUDE_FILES:=$(BUILD_LIBMANAGEMENT_EXCLUDES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1094
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1095
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBMANAGEMENT_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1096
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1097
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1098
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1099
		LDFLAGS_windows := java.lib jvm.lib advapi32.lib psapi.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1100
		LDFLAGS_solaris := -lkstat,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1101
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1102
		BIN:=$(JDK_OUTPUTDIR)/objs/libmanagement,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1103
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1104
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1105
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1106
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1107
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1108
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1109
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1110
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1111
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1112
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/hprof
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1113
BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1114
                         -I$(JDK_TOPDIR)/src/share/npt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1115
                         -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1116
                         -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1117
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1118
BUILD_LIBHPROF_LDFLAGS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1119
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1120
ifeq ($(PLATFORM),solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1121
     BUILD_LIBHPROF_LDFLAGS += -lsocket -lnsl
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1122
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1123
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1124
ifneq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1125
     BUILD_LIBHPROF_LDFLAGS += $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1126
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1127
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1128
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1129
		SRC:=$(BUILD_LIBHPROF_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1130
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1131
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1132
                         $(BUILD_LIBHPROF_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1133
		CFLAGS_debug := -DHPROF_LOGGING,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1134
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1135
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1136
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1137
		LDFLAGS_windows:=wsock32.lib winmm.lib advapi32.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1138
		LDFLAGS_SUFFIX:=$(BUILD_LIBHPROF_LDFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1139
		BIN:=$(JDK_OUTPUTDIR)/objs/libhprof,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1140
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1141
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1142
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1143
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1144
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1145
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1146
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1147
		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1148
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1149
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1150
                        -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1151
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1152
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1153
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1154
		LDFLAGS_SUFFIX:=,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1155
		BIN:=$(JDK_OUTPUTDIR)/objs/libjava_crw_demo,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1156
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1157
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1158
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1159
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1160
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1161
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1162
$(eval $(call SetupNativeCompilation,BUILD_LIBNPT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1163
		SRC:=$(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1164
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1165
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1166
                        -I$(JDK_TOPDIR)/src/share/npt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1167
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1168
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1169
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1170
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1171
		LDFLAGS_macosx := -liconv,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1172
		LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1173
		BIN:=$(JDK_OUTPUTDIR)/objs/libnpt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1174
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1175
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1176
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1177
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1178
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1179
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1180
BUILD_LIBNIO_SRC := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1181
        $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/nio \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1182
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1183
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1184
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1185
BUILD_LIBNIO_CFLAGS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1186
	-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1187
	-I$(JDK_TOPDIR)/src/share/native/java/io \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1188
	-I$(JDK_TOPDIR)/src/share/native/java/net \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1189
        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1190
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1191
BUILD_LIBNIO_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1192
        DatagramChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1193
        DatagramDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1194
	FileChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1195
	FileDispatcherImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1196
	FileKey.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1197
	IOUtil.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1198
        MappedByteBuffer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1199
	Net.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1200
	ServerSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1201
	SocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1202
	SocketDispatcher.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1203
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1204
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1205
	BUILD_LIBNIO_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1206
		Iocp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1207
		RegistryFileTypeDetector.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1208
		WindowsAsynchronousFileChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1209
		WindowsAsynchronousServerSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1210
		WindowsAsynchronousSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1211
		WindowsNativeDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1212
	        WindowsSelectorImpl.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1213
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1214
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1215
ifeq ($(PLATFORM), linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1216
	BUILD_LIBNIO_LDFLAGS_SUFFIX := -lpthread $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1217
	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-linux
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1218
	BUILD_LIBNIO_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1219
		EPoll.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1220
		EPollArrayWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1221
		EPollPort.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1222
		InheritedChannel.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1223
		NativeThread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1224
	        PollArrayWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1225
		UnixAsynchronousServerSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1226
		UnixAsynchronousSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1227
		GnomeFileTypeDetector.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1228
		LinuxNativeDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1229
		LinuxWatchService.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1230
		UnixCopyFile.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1231
		UnixNativeDispatcher.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1232
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1233
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1234
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1235
	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-bsd
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1236
	BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1237
	BUILD_LIBNIO_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1238
		InheritedChannel.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1239
		NativeThread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1240
	        PollArrayWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1241
		UnixAsynchronousServerSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1242
		UnixAsynchronousSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1243
		GnomeFileTypeDetector.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1244
		BsdNativeDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1245
		UnixCopyFile.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1246
		UnixNativeDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1247
		KQueue.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1248
		KQueuePort.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1249
		KQueueArrayWrapper.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1250
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1251
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1252
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1253
	BUILD_LIBNIO_LDFLAGS_SUFFIX := $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1254
	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-solaris
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1255
	BUILD_LIBNIO_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1256
		DevPollArrayWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1257
		InheritedChannel.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1258
		NativeThread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1259
		PollArrayWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1260
		SolarisEventPort.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1261
		UnixAsynchronousServerSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1262
		UnixAsynchronousSocketChannelImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1263
		GnomeFileTypeDetector.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1264
		SolarisNativeDispatcher.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1265
		SolarisWatchService.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1266
		UnixCopyFile.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1267
		UnixNativeDispatcher.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1268
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1269
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1270
BUILD_LIBNIO_LDFLAGS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1271
ifeq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1272
	BUILD_LIBNIO_LDFLAGS += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1273
		java.lib net.lib advapi32.lib jvm.lib ws2_32.lib\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1274
		$(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1275
		$(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1276
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1277
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1278
ifeq ($(PLATFORM), linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1279
	BUILD_LIBNIO_LDFLAGS_SUFFIX += -ljava -lnet -lpthread $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1280
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1281
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1282
	BUILD_LIBNIO_LDFLAGS_SUFFIX += -ljava -lnet -pthread
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1283
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1284
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1285
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1286
	BUILD_LIBNIO_LDFLAGS_SUFFIX += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1287
				       -ljava -lnet
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1288
endif # PLATFORM
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1289
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1290
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1291
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1292
		SRC:=$(BUILD_LIBNIO_SRC),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1293
		INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1294
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1295
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1296
                        $(BUILD_LIBNIO_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1297
		MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1298
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1299
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1300
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBNIO_LDFLAGS_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1301
		BIN:=$(JDK_OUTPUTDIR)/objs/libnio,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1302
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1303
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1304
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1305
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1306
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1307
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1308
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1309
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1310
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1311
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1312
                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1313
                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/dns \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1314
                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/www/protocol/http/ntlm \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1315
                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/sdp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1316
                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/spi
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1317
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1318
LIBNET_CFLAGS := $(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1319
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1320
LIBNET_EXCLUDE_FILES:=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1321
ifneq ($(PLATFORM),linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1322
	LIBNET_EXCLUDE_FILES += linux_close.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1323
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1324
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1325
ifneq ($(PLATFORM),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1326
	LIBNET_EXCLUDE_FILES += bsd_close.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1327
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1328
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1329
ifeq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1330
	LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1331
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1332
	LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1333
                                TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1334
				NTLMAuthSequence.c NetworkInterface_winXP.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1335
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1336
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1337
LIBNET_LDFLAGS_SUFFIX :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1338
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1339
$(eval $(call SetupNativeCompilation,BUILD_LIBNET,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1340
		SRC:=$(LIBNET_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1341
		EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1342
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1343
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1344
                        $(LIBNET_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1345
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1346
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1347
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1348
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBNET_LDFLAGS_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1349
		LDFLAGS_SUFFIX_solaris := -lnsl -lsocket $(LIBDL) ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1350
		LDFLAGS_SUFFIX_linux := $(LIBDL) -lpthread ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1351
		LDFLAGS_SUFFIX_windows := ws2_32.lib $(JVMLIB) secur32.lib iphlpapi.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1352
					  delayimp.lib java.lib jvm.lib advapi32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1353
                                          /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1354
		BIN:=$(JDK_OUTPUTDIR)/objs/libnet,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1355
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1356
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1357
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1358
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1359
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1360
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1361
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1362
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1363
	$(ECHO) Copying $(@F)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1364
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1365
	$(CP) $< $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1366
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1367
COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1368
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1369
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1370
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template : $(JDK_TOPDIR)/src/${LEGACY_HOST_OS_API}/lib/sdp/sdp.conf.template
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1371
	$(ECHO) Copying $(@F)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1372
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1373
	$(CP) $< $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1374
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1375
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1376
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1377
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1378
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1379
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1380
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/lang \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1381
		$(JDK_TOPDIR)/src/share/native/java/lang \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1382
		$(JDK_TOPDIR)/src/share/native/java/lang/ref \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1383
		$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1384
		$(JDK_TOPDIR)/src/share/native/java/io \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1385
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1386
		$(JDK_TOPDIR)/src/share/native/java/nio \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1387
		$(JDK_TOPDIR)/src/share/native/java/security \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1388
		$(JDK_TOPDIR)/src/share/native/common \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1389
		$(JDK_TOPDIR)/src/share/native/sun/misc \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1390
		$(JDK_TOPDIR)/src/share/native/sun/reflect \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1391
		$(JDK_TOPDIR)/src/share/native/java/sql \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1392
		$(JDK_TOPDIR)/src/share/native/java/util \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1393
		$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1394
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/common \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1395
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/util \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1396
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/provider \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1397
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/io
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1398
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1399
LIBJAVA_CFLAGS := $(foreach dir,$(LIBJAVA_SRC_DIRS),-I$(dir)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1400
		  -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1401
                  -DARCHPROPNAME='"$(ARCH)"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1402
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1403
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1404
                  -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1405
                  -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1406
                  -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1407
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1408
ifneq (,$(JDK_UPDATE_VERSION))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1409
	LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1410
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1411
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1412
LIBJAVA_EXCLUDE_FILES:= check_code.c check_format.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1413
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1414
ifneq ($(PLATFORM),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1415
	LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1416
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1417
	BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1418
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1419
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1420
ifeq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1421
        LIBJAVA_EXCLUDE_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1422
		UNIXProcess_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1423
		UnixFileSystem_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1424
		FileSystemPreferences.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1425
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1426
	LIBJAVA_EXCLUDE_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1427
		ProcessImpl_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1428
		Win32FileSystem_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1429
		WinNTFileSystem_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1430
		dirent_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1431
		WindowsPreferences.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1432
		sun/security/provider/WinCAPISeedGenerator.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1433
		sun/io/Win32ErrorMode.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1434
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1435
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1436
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1437
    ifneq ($(ARCH), amd64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1438
        LIBJAVA_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(ARCH)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1439
    endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1440
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1441
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1442
LIBJAVA_FDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1443
LIBJAVA_VERIFY := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)verify$(STATIC_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1444
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1445
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1446
		SRC:=$(LIBJAVA_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1447
		EXCLUDES := fdlibm/src zip, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1448
		EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1449
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1450
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1451
                        $(LIBJAVA_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1452
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1453
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1454
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1455
		LDFLAGS_windows:=-export:winFileHandleOpen -export:handleLseek \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1456
				 $(LIBJAVA_FDLIBM) $(LIBJAVA_VERIFY) jvm.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1457
				 shell32.lib delayimp.lib /DELAYLOAD:shell32.dll \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1458
				 advapi32.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1459
		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1460
		LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lscf $(LIBDL) $(LIBJAVA_FDLIBM) -lc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1461
		LDFLAGS_SUFFIX_linux := $(LIBDL) $(LIBJAVA_FDLIBM),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1462
		LDFLAGS_SUFFIX_macosx := $(LIBJAVA_FDLIBM) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1463
                                         -framework CoreFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1464
                                         -framework Security -framework SystemConfiguration, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1465
		REORDER := $(LIBJAVA_REORDER), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1466
		BIN:=$(JDK_OUTPUTDIR)/objs/libjava,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1467
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1468
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1469
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1470
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1471
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : $(LIBJLI_BINARY)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1472
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1473
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1474
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1475
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1476
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : $(LIBJAVA_FDLIBM)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1477
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1478
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1479
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1480
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1481
BUILD_LIBJLI_CFLAGS := $(foreach dir,$(BUILD_LIBJLI_SRC_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1482
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1483
BUILD_LIBJLI_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1484
	java.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1485
	splashscreen_stubs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1486
	parse_manifest.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1487
	version_comp.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1488
	wildcard.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1489
	jli_util.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1490
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1491
ifeq ($(JVM_VARIANT_ZERO), true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1492
	ERGO_FAMILY := zero
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1493
else # !ZERO_BUILD
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1494
	ifneq (,$(findstring $(ARCH), amd64 x86_64))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1495
		ERGO_FAMILY := i586
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1496
	else # !X86 FAMILY
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1497
		ERGO_FAMILY := $(ARCH)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1498
	endif #ARCH_FAMILY
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1499
endif # ZERO_BUILD
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1500
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1501
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1502
	BUILD_LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1503
	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1504
	BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1505
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1506
	BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1507
	BUILD_LIBJLI_A_java_md_macosx.c_CFLAGS := -x objective-c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1508
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1509
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1510
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1511
	BUILD_LIBJLI_FILES += java_md.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1512
else ifneq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1513
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1514
	BUILD_LIBJLI_FILES += java_md_common.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1515
	BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1516
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1517
	ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1518
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1519
        # if the architecture specific ergo file exists then
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1520
        # use it, else use the generic definitions from ergo.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1521
	ifneq ($(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/$(ERGO_ARCH_FILE)),)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1522
		BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1523
	else # !ERGO_ARCH_FILE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1524
		BUILD_LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1525
	endif # ERGO_ARCH_FILE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1526
endif #WINDOWS
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1527
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1528
# Names of arch directories
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1529
BUILD_LIBJLI_CFLAGS += -DLIBARCHNAME='"$(LIBARCH)"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1530
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1531
	ifneq (,$(findstring $(ARCH),sparc))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1532
		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"sparc"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1533
		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"sparcv9"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1534
	else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1535
		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"i386"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1536
		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"amd64"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1537
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1538
endif # PLATFORM
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1539
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1540
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1541
	BUILD_LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1542
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1543
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1544
ifneq ($(USE_EXTERNAL_LIBZ),true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1545
	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1546
	BUILD_LIBJLI_CFLAGS += $(LIBZ_INCLUDE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1547
	BUILD_LIBJLI_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1548
		inflate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1549
		inftrees.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1550
		inffast.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1551
		zadler32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1552
		zcrc32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1553
		zutil.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1554
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1555
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1556
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1557
		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1558
		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1559
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1560
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBJLI_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1561
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1562
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1563
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1564
		LDFLAGS_SUFFIX := $(LIBZ),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1565
		LDFLAGS_SUFFIX_posix := $(LIBDL) -lc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1566
		LDFLAGS_SUFFIX_linux := -lpthread,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1567
		LDFLAGS_SUFFIX_windows := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1568
			-export:JLI_Launch \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1569
			-export:JLI_ManifestIterate \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1570
			-export:JLI_SetTraceLauncher \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1571
			-export:JLI_ReportErrorMessage \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1572
			-export:JLI_ReportErrorMessageSys \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1573
			-export:JLI_ReportMessage \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1574
			-export:JLI_ReportExceptionDescription \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1575
			advapi32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1576
			comctl32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1577
			user32.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1578
		LDFLAGS_SUFFIX_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1579
		BIN:=$(JDK_OUTPUTDIR)/objs/libjli,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1580
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1581
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1582
ifeq ($(HOST_OS), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1583
    LIBJLI_BINARY := $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1584
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1585
    LIBJLI_BINARY := $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1586
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1587
    $(LIBJLI_BINARY) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1588
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1589
	$(ECHO) Copying $(@F)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1590
	$(CP) $< $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1591
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1592
BUILD_LIBRARIES += $(LIBJLI_BINARY)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1593
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1594
# On windows, the static library has the same suffix as the import library created by
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1595
# with the shared library, so the static library is given a different name. No harm
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1596
# in doing it for all platform to reduce complexity.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1597
ifneq ($(HOST_OS),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1598
    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1599
		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1600
		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1601
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1602
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(STATIC_LIBRARY_FLAGS) $(BUILD_LIBJLI_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1603
		ARFLAGS:=$(ARFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1604
		BIN:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1605
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1606
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1607
    #
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1608
    # On macosx they do partial (incremental) linking of fdlibm
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1609
    #   code it here...rather than add support to NativeCompilation
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1610
    #   as this is first time I see it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1611
    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_A,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1612
		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1613
		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1614
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1615
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(BUILD_LIBJLI_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1616
		LDFLAGS := -nostdlib -r,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1617
		BIN:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1618
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1619
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1620
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1621
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1622
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1623
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1624
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1625
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1626
ifndef JAVASE_EMBEDDED
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1627
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1628
$(eval $(call SetupNativeCompilation,BUILD_LIBJFR,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1629
		SRC:=$(JDK_TOPDIR)/src/closed/share/native/oracle/jfr,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1630
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1631
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1632
                        -I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1633
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1634
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1635
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1636
		BIN:=$(JDK_OUTPUTDIR)/objs/libjfr,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1637
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1638
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1639
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1640
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1641
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1642
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1643
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1644
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1645
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1646
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1647
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1648
BUILD_LIBKCMS_EXCLUDE_FILES :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1649
ifeq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1650
	BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1651
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1652
	BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1653
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1654
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1655
$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1656
		SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1657
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1658
		EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1659
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1660
                        -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1661
		CFLAGS_linux := -Wno-missing-field-initializers,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1662
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1663
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1664
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1665
		LDFLAGS_SUFFIX_linux := -lpthread,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1666
		LDFLAGS_SUFFIX_windows := java.lib advapi32.lib user32.lib version.lib, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1667
		LDFLAGS_SUFFIX:= -lm $(LDFLAGS_JDKLIB_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1668
		VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1669
		BIN:=$(JDK_OUTPUTDIR)/objs/libkcms,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1670
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1671
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1672
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1673
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1674
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1675
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1676
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1677
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1678
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1679
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1680
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1681
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1682
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1683
ifneq ($(ARCH), amd64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1684
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1685
ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1686
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1687
SUNWJDGA_MAPFILE :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1688
ifneq (,$(findstring $(ARCH),sparc))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1689
	SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1690
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1691
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1692
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1693
		SRC:=$(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1694
		LANG:=C, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1695
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1696
			-I$(JDK_TOPDIR)/src/share/javavm/export \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1697
			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1698
			-I$(OPENWIN_HOME)/include, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1699
		MAPFILE := $(SUNWJDGA_MAPFILE), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1700
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1701
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1702
		LDFLAGS_SUFFIX:= -L$(OPENWIN_LIB)$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR) -ldga -lX11 $(LIBDL) -lc, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1703
		BIN:=$(JDK_OUTPUTDIR)/objs/libsunwjdga, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1704
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunwjdga$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1705
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1706
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunwjdga$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1707
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1708
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1709
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1710
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1711
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1712
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1713
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1714
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1715
ifeq ($(BUILD_HEADLESS), true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1716
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1717
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1718
# TODO!!
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1719
X11_PATH := /usr/X11R6
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1720
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1721
LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1722
                        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1723
			$(JDK_TOPDIR)/src/solaris/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1724
			$(JDK_TOPDIR)/src/solaris/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1725
			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1726
			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1727
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1728
LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1729
                          -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1730
			  $(CUPS_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1731
			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1732
			  -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1733
			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1734
			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1735
			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1736
			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1737
			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1738
			  -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/jdga \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1739
                          $(foreach dir,$(LIBAWT_HEADLESS_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1740
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1741
LIBAWT_HEADLESS_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1742
	awt_Font.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1743
	HeadlessToolkit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1744
	fontpath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1745
	VDrawingArea.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1746
	X11Color.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1747
	X11Renderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1748
	X11PMBlitLoops.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1749
	X11SurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1750
	X11FontScaler_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1751
	X11TextRenderer_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1752
        OGLBlitLoops.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1753
        OGLBufImgOps.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1754
        OGLContext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1755
        OGLFuncs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1756
        OGLMaskBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1757
        OGLMaskFill.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1758
        OGLPaints.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1759
        OGLRenderQueue.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1760
        OGLRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1761
        OGLSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1762
        OGLTextRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1763
        OGLVertexCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1764
        GLXGraphicsConfig.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1765
        GLXSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1766
        AccelGlyphCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1767
	CUPSfuncs.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1768
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1769
LIBAWT_HEADLESS_LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) -lawt -lm
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1770
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1771
LIBAWT_HEADLESS_REORDER := 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1772
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1773
	ifneq ($(ARCH), amd64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1774
		LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(ARCH)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1775
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1776
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1777
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1778
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1779
		SRC:=$(LIBAWT_HEADLESS_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1780
		INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1781
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1782
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_HEADLESS_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1783
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1784
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1785
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1786
		REORDER := $(LIBAWT_HEADLESS_REORDER), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1787
		LDFLAGS_SUFFIX := $(LIBAWT_HEADLESS_LDFLAGS_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1788
		LDFLAGS_SUFFIX_posix := $(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1789
		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_headless,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1790
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1791
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1792
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1793
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1794
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1795
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1796
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1797
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1798
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1799
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1800
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1801
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1802
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1803
ifndef BUILD_HEADLESS_ONLY
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1804
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1805
LIBAWT_XAWT_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1806
		$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1807
		$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1808
		$(JDK_TOPDIR)/src/share/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1809
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1810
		$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1811
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1812
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1813
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/x11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1814
		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/xawt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1815
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1816
LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1817
        -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1818
	$(CUPS_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1819
	$(foreach dir,$(LIBAWT_XAWT_DIRS),-I$(dir)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1820
	-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1821
	-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1822
	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1823
	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1824
	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1825
	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1826
	-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1827
	-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/jdga
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1828
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1829
ifeq ($(PLATFORM),solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1830
	LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1831
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1832
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1833
ifeq ($(MILESTONE),internal)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1834
	LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1835
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1836
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1837
LIBAWT_XAWT_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1838
	XlibWrapper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1839
	XWindow.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1840
	XToolkit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1841
	X11Color.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1842
	X11SurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1843
	awt_GraphicsEnv.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1844
	awt_InputMethod.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1845
	robot_common.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1846
	awt_Robot.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1847
        list.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1848
        multiVis.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1849
	initIDs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1850
	awt_util.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1851
	awt_Desktop.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1852
	awt_UNIXToolkit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1853
	X11FontScaler_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1854
	X11TextRenderer_md.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1855
	fontpath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1856
	awt_Insets.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1857
	awt_Event.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1858
	X11Renderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1859
	X11PMBlitLoops.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1860
	OGLBlitLoops.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1861
	OGLBufImgOps.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1862
	OGLContext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1863
	OGLFuncs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1864
	OGLMaskBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1865
	OGLMaskFill.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1866
	OGLPaints.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1867
	OGLRenderQueue.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1868
	OGLRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1869
	OGLSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1870
	OGLTextRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1871
	OGLVertexCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1872
	GLXGraphicsConfig.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1873
	GLXSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1874
	AccelGlyphCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1875
	awt_Font.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1876
	multi_font.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1877
	awt_AWTEvent.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1878
	awt_DrawingSurface.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1879
	jawt.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1880
	CUPSfuncs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1881
	debug_assert.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1882
	debug_mem.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1883
	debug_trace.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1884
	debug_util.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1885
	awt_Plugin.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1886
	gtk2_interface.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1887
        swing_GTKEngine.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1888
        swing_GTKStyle.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1889
        rect.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1890
	sun_awt_X11_GtkFileDialogPeer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1891
	XRSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1892
	XRBackendNative.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1893
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1894
LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi  -ljava -lverify -ljvm -lc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1895
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1896
ifeq ($(PLATFORM), linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1897
	LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1898
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1899
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1900
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1901
	LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1902
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1903
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1904
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1905
		SRC:=$(LIBAWT_XAWT_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1906
		INCLUDE_FILES := $(LIBAWT_XAWT_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1907
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1908
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_XAWT_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1909
                        $(X_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1910
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1911
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1912
			 $(call SET_SHARED_LIBRARY_ORIGIN) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1913
			 $(X_LIBS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1914
		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_LIB)$(ISA_DIR) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1915
				 -R$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1916
				 -R/usr/dt/lib$(ISA_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1917
		LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1918
		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_xawt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1919
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1920
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1921
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1922
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1923
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1924
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1925
	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1926
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1927
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1928
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1929
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1930
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1931
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1932
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1933
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1934
ifndef BUILD_HEADLESS_ONLY
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1935
LIBSPLASHSCREEN_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1936
	$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1937
	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1938
	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1939
	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1940
        $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt/splashscreen
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1941
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1942
LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1943
	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1944
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1945
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1946
	LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1947
                                  $(LIBSPLASHSCREEN_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1948
                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1949
	LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1950
	LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1951
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1952
	LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1953
	LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1954
	LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1955
	LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1956
	LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1957
	LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1958
	LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1959
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1960
else ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1961
	LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1962
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1963
	LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1964
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1965
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1966
LIBSPLASHSCREEN_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1967
	java_awt_SplashScreen.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1968
	splashscreen_gfx_impl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1969
	splashscreen_gif.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1970
	splashscreen_impl.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1971
	splashscreen_jpeg.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1972
	splashscreen_png.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1973
	png.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1974
	pngerror.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1975
	pngget.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1976
	pngmem.c  \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1977
	pngpread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1978
	pngread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1979
	pngrio.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1980
	pngrtran.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1981
	pngrutil.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1982
	pngset.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1983
	pngtrans.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1984
	pngwio.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1985
	pngwrite.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1986
	pngwtran.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1987
	pngwutil.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1988
	dgif_lib.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1989
	gif_err.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1990
	gifalloc.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1991
	jcomapi.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1992
	jdapimin.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1993
	jdapistd.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1994
	jdcoefct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1995
	jdcolor.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1996
	jddctmgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1997
	jdhuff.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1998
	jdinput.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  1999
	jdmainct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2000
	jdmarker.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2001
	jdmaster.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2002
	jdmerge.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2003
	jdphuff.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2004
	jdpostct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2005
	jdsample.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2006
	jerror.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2007
	jidctflt.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2008
	jidctfst.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2009
	jidctint.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2010
	jidctred.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2011
	jmemmgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2012
	jmemnobs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2013
	jquant1.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2014
	jquant2.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2015
	jutils.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2016
	jcapimin.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2017
	jcapistd.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2018
	jccoefct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2019
	jccolor.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2020
	jcdctmgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2021
	jchuff.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2022
	jcinit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2023
	jcmainct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2024
	jcmarker.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2025
	jcmaster.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2026
	jcparam.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2027
	jcphuff.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2028
	jcprepct.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2029
	jcsample.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2030
	jctrans.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2031
	jdtrans.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2032
	jfdctflt.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2033
	jfdctfst.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2034
	jfdctint.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2035
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2036
ifneq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2037
LIBSPLASHSCREEN_FILES += splashscreen_sys.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2038
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2039
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2040
LIBSPLASHSCREEN_FILES += splashscreen_sys.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2041
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2042
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2043
LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2044
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2045
ifneq ($(USE_EXTERNAL_LIBZ),true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2046
	LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2047
	LIBSPLASHSCREEN_CFLAGS += $(LIBZ_INCLUDE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2048
	LIBSPLASHSCREEN_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2049
		compress.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2050
		deflate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2051
		gzclose.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2052
		gzlib.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2053
		gzread.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2054
		gzwrite.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2055
		infback.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2056
		inffast.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2057
		inflate.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2058
		inftrees.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2059
		trees.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2060
		uncompr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2061
		zadler32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2062
		zcrc32.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2063
		zutil.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2064
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2065
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2066
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2067
	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2068
				  -framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2069
				  -framework Foundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2070
				  -framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2071
                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2072
				  -framework JavaNativeFoundation
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2073
else ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2074
	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(ISA_DIR) -lX11 -lXext $(LIBM) -lpthread $(LIBDL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2075
else # PLATFORM
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2076
	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2077
endif # PLATFORM
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2078
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2079
$(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2080
		SRC:=$(LIBSPLASHSCREEN_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2081
		INCLUDE_FILES := $(LIBSPLASHSCREEN_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2082
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2083
		CFLAGS:= $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2084
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2085
		LDFLAGS:= $(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2086
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2087
		LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2088
		BIN:=$(JDK_OUTPUTDIR)/objs/libsplashscreen,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2089
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2090
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2091
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2092
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2093
ifeq ($(PLATFORM),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2094
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2095
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2096
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2097
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2098
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2099
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2100
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2101
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2102
LIBAWT_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2103
	$(JDK_TOPDIR)/src/share/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2104
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2105
	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2106
	$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2107
	$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2108
	$(JDK_TOPDIR)/src/share/native/sun/awt/shell \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2109
	$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2110
	$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2111
	$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2112
	$(JDK_TOPDIR)/src/share/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2113
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2114
	$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2115
	$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2116
	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2117
	$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2118
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2119
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/x11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2120
	$(JDK_TOPDIR)/src/share/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2121
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2122
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/windows \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2123
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/d3d
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2124
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2125
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2126
LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2127
	$(foreach dir,$(LIBAWT_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2128
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2129
LIBAWT_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2130
	gifdecoder.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2131
	imageInitIDs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2132
	img_globals.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2133
	SurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2134
	Region.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2135
	BufImgSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2136
	Disposer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2137
	Trace.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2138
	GraphicsPrimitiveMgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2139
	Blit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2140
	BlitBg.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2141
	ScaledBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2142
	FillRect.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2143
	FillSpans.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2144
	FillParallelogram.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2145
	DrawParallelogram.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2146
	DrawLine.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2147
	DrawRect.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2148
	DrawPolygons.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2149
	DrawPath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2150
	FillPath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2151
	ProcessPath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2152
	MaskBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2153
	MaskFill.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2154
	TransformHelper.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2155
	AlphaMath.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2156
	AlphaMacros.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2157
	AnyByte.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2158
	ByteBinary1Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2159
	ByteBinary2Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2160
	ByteBinary4Bit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2161
	ByteIndexed.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2162
	ByteGray.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2163
	Index8Gray.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2164
	Index12Gray.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2165
	AnyShort.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2166
	Ushort555Rgb.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2167
	Ushort565Rgb.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2168
	Ushort4444Argb.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2169
	Ushort555Rgbx.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2170
	UshortGray.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2171
	UshortIndexed.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2172
	Any3Byte.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2173
	ThreeByteBgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2174
	AnyInt.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2175
	IntArgb.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2176
	IntArgbPre.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2177
	IntArgbBm.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2178
	IntRgb.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2179
	IntBgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2180
	IntRgbx.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2181
	Any4Byte.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2182
	FourByteAbgr.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2183
	FourByteAbgrPre.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2184
	BufferedMaskBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2185
	BufferedRenderPipe.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2186
	ShapeSpanIterator.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2187
	SpanClipRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2188
	awt_ImageRep.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2189
	awt_ImagingLib.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2190
	awt_Mlib.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2191
	awt_parseImage.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2192
	DataBufferNative.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2193
	dither.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2194
	debug_assert.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2195
	debug_mem.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2196
	debug_trace.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2197
	debug_util.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2198
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2199
ifneq (,$(filter $(PLATFORM), solaris linux))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2200
	LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2201
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2202
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2203
ifeq ($(PLATFORM),macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2204
	LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2205
	LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2206
	LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2207
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2208
	LIBAWT_MacOSXResourceBundle.m_CFLAGS := -O0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2209
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2210
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2211
ifeq ($(PLATFORM)-$(ARCH_FAMILY), solaris-sparc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2212
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2213
# TODO...
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2214
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2215
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2216
#	FILES_c += $(FILES_2D_vis)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2217
#	ASFLAGS += -P
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2218
#	FILES_s += mlib_v_ImageCopy_blk.s
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2219
#	INLINE_VIS = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2220
#	CFLAGS_sparcv9 = -DMLIB_OS64BIT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2221
#	CFLAGS += $(CFLAGS_$(ARCH)) -DMLIB_ADD_SUFF $(INLINE_VIS)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2222
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2223
	LIBAWT_FILES += MapAccelFunc.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2224
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2225
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2226
ifneq ($(PLATFORM),solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2227
	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2228
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2229
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2230
LIBAWT_LANG := C
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2231
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2232
ifeq ($(PLATFORM),windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2233
	LIBAWT_FILES += AccelGlyphCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2234
			ShaderList.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2235
			CmdIDList.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2236
			Hashtable.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2237
			GDIHashtable.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2238
			Devices.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2239
			ObjectList.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2240
			GDIBlitLoops.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2241
			GDIRenderer.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2242
			GDIWindowSurfaceData.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2243
			WindowsFlags.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2244
			WPrinterJob.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2245
			awt_%.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2246
			D3DBlitLoops.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2247
			D3DBufImgOps.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2248
			D3DContext.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2249
			D3DGlyphCache.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2250
			D3DGraphicsDevice.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2251
			D3DMaskBlit.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2252
			D3DMaskCache.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2253
			D3DMaskFill.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2254
			D3DPipelineManager.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2255
			D3DPaints.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2256
			D3DRenderer.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2257
			D3DRenderQueue.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2258
			D3DResourceManager.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2259
			D3DSurfaceData.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2260
			D3DTextRenderer.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2261
			D3DVertexCacher.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2262
			ShellFolder2.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2263
			ThemeReader.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2264
			ComCtl32Util.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2265
			DllUtil.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2266
			initIDs.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2267
			MouseInfo.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2268
			rect.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2269
	LIBAWT_LANG := C++
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2270
	LIBAWT_CFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2271
	ifeq ($(ARCH_DATA_MODEL), 64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2272
		LIBAWT_CFLAGS += -DMLIB_OS64BIT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2273
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2274
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2275
	ifdef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2276
		LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2277
	else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2278
		LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2279
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2280
	LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2281
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2282
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2283
ifeq ($(MILESTONE), internal)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2284
	LIBAWT_CFLAGS += -DINTERNAL_BUILD
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2285
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2286
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2287
LIBAWT_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2288
ifeq ($(PLATFORM),linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2289
	LIBAWT_MAPFILE :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2290
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2291
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2292
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2293
		SRC:=$(LIBAWT_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2294
		INCLUDE_FILES := $(LIBAWT_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2295
		LANG:=$(LIBAWT_LANG),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2296
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_CFLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2297
		MAPFILE := $(LIBAWT_MAPFILE), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2298
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2299
		LDFLAGS_windows:=advapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2300
				 imm32.lib ole32.lib uuid.lib shell32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2301
				 comdlg32.lib winmm.lib comctl32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2302
				 shlwapi.lib delayimp.lib java.lib jvm.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2303
				 /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2304
				 /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2305
				 /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2306
				 /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2307
				 /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2308
		LDFLAGS_macosx :=-framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2309
				 -framework OpenGL \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2310
				 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2311
				 -framework JavaNativeFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2312
				 -framework JavaRuntimeSupport \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2313
				 -framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2314
				 -framework AudioToolbox,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2315
		LDFLAGS_solaris := -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2316
		LDFLAGS_SUFFIX_posix := -ljvm $(LIBM) -ljava $(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2317
		VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2318
		RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2319
			  /D "JDK_FNAME=awt.dll" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2320
			  /D "JDK_INTERNAL_NAME=awt" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2321
			  /D "JDK_FTYPE=0x2L",\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2322
		BIN:=$(JDK_OUTPUTDIR)/objs/libawt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2323
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2324
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2325
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2326
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2327
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2328
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2329
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2330
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2331
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2332
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2333
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2334
LIBDCPR_SRC_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2335
	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2336
	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2337
	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2338
	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2339
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2340
LIBDCPR_CFLAGS := $(foreach dir,$(LIBDCPR_SRC_DIRS),-I$(dir)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2341
	          -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2342
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2343
$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2344
		SRC:=$(LIBDCPR_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2345
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2346
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2347
			$(LIBDCPR_CFLAGS), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2348
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2349
		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LIBM)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2350
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2351
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2352
		LDFLAGS_SUFFIX_posix := $(LIBDL) -lm,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2353
		BIN:=$(JDK_OUTPUTDIR)/objs/libdcpr,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2354
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2355
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2356
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2357
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2358
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2359
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2360
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2361
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2362
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2363
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2364
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2365
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2366
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2367
                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2368
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2369
		CFLAGS_posix:= -D__sun_jdk,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2370
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2371
                     -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2372
                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2373
                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio/MUSCLE,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2374
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2375
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2376
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2377
		LDFLAGS_SUFFIX_posix := $(LIBDL), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2378
		LDFLAGS_SUFFIX_windows := winscard.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2379
		BIN:=$(JDK_OUTPUTDIR)/objs/libj2pcsc,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2380
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2381
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2382
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2383
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2384
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2385
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2386
ifneq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2387
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2388
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2389
                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/jgss/wrapper,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2390
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2391
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2392
                     -I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2393
                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/jgss/wrapper,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2394
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2395
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2396
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2397
		LDFLAGS_SUFFIX := $(LIBDL), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2398
		BIN:=$(JDK_OUTPUTDIR)/objs/libj2gss,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2399
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2400
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2401
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2402
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2403
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2404
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2405
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2406
BUILD_LIBKRB5_NAME :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2407
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2408
     BUILD_LIBKRB5_NAME := w2k_lsa_auth
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2409
     BUILD_LIBKRB5_FILES := NativeCreds.c WindowsDirectory.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2410
     BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/krb5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2411
     BUILD_LIBKRB5_LIBS := Secur32.lib netapi32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2412
	kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2413
	advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2414
	odbccp32.lib wsock32.lib
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2415
else ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2416
     BUILD_LIBKRB5_NAME := osxkrb5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2417
     BUILD_LIBKRB5_FILES := nativeccache.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2418
     BUILD_LIBKRB5_LIBS := -framework Kerberos
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2419
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2420
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2421
ifneq ($(BUILD_LIBKRB5_NAME),)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2422
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2423
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2424
                     $(BUILD_LIBKRB5_SRC) ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2425
		INCLUDE_FILES := $(BUILD_LIBKRB5_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2426
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2427
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2428
		        -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2429
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/krb5 ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2430
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2431
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2432
		LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS) ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2433
		BIN:=$(JDK_OUTPUTDIR)/objs/libkrb5,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2434
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)$(BUILD_LIBKRB5_NAME)$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2435
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2436
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)$(BUILD_LIBKRB5_NAME)$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2437
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2438
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2439
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2440
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2441
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2442
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2443
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2444
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2445
		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/mscapi,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2446
		INCLUDE_FILES := security.cpp, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2447
		LANG:=C++,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2448
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2449
		        -I$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2450
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/mscapi ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2451
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2452
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2453
		LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2454
		BIN:=$(JDK_OUTPUTDIR)/objs/libsunmscapi,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2455
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunmscapi$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2456
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2457
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunmscapi$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2458
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2459
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2460
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2461
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2462
ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL), windows-64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2463
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2464
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2465
                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2466
                     $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2467
                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11/wrapper,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2468
		LANG:=C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2469
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2470
		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2471
		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11 \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2472
		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2473
                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11/wrapper,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2474
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2475
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2476
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2477
		LDFLAGS_SUFFIX_posix := $(LIBDL), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2478
		BIN:=$(JDK_OUTPUTDIR)/objs/libj2pkcs11,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2479
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2480
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2481
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2482
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2483
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2484
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2485
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2486
ifndef DISABLE_INTREE_EC
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2487
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2488
# TODO Set DISABLE_INTREE_EC in configure if src/share/native/sun/security/ec/impl
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2489
#      is not present
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2490
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2491
BUILD_LIBSUNEC_FLAGS := -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2492
                        -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2493
                        -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2494
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2495
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2496
		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/ec \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2497
                     $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2498
		LANG := C++, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2499
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBSUNEC_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2500
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBSUNEC_FLAGS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2501
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2502
		LDFLAGS:=$(LDFLAGS_JDKLIB) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2503
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2504
		LDFLAGS_SUFFIX := $(LIBCXX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2505
		BIN:=$(JDK_OUTPUTDIR)/objs/libsunec,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2506
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2507
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2508
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2509
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2510
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2511
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2512
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2513
LIBJSOUND_SRC_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2514
	$(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2515
	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/media/sound
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2516
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2517
LIBJSOUND_SRC_FILES := Utilities.c Platform.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2518
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2519
LIBJSOUND_LANG := C
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2520
LIBJSOUND_CFLAGS := $(foreach dir,$(LIBJSOUND_SRC_DIRS),-I$(dir))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2521
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2522
EXTRA_SOUND_JNI_LIBS := 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2523
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2524
LIBJSOUND_MIDIFILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2525
	MidiInDevice.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2526
	MidiInDeviceProvider.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2527
	MidiOutDevice.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2528
	MidiOutDeviceProvider.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2529
	PlatformMidi.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2530
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2531
# files needed for ports
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2532
LIBJSOUND_PORTFILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2533
	PortMixerProvider.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2534
	PortMixer.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2535
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2536
# files needed for direct audio
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2537
LIBJSOUND_DAUDIOFILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2538
	DirectAudioDeviceProvider.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2539
	DirectAudioDevice.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2540
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2541
ifeq ($(PLATFORM), windows)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2542
	EXTRA_SOUND_JNI_LIBS += jsoundds
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2543
	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2544
                            -DUSE_PLATFORM_MIDI_OUT=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2545
                            -DUSE_PLATFORM_MIDI_IN=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2546
                            -DUSE_PORTS=TRUE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2547
	LIBJSOUND_SRC_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2548
		PLATFORM_API_WinOS_MidiIn.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2549
		PLATFORM_API_WinOS_MidiOut.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2550
		PLATFORM_API_WinOS_Util.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2551
		PLATFORM_API_WinOS_Ports.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2552
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2553
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2554
endif # PLATFORM windows
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2555
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2556
ifeq ($(PLATFORM), linux)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2557
	EXTRA_SOUND_JNI_LIBS += jsoundalsa
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2558
	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2559
endif # PLATFORM linux
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2560
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2561
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2562
	LIBJSOUND_LANG := C++
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2563
	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2564
                            -DUSE_PORTS=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2565
                            -DUSE_DAUDIO=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2566
                            -DUSE_PLATFORM_MIDI_OUT=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2567
                            -DUSE_PLATFORM_MIDI_IN=TRUE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2568
	LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/sun/media/sound
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2569
	LIBJSOUND_SRC_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2570
		PLATFORM_API_MacOSX_Utils.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2571
		PLATFORM_API_MacOSX_PCM.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2572
		PLATFORM_API_MacOSX_Ports.cpp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2573
                PLATFORM_API_MacOSX_MidiIn.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2574
                PLATFORM_API_MacOSX_MidiOut.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2575
                PLATFORM_API_MacOSX_MidiUtils.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2576
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2577
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2578
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2579
endif # PLATFORM macosx
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2580
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2581
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2582
	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2583
                            -DUSE_PORTS=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2584
                            -DUSE_DAUDIO=TRUE
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2585
	LIBJSOUND_SRC_FILES += \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2586
		PLATFORM_API_SolarisOS_Utils.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2587
		PLATFORM_API_SolarisOS_Ports.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2588
		PLATFORM_API_SolarisOS_PCM.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2589
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2590
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2591
	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2592
endif # PLATFORM solaris
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2593
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2594
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2595
ifeq ($(JVM_VARIANT_ZERO), true)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2596
	LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2597
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2598
  ifeq ($(ARCH), i586)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2599
	LIBJSOUND_CFLAGS += -DX_ARCH=X_I586
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2600
  endif # ARCH i586
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2601
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2602
  ifeq ($(ARCH), sparc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2603
	LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARC
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2604
  endif # ARCH sparc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2605
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2606
  ifeq ($(ARCH), sparcv9)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2607
	LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARCV9
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2608
  endif # ARCH sparcv9
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2609
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2610
  ifeq ($(ARCH), amd64)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2611
	LIBJSOUND_CFLAGS += -DX_ARCH=X_AMD64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2612
  endif # ARCH amd64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2613
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2614
  ifeq ($(ARCH), arm)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2615
	LIBJSOUND_CFLAGS += -DX_ARCH=X_ARM
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2616
  endif # ARCH arm
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2617
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2618
  ifeq ($(ARCH), ppc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2619
	LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2620
  endif # ARCH ppc
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2621
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2622
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2623
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2624
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2625
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2626
		SRC:=$(LIBJSOUND_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2627
		INCLUDE_FILES := $(LIBJSOUND_SRC_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2628
		LANG:=$(LIBJSOUND_LANG),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2629
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2630
			$(LIBJSOUND_CFLAGS), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2631
		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2632
			$(LIBJSOUND_CFLAGS), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2633
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2634
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2635
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2636
		LDFLAGS_windows:=java.lib advapi32.lib winmm.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2637
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2638
		LDFLAGS_SUFFIX_solaris:=-lc ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2639
		LDFLAGS_SUFFIX_macosx := -framework CoreAudio -framework CoreFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2640
             -framework CoreServices -framework AudioUnit $(LIBCXX) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2641
             -framework CoreMIDI -framework AudioToolbox ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2642
		BIN:=$(JDK_OUTPUTDIR)/objs/libjsound,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2643
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2644
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2645
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2646
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2647
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2648
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2649
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2650
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2651
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2652
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)),)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2653
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2654
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2655
		SRC:=$(LIBJSOUND_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2656
		INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2657
                                $(LIBJSOUND_DAUDIOFILES) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2658
				PLATFORM_API_LinuxOS_ALSA_CommonUtils.c   \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2659
				PLATFORM_API_LinuxOS_ALSA_PCM.c     \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2660
				PLATFORM_API_LinuxOS_ALSA_PCMUtils.c   \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2661
				PLATFORM_API_LinuxOS_ALSA_MidiIn.c  \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2662
				PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2663
				PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2664
				PLATFORM_API_LinuxOS_ALSA_Ports.c,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2665
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2666
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2667
			$(LIBJSOUND_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2668
			-DUSE_DAUDIO=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2669
			-DUSE_PORTS=TRUE  \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2670
			-DUSE_PLATFORM_MIDI_OUT=TRUE \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2671
			-DUSE_PLATFORM_MIDI_IN=TRUE, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2672
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2673
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2674
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2675
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) -lasound,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2676
		BIN:=$(JDK_OUTPUTDIR)/objs/libjsoundalsa,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2677
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2678
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2679
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2680
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2681
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2682
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2683
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2684
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2685
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2686
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2687
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2688
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)),)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2689
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2690
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2691
		SRC:=$(LIBJSOUND_SRC_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2692
		INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2693
				PLATFORM_API_WinOS_DirectSound.cpp, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2694
		LANG := C++,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2695
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2696
			$(LIBJSOUND_CFLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2697
			-DUSE_DAUDIO=TRUE, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2698
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2699
			 $(call SET_SHARED_LIBRARY_ORIGIN),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2700
		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2701
		BIN:=$(JDK_OUTPUTDIR)/objs/libjsoundds,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2702
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2703
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2704
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2705
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2706
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2707
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2708
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2709
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2710
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2711
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2712
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2713
ifeq ($(PLATFORM), solaris)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2714
ifndef OPENJDK
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2715
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2716
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2717
		SRC:=$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2718
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2719
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2720
			-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2721
		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2722
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2723
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2724
		LDFLAGS_SUFFIX:=$(LIBDL),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2725
		BIN:=$(JDK_OUTPUTDIR)/objs/libj2ucrypto,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2726
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2727
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2728
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2729
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2730
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2731
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2732
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2733
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2734
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2735
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2736
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2737
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2738
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2739
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2740
LIBAPPLESCRIPTENGINE_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2741
	AppleScriptEngine.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2742
        AppleScriptExecutionContext.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2743
        AS_NS_ConversionUtils.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2744
        NS_Java_ConversionUtils.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2745
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2746
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2747
		SRC:=$(JDK_TOPDIR)/src/macosx/native/apple/applescript,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2748
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2749
		INCLUDE_FILES:=$(LIBAPPLESCRIPTENGINE_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2750
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2751
			-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2752
			-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2753
                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2754
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2755
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2756
		LDFLAGS_SUFFIX:= \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2757
    -framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2758
    -framework Carbon \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2759
    -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2760
    -framework JavaNativeFoundation, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2761
		BIN:=$(JDK_OUTPUTDIR)/objs/libAppleScriptEngine,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2762
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)AppleScriptEngine$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2763
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2764
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)AppleScriptEngine$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2765
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2766
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2767
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2768
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2769
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2770
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2771
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2772
LIBOSXAPP_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2773
	NSApplicationAWT.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2774
	QueuingApplicationDelegate.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2775
	PropertiesUtilities.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2776
	ThreadUtilities.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2777
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2778
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2779
		SRC:=$(JDK_TOPDIR)/src/macosx/native/sun/osxapp,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2780
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2781
		INCLUDE_FILES:=$(LIBOSXAPP_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2782
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2783
			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2784
                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2785
                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2786
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2787
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2788
		LDFLAGS_SUFFIX_macosx := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2789
	-framework Accelerate \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2790
	-framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2791
	-framework AudioToolbox \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2792
	-framework Carbon \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2793
	-framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2794
	-framework Security \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2795
	-framework ExceptionHandling \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2796
        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2797
	-framework JavaNativeFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2798
	-framework JavaRuntimeSupport \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2799
	-framework OpenGL \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2800
	-framework IOSurface \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2801
	-framework QuartzCore, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2802
		BIN:=$(JDK_OUTPUTDIR)/objs/libosxapp,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2803
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2804
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2805
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2806
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2807
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2808
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2809
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2810
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2811
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2812
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2813
LIBOSX_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2814
    Dispatch.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2815
    CFileManager.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2816
    KeystoreImpl.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2817
    JavaAppLauncher.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2818
    MacOSXPreferencesFile.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2819
    SCDynamicStoreConfig.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2820
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2821
LIBOSX_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2822
  $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2823
  $(JDK_TOPDIR)/src/macosx/native/java/util \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2824
  $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2825
  $(JDK_TOPDIR)/src/macosx/native/apple/security \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2826
  $(JDK_TOPDIR)/src/macosx/native/apple/launcher
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2827
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2828
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2829
		SRC:=$(LIBOSX_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2830
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2831
		INCLUDE_FILES:=$(LIBOSX_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2832
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2833
                        $(foreach dir,$(LIBOSX_DIRS),-I$(dir)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2834
                        -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2835
                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2836
                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2837
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2838
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2839
		LDFLAGS_SUFFIX_macosx := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2840
    -losxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2841
    -framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2842
    -framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2843
    -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2844
    -framework JavaNativeFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2845
    -framework JavaRuntimeSupport \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2846
    -framework Security \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2847
    -framework SystemConfiguration \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2848
    $(LDFLAGS_JDKLIB_SUFFIX), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2849
		BIN:=$(JDK_OUTPUTDIR)/objs/libosx,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2850
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2851
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2852
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2853
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2854
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2855
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2856
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2857
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2858
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2859
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2860
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2861
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2862
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2863
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2864
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2865
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2866
LIBAWT_LWAWT_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2867
        awt.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2868
        ApplicationDelegate.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2869
        CFRetainedResource.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2870
        CGLGraphicsConfig.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2871
        CGLSurfaceData.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2872
        CGLLayer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2873
        CGraphicsConfig.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2874
        CGraphicsDevice.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2875
        CGraphicsEnv.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2876
        CCharToGlyphMapper.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2877
        CSystemColors.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2878
        AWTFont.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2879
        CGGlyphOutlines.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2880
        CGGlyphImages.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2881
        CoreTextSupport.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2882
        AWTStrike.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2883
        InitIDs.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2884
        AWTEvent.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2885
        AWTView.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2886
        AWTWindow.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2887
        AWTSurfaceLayers.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2888
        CCursorManager.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2889
        CClipboard.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2890
        CDataTransferer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2891
        CDragSource.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2892
        CDragSourceContextPeer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2893
        CDropTarget.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2894
        CDropTargetContextPeer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2895
        CInputMethod.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2896
        CDesktopPeer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2897
        OSVersion.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2898
        DnDUtilities.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2899
        CFileDialog.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2900
        CImage.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2901
        CMenu.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2902
        CMenuBar.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2903
        CMenuComponent.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2904
        CMenuItem.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2905
        CPopupMenu.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2906
        CRobot.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2907
        CTrayIcon.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2908
        CWrapper.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2909
        JavaAccessibilityAction.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2910
        JavaAccessibilityUtilities.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2911
        JavaComponentAccessibility.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2912
        JavaTextAccessibility.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2913
        LWCToolkit.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2914
        GeomUtilities.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2915
        CPrinterJob.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2916
        PrintModel.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2917
        PrinterSurfaceData.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2918
        PrinterView.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2919
        QuartzSurfaceData.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2920
        QuartzRenderer.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2921
        CTextPipe.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2922
        ImageSurfaceData.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2923
        awt_DrawingSurface.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2924
        \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2925
        OGLBlitLoops.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2926
        OGLBufImgOps.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2927
        OGLContext.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2928
        OGLFuncs.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2929
        OGLMaskBlit.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2930
        OGLMaskFill.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2931
        OGLPaints.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2932
        OGLRenderQueue.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2933
        OGLRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2934
        OGLSurfaceData.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2935
        OGLTextRenderer.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2936
        OGLVertexCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2937
        AccelGlyphCache.c \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2938
        CUPSfuncs.c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2939
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2940
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2941
LIBAWT_LWAWT_DIRS := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2942
  $(JDK_TOPDIR)/src/macosx/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2943
  $(JDK_TOPDIR)/src/macosx/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2944
  $(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2945
  $(JDK_TOPDIR)/src/solaris/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2946
  $(JDK_TOPDIR)/src/share/native/sun/font \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2947
  $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2948
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2949
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2950
		SRC:=$(LIBAWT_LWAWT_DIRS),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2951
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2952
		INCLUDE_FILES:=$(LIBAWT_LWAWT_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2953
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2954
                        $(foreach dir,$(LIBAWT_LWAWT_DIRS),-I$(dir)) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2955
                        -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2956
                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2957
                        -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2958
                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2959
                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2960
                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2961
                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2962
                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2963
                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2964
                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2965
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2966
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2967
		LDFLAGS_SUFFIX_macosx := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2968
	-lawt -lmlib_image -losxapp $(LDFLAGS_JDKLIB_SUFFIX) $(LIBM) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2969
	-framework Accelerate \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2970
	-framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2971
	-framework AudioToolbox \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2972
	-framework Carbon \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2973
	-framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2974
	-framework Security \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2975
	-framework ExceptionHandling \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2976
        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2977
	-framework JavaNativeFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2978
	-framework JavaRuntimeSupport \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2979
	-framework OpenGL \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2980
        -framework QuartzCore ,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2981
		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_lwawt,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2982
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2983
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2984
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2985
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2986
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2987
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2988
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2989
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2990
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2991
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2992
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2993
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2994
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2995
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2996
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2997
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2998
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  2999
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3000
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3001
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3002
ifeq ($(PLATFORM), macosx)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3003
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3004
LIBOSXUI_FILES := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3005
        AquaFileView.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3006
        AquaLookAndFeel.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3007
        AquaNativeResources.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3008
        JRSUIConstantSync.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3009
        JRSUIController.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3010
        JRSUIFocus.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3011
        ScreenPopupFactory.m \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3012
        ScreenMenu.m
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3013
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3014
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3015
		SRC:=$(JDK_TOPDIR)/src/macosx/native/com/apple/laf,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3016
		LANG := C,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3017
		INCLUDE_FILES:=$(LIBOSXUI_FILES),\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3018
		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3019
                        -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3020
			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3021
			-I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3022
                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3023
		LDFLAGS:=$(LDFLAGS_JDKLIB)\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3024
			 $(call SET_SHARED_LIBRARY_ORIGIN), \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3025
		LDFLAGS_SUFFIX_macosx := \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3026
    -lawt -losxapp -lawt_lwawt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3027
    -framework Cocoa \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3028
    -framework Carbon \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3029
    -framework ApplicationServices \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3030
    -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3031
    -framework JavaNativeFoundation \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3032
    -framework JavaRuntimeSupport, \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3033
		BIN:=$(JDK_OUTPUTDIR)/objs/libosxui,\
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3034
		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3035
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3036
BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3037
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3038
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3039
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3040
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3041
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3042
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3043
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3044
$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3045
  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3046
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3047
#$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3048
#  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3049
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3050
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3051
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3052
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
  3053
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
  3054
all: $(COPY_FILES) $(BUILD_LIBRARIES)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
  3055
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
  3056
.PHONY: all