[821] | 1 | # Makefile for busybox
|
---|
| 2 | #
|
---|
| 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
---|
| 4 | #
|
---|
| 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball.
|
---|
| 6 |
|
---|
| 7 | LOGINUTILS_AR:=loginutils.a
|
---|
| 8 | ifndef LOGINUTILS_DIR
|
---|
| 9 | LOGINUTILS_DIR:=$(top_builddir)/loginutils/
|
---|
| 10 | endif
|
---|
| 11 | srcdir=$(top_srcdir)/loginutils
|
---|
| 12 |
|
---|
| 13 | LOGINUTILS-y:=
|
---|
| 14 | LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o
|
---|
| 15 | LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o
|
---|
| 16 | LOGINUTILS-$(CONFIG_GETTY) += getty.o
|
---|
| 17 | LOGINUTILS-$(CONFIG_LOGIN) += login.o
|
---|
| 18 | LOGINUTILS-$(CONFIG_PASSWD) += passwd.o
|
---|
| 19 | LOGINUTILS-$(CONFIG_SU) += su.o
|
---|
| 20 | LOGINUTILS-$(CONFIG_SULOGIN) += sulogin.o
|
---|
| 21 | LOGINUTILS-$(CONFIG_VLOCK) += vlock.o
|
---|
| 22 | LOGINUTILS-$(CONFIG_DELUSER) += deluser.o
|
---|
| 23 | LOGINUTILS-$(CONFIG_DELGROUP) += deluser.o
|
---|
| 24 |
|
---|
| 25 | LOGINUTILS-y:=$(sort $(LOGINUTILS-y))
|
---|
| 26 |
|
---|
| 27 | ifneq ($(strip $(LOGINUTILS-y)),)
|
---|
| 28 | libraries-y+=$(LOGINUTILS_DIR)$(LOGINUTILS_AR)
|
---|
| 29 | endif
|
---|
| 30 |
|
---|
| 31 | LOGINUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(LOGINUTILS-y))
|
---|
| 32 | LOGINUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
---|
| 33 | APPLET_SRC-y+=$(LOGINUTILS_SRC-y)
|
---|
| 34 | APPLET_SRC-a+=$(LOGINUTILS_SRC-a)
|
---|
| 35 |
|
---|
| 36 | needcrypt-y:=
|
---|
| 37 | needcrypt-$(CONFIG_LOGIN) := y
|
---|
| 38 | needcrypt-$(CONFIG_PASSWD) := y
|
---|
| 39 | needcrypt-$(CONFIG_SU) := y
|
---|
| 40 | needcrypt-$(CONFIG_SULOGIN) := y
|
---|
| 41 | needcrypt-$(CONFIG_VLOCK) := y
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | ifeq ($(needcrypt-y),y)
|
---|
| 45 | LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
|
---|
| 46 | endif
|
---|
| 47 |
|
---|
| 48 | $(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
|
---|
| 49 | $(do_ar)
|
---|
| 50 |
|
---|
| 51 | $(LOGINUTILS_DIR)%.o: $(srcdir)/%.c
|
---|
| 52 | $(compile.c)
|
---|