]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/mach/Makefile
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / mach / Makefile
CommitLineData
04277e02 1# Copyright (C) 1993-2019 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
28f540f4
RM
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6 15# License along with the GNU C Library; if not, see
5a82c748 16# <https://www.gnu.org/licenses/>.
28f540f4 17
28f540f4
RM
18ifdef in-Makerules
19
20# Look for header files in mach/ under the top-level library source directory.
757dc096
TBB
21# Look for generated header files where they get created.
22includes += -I$(..)mach -I$(common-objpfx)mach/
28f540f4 23
28f540f4
RM
24ifneq (mach,$(subdir))
25# Subdirectories other than mach/ might use the generated Mach headers.
26# So make sure we get a chance to run in mach/ to make them before all else.
27
6e953631 28mach-objpfx = $(common-objpfx)mach/
c06b8d60
RM
29else
30mach-objpfx = $(objpfx)
31endif
28f540f4
RM
32
33# These are all the generated files that <mach.h> includes.
690a2f7d
RM
34# Actually, it's only some of them. We omit mach_interface.h
35# because it's different in Darwin and the conditional crap is
36# too much trouble. This should suffice for getting the mach/Makefile
37# rules invoked when they need to be.
28f540f4
RM
38mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
39 $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
690a2f7d 40 port host)
28f540f4 41
c06b8d60 42ifneq (mach,$(subdir))
28f540f4
RM
43# This patsubst generates patterns like `m%h-shortcuts.h', which are damn
44# likely to match just the corresponding particular file we want.
697ed91c
ST
45$(patsubst mach%,m\%h%,$(mach-before-compile)): mach-before-compile # Run only if doesn't exist.
46.PHONY: mach-before-compile
47mach-before-compile:
7f9346e1 48 $(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t generating=t
28f540f4
RM
49
50before-compile += $(mach-before-compile)
51endif
52
fb4cc8a0
AA
53ifeq (crypt,$(subdir))
54 LDLIBS-crypt.so += $(objdir)/mach/libmachuser.so
55else ifeq (dlfcn,$(subdir))
56 LDLIBS-dl.so += $(objdir)/mach/libmachuser.so
57else ifeq (nis,$(subdir))
58 LDLIBS-nsl.so += $(objdir)/mach/libmachuser.so
59 LDLIBS-nss_nis.so += $(objdir)/mach/libmachuser.so
60 LDLIBS-nss_nisplus.so += $(objdir)/mach/libmachuser.so
61 LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
62else ifeq (nss,$(subdir))
63 LDLIBS-nss.so += $(objdir)/mach/libmachuser.so
64 LDLIBS-nss_files.so += $(objdir)/mach/libmachuser.so
65 LDLIBS-nss_db.so += $(objdir)/mach/libmachuser.so
66 LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
67else ifeq (hesiod,$(subdir))
68 LDLIBS-nss_hesiod.so += $(objdir)/mach/libmachuser.so
69else ifeq (posix,$(subdir))
70 LDLIBS-tst-rfc3484 += $(objdir)/mach/libmachuser.so
71 LDLIBS-tst-rfc3484-2 += $(objdir)/mach/libmachuser.so
72 LDLIBS-tst-rfc3484-3 += $(objdir)/mach/libmachuser.so
73else ifeq (nscd,$(subdir))
74 LDLIBS-nscd += $(objdir)/mach/libmachuser.so
75endif
76
77LDLIBS-pthread.so += $(objdir)/mach/libmachuser.so
78
28f540f4 79endif # in-Makerules