blob: c74a768c14d45996fdfdce623c9dde820fd1236d [file] [log] [blame]
Robert Griebl1fca5582002-06-04 20:45:46 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Robert Griebl1fca5582002-06-04 20:45:46 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Robert Griebl1fca5582002-06-04 20:45:46 +00006
7LIBPWDGRP_AR:=libpwdgrp.a
8ifndef $(LIBPWDGRP_DIR)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +00009LIBPWDGRP_DIR:=$(top_builddir)/libpwdgrp
Robert Griebl1fca5582002-06-04 20:45:46 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/libpwdgrp
Robert Griebl1fca5582002-06-04 20:45:46 +000012
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000013LIBPWDGRP-obj:=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
14LIBPWDGRP-pic:=$(LIBPWDGRP_DIR)/$(subst .a,-pic.o,$(LIBPWDGRP_AR))
15
16libraries-y+=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
17libraries-m+=$(LIBPWDGRP-multi-pic)
Eric Andersen9615a082004-07-15 12:53:49 +000018
Eric Andersen7daa0762004-10-08 07:46:08 +000019LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
Eric Andersen9615a082004-07-15 12:53:49 +000020LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \
21 fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \
22 getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
23 getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
24 initgroups.o putpwent.o putgrent.o
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000025LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ0-y))
Eric Andersen9615a082004-07-15 12:53:49 +000026
Eric Andersen7daa0762004-10-08 07:46:08 +000027LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
Eric Andersen9615a082004-07-15 12:53:49 +000028LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
29 __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
30 getspnam.o getspent_r.o getspent.o sgetspent.o \
31 putspent.o __parsespent.o # getspuid_r.o getspuid.o
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000032LIBPWDGRP_MOBJS1=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ1-y))
Robert Griebl1fca5582002-06-04 20:45:46 +000033
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000034LIBPWDGRP_DEFINE0-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS0))))
35LIBPWDGRP_DEFINE1-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS1))))
Robert Griebl1fca5582002-06-04 20:45:46 +000036
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000037LIBPWDGRP_SRC-y:=$(LIBPWDGRP_MSRC0)
38
39LIBRARY_SRC-y+=$(LIBPWDGRP_SRC-y)
40LIBRARY_SRC-a+=$(LIBPWDGRP_SRC-y)
41
42LIBRARY_DEFINE-y+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
43LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
44
45
46$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
Mike Frysingerb38673f2006-02-02 01:41:53 +000047 $(do_ar)
Eric Andersen9615a082004-07-15 12:53:49 +000048
49$(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
Mike Frysingerb38673f2006-02-02 01:41:53 +000050 $(compile.c) -DL_$(notdir $*)
Eric Andersen9615a082004-07-15 12:53:49 +000051
52$(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
Mike Frysingerb38673f2006-02-02 01:41:53 +000053 $(compile.c) -DL_$(notdir $*)