summaryrefslogtreecommitdiff
path: root/libpwdgrp/Makefile.in
blob: a99d3d86fc2ebb15a3efa799af4758b01d8ba3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Makefile for busybox
#
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
#
# Licensed under the GPL v2, see the file LICENSE in this tarball.

srcdir:=$(top_srcdir)/libpwdgrp
objdir:=$(top_builddir)/libpwdgrp

LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
LIBPWDGRP_M0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r fgetgrent_r \
	fgetpwent fgetgrent getpwnam_r getgrnam_r getpwuid_r \
	getgrgid_r getpwuid getgrgid getpwnam getgrnam getpw \
	getpwent_r getgrent_r getpwent getgrent \
	initgroups putpwent putgrent
LIBPWDGRP_MOBJ0=$(patsubst %,$(objdir)/%$(om),$(LIBPWDGRP_M0-y))
$(LIBPWDGRP_MOBJ0): $(LIBPWDGRP_MSRC0)

LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
LIBPWDGRP_M1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent __parsegrent \
	__pgsreader fgetspent_r fgetspent sgetspent_r getspnam_r \
	getspnam getspent_r getspent sgetspent \
	putspent __parsespent # getspuid_r getspuid
LIBPWDGRP_MOBJ1=$(patsubst %,$(objdir)/%$(om),$(LIBPWDGRP_M1-y))
$(LIBPWDGRP_MOBJ1): $(LIBPWDGRP_MSRC1)

LIBPWDGRP_DEFINE0-y:=$(patsubst %,-DL_%,$(LIBPWDGRP_M0-y))
LIBPWDGRP_DEFINE1-y:=$(patsubst %,-DL_%,$(LIBPWDGRP_M1-y))

LIBPWDGRP_SRC-y:=$(LIBPWDGRP_MSRC0)

LIBRARY_SRC-y+=$(LIBPWDGRP_SRC-y)
LIBRARY_SRC-a+=$(LIBPWDGRP_SRC-y)

LIBRARY_DEFINE-y+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)

libpwdgrp_MOBJ$(os):=$(LIBPWDGRP_MOBJ0) $(LIBPWDGRP_MOBJ1)

ifeq ($(om),.osm)
# XXX FIXME:
# also create a pattern for the non-shared case
$(LIBPWDGRP_MOBJ0:.osm=.om): $(LIBPWDGRP_MSRC0)
$(LIBPWDGRP_MOBJ1:.osm=.om): $(LIBPWDGRP_MSRC1)
endif

$(objdir)/libpwdgrp.a: $(libpwdgrp_MOBJ$(os))
libraries-y:=$(libraries-y) $(objdir)/libpwdgrp.a