blob: 2511d34ef513c88d4cf0be81085a1c1722b588d4 [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
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007LIBPWDGRP_AR:=libpwdgrp.a
8ifndef $(LIBPWDGRP_DIR)
9LIBPWDGRP_DIR:=$(top_builddir)/libpwdgrp
10endif
11srcdir=$(top_srcdir)/libpwdgrp
12
13LIBPWDGRP-obj:=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
14
15libraries-y+=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
Eric Andersen9615a082004-07-15 12:53:49 +000016
Eric Andersen7daa0762004-10-08 07:46:08 +000017LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000018LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \
19 fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \
20 getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
21 getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
22 initgroups.o putpwent.o putgrent.o
23LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ0-y))
Eric Andersen9615a082004-07-15 12:53:49 +000024
Eric Andersen7daa0762004-10-08 07:46:08 +000025LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000026LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
27 __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
28 getspnam.o getspent_r.o getspent.o sgetspent.o \
29 putspent.o __parsespent.o # getspuid_r.o getspuid.o
30LIBPWDGRP_MOBJS1=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ1-y))
Robert Griebl1fca5582002-06-04 20:45:46 +000031
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000032LIBPWDGRP_DEFINE0-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS0))))
33LIBPWDGRP_DEFINE1-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS1))))
Robert Griebl1fca5582002-06-04 20:45:46 +000034
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000035LIBPWDGRP_SRC-y:=$(LIBPWDGRP_MSRC0)
36
37LIBRARY_SRC-y+=$(LIBPWDGRP_SRC-y)
38LIBRARY_SRC-a+=$(LIBPWDGRP_SRC-y)
39
40LIBRARY_DEFINE-y+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
41LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
42
43
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000044$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
45 $(do_ar)
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000046
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000047$(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
48 $(compile.c) -DL_$(notdir $*)
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000049
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000050$(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
51 $(compile.c) -DL_$(notdir $*)