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 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 7 | EDITOR_AR:=editors.a |
| 8 | ifndef $(EDITOR_DIR) |
| 9 | EDITOR_DIR:=$(top_builddir)/editors/ |
| 10 | endif |
| 11 | srcdir=$(top_srcdir)/editors |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 13 | EDITOR-y:= |
Rob Landley | 3b89039 | 2006-05-04 20:56:43 +0000 | [diff] [blame] | 14 | EDITOR-$(CONFIG_AWK) += awk.o |
| 15 | EDITOR-$(CONFIG_ED) += ed.o |
| 16 | EDITOR-$(CONFIG_PATCH) += patch.o |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 17 | EDITOR-$(CONFIG_SED) += sed.o |
| 18 | EDITOR-$(CONFIG_VI) += vi.o |
| 19 | |
| 20 | ifneq ($(strip $(EDITOR-y)),) |
| 21 | libraries-y+=$(EDITOR_DIR)$(EDITOR_AR) |
| 22 | endif |
| 23 | |
| 24 | EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITOR-y)) |
| 25 | EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 26 | APPLET_SRC-y+=$(EDITOR_SRC-y) |
| 27 | APPLET_SRC-a+=$(EDITOR_SRC-a) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 28 | |
Glenn L McGrath | 545106f | 2002-11-11 06:21:00 +0000 | [diff] [blame] | 29 | needlibm-y:= |
| 30 | needlibm-$(CONFIG_FEATURE_AWK_MATH) := y |
| 31 | |
| 32 | ifeq ($(needlibm-y),y) |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 33 | LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES)) |
Glenn L McGrath | 545106f | 2002-11-11 06:21:00 +0000 | [diff] [blame] | 34 | endif |
| 35 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 36 | $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) |
| 37 | $(do_ar) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 38 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 39 | $(EDITOR_DIR)%.o: $(srcdir)/%.c |
| 40 | $(compile.c) |