blob: 757adc85ce58ab6f593af0b417f87311b012eb3a [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Makefile for uClibc
2#
3# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4#
5# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6#
7
8subdirs += libc/pwd_grp
9
10PWDGRP_DIR := $(top_srcdir)libc/pwd_grp
11PWDGRP_OUT := $(top_builddir)libc/pwd_grp
12
13CSRC := $(notdir $(wildcard $(PWDGRP_DIR)/*.c))
14CSRC := $(filter-out pwd_grp.c pwd_grp_internal.c,$(CSRC))
15
16ifneq ($(UCLIBC_HAS_SHADOW),y)
17SHADOW_CSRC := \
18 fgetspent_r.c fgetspent.c getspent_r.c getspent.c \
19 getspnam_r.c getspnam.c lckpwdf.c putspent.c \
20 sgetspent_r.c sgetspent.c __parsespent.c
21# getspuid_r.c getspuid.c
22CSRC := $(filter-out $(SHADOW_CSRC),$(CSRC))
23endif
24
25PWDGRP_SRC := $(patsubst %.c,$(PWDGRP_DIR)/%.c,$(CSRC))
26PWDGRP_OBJ := $(patsubst %.c,$(PWDGRP_OUT)/%.o,$(CSRC))
27
28libc-y += $(PWDGRP_OBJ)
29
30objclean-y += CLEAN_libc/pwd_grp
31
32CLEAN_libc/pwd_grp:
33 $(do_rm) $(addprefix $(PWDGRP_OUT)/*., o os)