OSDN Git Service

Only because of multi sources I had to touch up these and add code duplication
[uclinux-h8/uClibc.git] / libc / pwd_grp / Makefile.in
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000 by Lineo, inc.
4 # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 #
6 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7 #
8
9 MSRC:=pwd_grp.c
10 MOBJ:=  fgetpwent_r.o fgetgrent_r.o fgetpwent.o fgetgrent.o \
11         getpwnam_r.o getgrnam_r.o getpwuid_r.o getgrgid_r.o \
12         getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
13         getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
14         initgroups.o putpwent.o putgrent.o \
15         __parsepwent.o __parsegrent.o __pgsreader.o
16
17 ifeq ($(HAS_SHADOW),y)
18 MOBJ+=  fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
19         getspnam.o getspent_r.o getspent.o sgetspent.o \
20         putspent.o __parsespent.o # getspuid_r.o getspuid.o
21 endif
22
23 PWDGRP_DIR:=$(top_srcdir)libc/pwd_grp
24 PWDGRP_OUT:=$(top_builddir)libc/pwd_grp
25
26 PWDGRP_MSRC:=$(PWDGRP_DIR)/$(MSRC)
27 PWDGRP_MOBJ:=$(patsubst %.o,$(PWDGRP_OUT)/%.o,$(MOBJ))
28
29 PWDGRP_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(PWDGRP_MOBJ))))
30
31 $(PWDGRP_MOBJ): $(PWDGRP_MSRC)
32         $(compile.m)
33
34 $(PWDGRP_MOBJ:.o=.os): $(PWDGRP_MSRC)
35         $(compile.m)
36
37 libc-a-y+=$(PWDGRP_MOBJ)
38 libc-a-$(HAS_SHADOW)+=$(PWDGRP_OUT)/lckpwdf.o
39 libc-so-y+=$(PWDGRP_MOBJ:.o=.os)
40 libc-so-$(HAS_SHADOW)+=$(PWDGRP_OUT)/lckpwdf.os
41
42 CFLAGS-multi-y+=$(PWDGRP_DEF)
43 libc-multi-y+=$(PWDGRP_MSRC)
44 libc-multi-$(HAS_SHADOW)+=$(PWDGRP_DIR)/lckpwdf.c
45
46 objclean-y+=pwdgrp_objclean
47
48 pwdgrp_objclean:
49         $(RM) $(PWDGRP_OUT)/*.{o,os}