3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
5 # Licensed under the GPL v2, see the file LICENSE in this tarball.
7 LIBPWDGRP_AR:=libpwdgrp.a
8 ifndef $(LIBPWDGRP_DIR)
9 LIBPWDGRP_DIR:=$(top_builddir)/libpwdgrp/
11 srcdir=$(top_srcdir)/libpwdgrp
14 LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
15 LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \
16 fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \
17 getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
18 getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
19 initgroups.o putpwent.o putgrent.o
20 LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ0-y))
22 LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
23 LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
24 __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
25 getspnam.o getspent_r.o getspent.o sgetspent.o \
26 putspent.o __parsespent.o # getspuid_r.o getspuid.o
27 LIBPWDGRP_MOBJS1=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ1-y))
29 libraries-y+=$(LIBPWDGRP_DIR)$(LIBPWDGRP_AR)
31 $(LIBPWDGRP_DIR)$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
32 $(AR) $(ARFLAGS) $@ $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
34 $(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
35 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
37 $(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
38 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@