Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
| 7 | MODUTILS_AR:=modutils.a |
| 8 | ifndef $(MODUTILS_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | MODUTILS_DIR:=$(top_builddir)/modutils/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/modutils |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
| 13 | MODUTILS-y:= |
| 14 | MODUTILS-$(CONFIG_INSMOD) += insmod.o |
| 15 | MODUTILS-$(CONFIG_LSMOD) += lsmod.o |
| 16 | MODUTILS-$(CONFIG_MODPROBE) += modprobe.o |
| 17 | MODUTILS-$(CONFIG_RMMOD) += rmmod.o |
| 18 | |
| 19 | libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR) |
| 20 | |
| 21 | $(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 22 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 23 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 24 | $(MODUTILS_DIR)%.o: $(srcdir)/%.c |
| 25 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 26 | |