|
Packit |
6c4009 |
# Copyright (C) 1993-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifdef in-Makerules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Look for header files in mach/ under the top-level library source directory.
|
|
Packit |
6c4009 |
# Look for generated header files where they get created.
|
|
Packit |
6c4009 |
includes += -I$(..)mach -I$(common-objpfx)mach/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq (mach,$(subdir))
|
|
Packit |
6c4009 |
# Subdirectories other than mach/ might use the generated Mach headers.
|
|
Packit |
6c4009 |
# So make sure we get a chance to run in mach/ to make them before all else.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
mach-objpfx = $(common-objpfx)mach/
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
mach-objpfx = $(objpfx)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# These are all the generated files that <mach.h> includes.
|
|
Packit |
6c4009 |
# Actually, it's only some of them. We omit mach_interface.h
|
|
Packit |
6c4009 |
# because it's different in Darwin and the conditional crap is
|
|
Packit |
6c4009 |
# too much trouble. This should suffice for getting the mach/Makefile
|
|
Packit |
6c4009 |
# rules invoked when they need to be.
|
|
Packit |
6c4009 |
mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
|
|
Packit |
6c4009 |
$(patsubst %,$(mach-objpfx)mach/mach_%.h,\
|
|
Packit |
6c4009 |
port host)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq (mach,$(subdir))
|
|
Packit |
6c4009 |
# This patsubst generates patterns like `m%h-shortcuts.h', which are damn
|
|
Packit |
6c4009 |
# likely to match just the corresponding particular file we want.
|
|
Packit |
6c4009 |
$(patsubst mach%,m\%h%,$(mach-before-compile)): mach-before-compile # Run only if doesn't exist.
|
|
Packit |
6c4009 |
.PHONY: mach-before-compile
|
|
Packit |
6c4009 |
mach-before-compile:
|
|
Packit |
6c4009 |
$(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t generating=t
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
before-compile += $(mach-before-compile)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (crypt,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-crypt.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (dlfcn,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-dl.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (nis,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-nsl.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_nis.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_nisplus.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (nss,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-nss.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_files.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_db.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (hesiod,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-nss_hesiod.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (posix,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-tst-rfc3484 += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-tst-rfc3484-2 += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
LDLIBS-tst-rfc3484-3 += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
else ifeq (nscd,$(subdir))
|
|
Packit |
6c4009 |
LDLIBS-nscd += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDLIBS-pthread.so += $(objdir)/mach/libmachuser.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
endif # in-Makerules
|