blob: 99674804cb64548592e277b415cfa65be7f0aa1a [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)
Eric Andersen7daa0762004-10-08 07:46:08 +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
Eric Andersen9615a082004-07-15 12:53:49 +000013
Eric Andersen7daa0762004-10-08 07:46:08 +000014LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
Eric Andersen9615a082004-07-15 12:53:49 +000015LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \
16 fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \
17 getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
18 getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
19 initgroups.o putpwent.o putgrent.o
20LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ0-y))
21
Eric Andersen7daa0762004-10-08 07:46:08 +000022LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
Eric Andersen9615a082004-07-15 12:53:49 +000023LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
24 __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
25 getspnam.o getspent_r.o getspent.o sgetspent.o \
26 putspent.o __parsespent.o # getspuid_r.o getspuid.o
27LIBPWDGRP_MOBJS1=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ1-y))
Robert Griebl1fca5582002-06-04 20:45:46 +000028
29libraries-y+=$(LIBPWDGRP_DIR)$(LIBPWDGRP_AR)
30
Eric Andersen9615a082004-07-15 12:53:49 +000031$(LIBPWDGRP_DIR)$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
Mike Frysinger4d008962005-07-27 01:09:24 +000032 $(AR) $(ARFLAGS) $@ $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
Eric Andersen9615a082004-07-15 12:53:49 +000033
34$(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
35 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
36
37$(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
38 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@
39
Robert Griebl1fca5582002-06-04 20:45:46 +000040