|
Packit |
6c4009 |
# Copyright (C) 1996-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 |
#
|
|
Packit |
6c4009 |
# Sub-makefile for login portion of the library.
|
|
Packit |
6c4009 |
#
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
subdir := login
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Makeconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
headers := utmp.h bits/utmp.h lastlog.h pty.h
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
routines := getlogin getlogin_r setlogin getlogin_r_chk \
|
|
Packit |
6c4009 |
getutent getutent_r getutid getutline getutid_r getutline_r \
|
|
Packit |
6c4009 |
utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
|
|
Packit |
6c4009 |
ptsname_r_chk
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-grantpt.c += -DLIBEXECDIR='"$(libexecdir)"'
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
others = utmpdump
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-pt-chown))
|
|
Packit |
6c4009 |
others += pt_chown
|
|
Packit |
6c4009 |
others-pie = pt_chown
|
|
Packit |
6c4009 |
install-others-programs = $(inst_libexecdir)/pt_chown
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
subdir-dirs = programs
|
|
Packit |
6c4009 |
vpath %.c programs
|
|
Packit |
6c4009 |
|
|
Packit Service |
e54d80 |
tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Build the -lutil library with these extra functions.
|
|
Packit |
6c4009 |
extra-libs := libutil
|
|
Packit |
6c4009 |
extra-libs-others := $(extra-libs)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
libutil-routines:= login login_tty logout logwtmp openpty forkpty
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Rules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-getpt.c += -fexceptions
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yesyes,$(have-fpie)$(build-shared))
|
|
Packit |
6c4009 |
pt_chown-cflags += $(pie-ccflag)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
ifeq (yes,$(have-libcap))
|
|
Packit |
6c4009 |
libcap = -lcap
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
CFLAGS-pt_chown.c += $(pt_chown-cflags)
|
|
Packit |
6c4009 |
LDLIBS-pt_chown = $(libcap)
|
|
Packit |
6c4009 |
ifeq (yesyes,$(have-fpie)$(build-shared))
|
|
Packit |
6c4009 |
LDFLAGS-pt_chown = -Wl,-z,now
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# pt_chown needs to be setuid root.
|
|
Packit |
6c4009 |
$(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
-$(INSTALL_PROGRAM) -m 4755 -o root $< $@
|