blob: 5c7c9238e4860856648e369505665571943890f9 [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007MODUTILS_AR:=modutils.a
8ifndef $(MODUTILS_DIR)
9MODUTILS_DIR:=$(top_builddir)/modutils/
10endif
11srcdir=$(top_srcdir)/modutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013MODUTILS-y:=
Eric Andersen85208e22002-04-12 12:05:57 +000014MODUTILS-$(CONFIG_INSMOD) += insmod.o
15MODUTILS-$(CONFIG_LSMOD) += lsmod.o
16MODUTILS-$(CONFIG_MODPROBE) += modprobe.o
17MODUTILS-$(CONFIG_RMMOD) += rmmod.o
18
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000019ifneq ($(strip $(MODUTILS-y)),)
20libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR)
21endif
22
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000023MODUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MODUTILS-y))
24MODUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
25APPLET_SRC-y+=$(MODUTILS_SRC-y)
26APPLET_SRC-a+=$(MODUTILS_SRC-a)
27
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000028$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
29 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000030
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000031$(MODUTILS_DIR)%.o: $(srcdir)/%.c
32 $(compile.c)