blob: 73c257a00516e255a080add4355fc5e790e50f97 [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
7MODUTILS_AR:=modutils.a
8ifndef $(MODUTILS_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009MODUTILS_DIR:=$(top_builddir)/modutils/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/modutils
Eric Andersen85208e22002-04-12 12:05:57 +000012
13MODUTILS-y:=
14MODUTILS-$(CONFIG_INSMOD) += insmod.o
15MODUTILS-$(CONFIG_LSMOD) += lsmod.o
16MODUTILS-$(CONFIG_MODPROBE) += modprobe.o
17MODUTILS-$(CONFIG_RMMOD) += rmmod.o
18
19libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR)
20
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000021MODUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MODUTILS-y))
22MODUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
23APPLET_SRC-y+=$(MODUTILS_SRC-y)
24APPLET_SRC-a+=$(MODUTILS_SRC-a)
25
Eric Andersen85208e22002-04-12 12:05:57 +000026$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
Mike Frysingerb38673f2006-02-02 01:41:53 +000027 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000028
Eric Andersen7daa0762004-10-08 07:46:08 +000029$(MODUTILS_DIR)%.o: $(srcdir)/%.c
Mike Frysingerb38673f2006-02-02 01:41:53 +000030 $(compile.c)