Robert Griebl | 1fca558 | 2002-06-04 20:45:46 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Robert Griebl | 1fca558 | 2002-06-04 20:45:46 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Robert Griebl | 1fca558 | 2002-06-04 20:45:46 +0000 | [diff] [blame] | 6 | |
Bernhard Reutner-Fischer | 07a79e7 | 2006-03-09 09:03:37 +0000 | [diff] [blame^] | 7 | srcdir:=$(top_srcdir)/libpwdgrp |
| 8 | objdir:=$(top_builddir)/libpwdgrp |
Eric Andersen | 9615a08 | 2004-07-15 12:53:49 +0000 | [diff] [blame] | 9 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 10 | LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c |
Bernhard Reutner-Fischer | 5d26126 | 2006-03-01 22:54:48 +0000 | [diff] [blame] | 11 | LIBPWDGRP_M0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r fgetgrent_r \ |
| 12 | fgetpwent fgetgrent getpwnam_r getgrnam_r getpwuid_r \ |
| 13 | getgrgid_r getpwuid getgrgid getpwnam getgrnam getpw \ |
| 14 | getpwent_r getgrent_r getpwent getgrent \ |
| 15 | initgroups putpwent putgrent |
| 16 | LIBPWDGRP_MOBJ0=$(patsubst %,$(objdir)/%$(om),$(LIBPWDGRP_M0-y)) |
| 17 | $(LIBPWDGRP_MOBJ0): $(LIBPWDGRP_MSRC0) |
Eric Andersen | 9615a08 | 2004-07-15 12:53:49 +0000 | [diff] [blame] | 18 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 19 | LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c |
Bernhard Reutner-Fischer | 5d26126 | 2006-03-01 22:54:48 +0000 | [diff] [blame] | 20 | LIBPWDGRP_M1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent __parsegrent \ |
| 21 | __pgsreader fgetspent_r fgetspent sgetspent_r getspnam_r \ |
| 22 | getspnam getspent_r getspent sgetspent \ |
| 23 | putspent __parsespent # getspuid_r getspuid |
| 24 | LIBPWDGRP_MOBJ1=$(patsubst %,$(objdir)/%$(om),$(LIBPWDGRP_M1-y)) |
| 25 | $(LIBPWDGRP_MOBJ1): $(LIBPWDGRP_MSRC1) |
Robert Griebl | 1fca558 | 2002-06-04 20:45:46 +0000 | [diff] [blame] | 26 | |
Bernhard Reutner-Fischer | 5d26126 | 2006-03-01 22:54:48 +0000 | [diff] [blame] | 27 | LIBPWDGRP_DEFINE0-y:=$(patsubst %,-DL_%,$(LIBPWDGRP_M0-y)) |
| 28 | LIBPWDGRP_DEFINE1-y:=$(patsubst %,-DL_%,$(LIBPWDGRP_M1-y)) |
Robert Griebl | 1fca558 | 2002-06-04 20:45:46 +0000 | [diff] [blame] | 29 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 30 | LIBPWDGRP_SRC-y:=$(LIBPWDGRP_MSRC0) |
| 31 | |
| 32 | LIBRARY_SRC-y+=$(LIBPWDGRP_SRC-y) |
| 33 | LIBRARY_SRC-a+=$(LIBPWDGRP_SRC-y) |
| 34 | |
| 35 | LIBRARY_DEFINE-y+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y) |
| 36 | LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y) |
| 37 | |
Bernhard Reutner-Fischer | 5d26126 | 2006-03-01 22:54:48 +0000 | [diff] [blame] | 38 | libpwdgrp_MOBJ$(os):=$(LIBPWDGRP_MOBJ0) $(LIBPWDGRP_MOBJ1) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 39 | |
Bernhard Reutner-Fischer | 5d26126 | 2006-03-01 22:54:48 +0000 | [diff] [blame] | 40 | ifeq ($(om),.osm) |
| 41 | # XXX FIXME: |
| 42 | # also create a pattern for the non-shared case |
| 43 | $(LIBPWDGRP_MOBJ0:.osm=.om): $(LIBPWDGRP_MSRC0) |
| 44 | $(LIBPWDGRP_MOBJ1:.osm=.om): $(LIBPWDGRP_MSRC1) |
| 45 | endif |
Bernhard Reutner-Fischer | 07a79e7 | 2006-03-09 09:03:37 +0000 | [diff] [blame^] | 46 | |
| 47 | $(objdir)/libpwdgrp.a: $(libpwdgrp_MOBJ$(os)) |
| 48 | libraries-y:=$(libraries-y) $(objdir)/libpwdgrp.a |
| 49 | |