aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/Makefile.in39
1 files changed, 23 insertions, 16 deletions
diff --git a/editors/Makefile.in b/editors/Makefile.in
index dd09e7a21..805017dcc 100644
--- a/editors/Makefile.in
+++ b/editors/Makefile.in
@@ -4,29 +4,36 @@
4# 4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7srcdir:=$(top_srcdir)/editors 7EDITOR_AR:=editors.a
8objdir:=$(top_builddir)/editors 8ifndef $(EDITOR_DIR)
9EDITOR_DIR:=$(top_builddir)/editors/
10endif
11srcdir=$(top_srcdir)/editors
9 12
10EDITORS-$(CONFIG_AWK) += awk.o 13EDITOR-y:=
11EDITORS-$(CONFIG_PATCH) += patch.o 14EDITOR-$(CONFIG_AWK) += awk.o
12EDITORS-$(CONFIG_SED) += sed.o 15EDITOR-$(CONFIG_PATCH) += patch.o
13EDITORS-$(CONFIG_VI) += vi.o 16EDITOR-$(CONFIG_SED) += sed.o
17EDITOR-$(CONFIG_VI) += vi.o
14 18
15needlibm-y:= 19ifneq ($(strip $(EDITOR-y)),)
16needlibm-$(CONFIG_FEATURE_AWK_MATH) := y 20libraries-y+=$(EDITOR_DIR)$(EDITOR_AR)
17
18ifeq ($(needlibm-y),y)
19 LIBRARIES := $(filter-out -lm,$(LIBRARIES)) -lm
20endif 21endif
21 22
22EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITORS-y)) 23EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITOR-y))
23EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c) 24EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c)
24APPLET_SRC-y+=$(EDITOR_SRC-y) 25APPLET_SRC-y+=$(EDITOR_SRC-y)
25APPLET_SRC-a+=$(EDITOR_SRC-a) 26APPLET_SRC-a+=$(EDITOR_SRC-a)
26 27
27editors_OBJ:= $(patsubst %,$(objdir)/%,$(EDITORS-y)) 28needlibm-y:=
29needlibm-$(CONFIG_FEATURE_AWK_MATH) := y
30
31ifeq ($(needlibm-y),y)
32 LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
33endif
28 34
29$(editors_OBJ): $(objdir)/%.o: $(srcdir)/%.c 35$(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
30$(objdir)/editors.a: $(editors_OBJ) 36 $(do_ar)
31libraries-y:=$(libraries-y) $(objdir)/editors.a
32 37
38$(EDITOR_DIR)%.o: $(srcdir)/%.c
39 $(compile.c)