blob: 7e9f2d2047ce9f186a21d7ca7f1c84e86589af07 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
2# Copyright 1998-2005 Sun Microsystems, Inc. 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. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
24#
25
26#
27# Makefile for native threads HPI.
28#
29
30BUILDDIR = ../../..
31LIBRARY = hpi
32PRODUCT = java
33THREADDIR = native_threads
34LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/$(THREADDIR)
35include $(BUILDDIR)/common/Defs.gmk
36
37#
38# Native threads specific C and .s files.
39#
40FILES_c = \
41 monitor_md.c \
42 threads_md.c \
43 condvar_md.c \
44 interrupt_md.c \
45 mutex_md.c \
46 sys_api_td.c \
47 threads_$(PLATFORM).c
48
49#
50# Other files/flags shared between the HPIs.
51#
52include $(BUILDDIR)/java/hpi/hpi_common.gmk
53
54#
55# Rules for the .so file.
56#
57ifeq ($(PLATFORM), solaris)
58 ifneq ($(ARCH), amd64)
59 FILES_reorder += reorder-$(ARCH)
60 endif
61endif
62include $(BUILDDIR)/common/Mapfile-vers.gmk
63include $(BUILDDIR)/common/Library.gmk
64
65#
66# HPI flags for native threads.
67#
68OTHER_CPPFLAGS += -D_REENTRANT -DNATIVE
69
70ifeq ($(USE_PTHREADS),true)
71OTHER_CPPFLAGS += -DUSE_PTHREADS
72ifeq ($(MOOT_PRIORITIES),true)
73OTHER_CPPFLAGS += -DMOOT_PRIORITIES
74endif
75LIBPOSIX4 = -lposix4
76OTHER_LDLIBS += -lpthread $(LIBPOSIX4)
77endif
78
79HAVE_GETHRVTIME=true
80ifeq ($(HAVE_GETHRVTIME),true)
81OTHER_CPPFLAGS += -DHAVE_GETHRVTIME
82endif
83
84HAVE_FILIOH=true
85ifeq ($(HAVE_FILIOH),true)
86OTHER_CPPFLAGS += -DHAVE_FILIOH
87endif
88
89ifeq ($(NO_INTERRUPTIBLE_IO),true)
90OTHER_CPPFLAGS += -DNO_INTERRUPTIBLE_IO
91endif
92