1 # |
|
2 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. |
|
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 # |
|
5 # This code is free software; you can redistribute it and/or modify it |
|
6 # under the terms of the GNU General Public License version 2 only, as |
|
7 # published by the Free Software Foundation. Oracle designates this |
|
8 # particular file as subject to the "Classpath" exception as provided |
|
9 # by Oracle in the LICENSE file that accompanied this code. |
|
10 # |
|
11 # This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 # version 2 for more details (a copy is included in the LICENSE file that |
|
15 # accompanied this code). |
|
16 # |
|
17 # You should have received a copy of the GNU General Public License version |
|
18 # 2 along with this work; if not, write to the Free Software Foundation, |
|
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 # |
|
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 # or visit www.oracle.com if you need additional information or have any |
|
23 # questions. |
|
24 # |
|
25 |
|
26 # |
|
27 # Makefile for native threads HPI. |
|
28 # |
|
29 |
|
30 BUILDDIR = ../../.. |
|
31 MODULE = base |
|
32 LIBRARY = hpi |
|
33 PRODUCT = java |
|
34 THREADDIR = native_threads |
|
35 LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/$(THREADDIR) |
|
36 include $(BUILDDIR)/common/Defs.gmk |
|
37 |
|
38 # |
|
39 # Native threads specific C and .s files. |
|
40 # |
|
41 FILES_c = \ |
|
42 monitor_md.c \ |
|
43 threads_md.c \ |
|
44 condvar_md.c \ |
|
45 interrupt_md.c \ |
|
46 mutex_md.c \ |
|
47 sys_api_td.c \ |
|
48 threads_$(PLATFORM).c |
|
49 |
|
50 # |
|
51 # Other files/flags shared between the HPIs. |
|
52 # |
|
53 include $(BUILDDIR)/java/hpi/hpi_common.gmk |
|
54 |
|
55 # |
|
56 # Rules for the .so file. |
|
57 # |
|
58 ifeq ($(PLATFORM), solaris) |
|
59 ifneq ($(ARCH), amd64) |
|
60 FILES_reorder += reorder-$(ARCH) |
|
61 endif |
|
62 endif |
|
63 include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
64 include $(BUILDDIR)/common/Library.gmk |
|
65 |
|
66 # |
|
67 # HPI flags for native threads. |
|
68 # |
|
69 OTHER_CPPFLAGS += -D_REENTRANT -DNATIVE |
|
70 |
|
71 ifeq ($(USE_PTHREADS),true) |
|
72 OTHER_CPPFLAGS += -DUSE_PTHREADS |
|
73 ifeq ($(MOOT_PRIORITIES),true) |
|
74 OTHER_CPPFLAGS += -DMOOT_PRIORITIES |
|
75 endif |
|
76 LIBPOSIX4 = -lposix4 |
|
77 OTHER_LDLIBS += -lpthread $(LIBPOSIX4) |
|
78 endif |
|
79 |
|
80 HAVE_GETHRVTIME=true |
|
81 ifeq ($(HAVE_GETHRVTIME),true) |
|
82 OTHER_CPPFLAGS += -DHAVE_GETHRVTIME |
|
83 endif |
|
84 |
|
85 HAVE_FILIOH=true |
|
86 ifeq ($(HAVE_FILIOH),true) |
|
87 OTHER_CPPFLAGS += -DHAVE_FILIOH |
|
88 endif |
|
89 |
|
90 ifeq ($(NO_INTERRUPTIBLE_IO),true) |
|
91 OTHER_CPPFLAGS += -DNO_INTERRUPTIBLE_IO |
|
92 endif |
|
93 |
|