blob: df754afd2359bfff2f74541ceaac7ed9bdf847a7 [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
21$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000022 $(AR) $(ARFLAGS) $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
Eric Andersen85208e22002-04-12 12:05:57 +000023
Eric Andersen7daa0762004-10-08 07:46:08 +000024$(MODUTILS_DIR)%.o: $(srcdir)/%.c
25 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
26