3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
5 # Licensed under the GPL v2, see the file LICENSE in this tarball.
9 EDITOR_DIR:=$(top_builddir)/editors/
11 srcdir=$(top_srcdir)/editors
14 EDITOR-$(CONFIG_AWK) += awk.o
15 EDITOR-$(CONFIG_PATCH) += patch.o
16 EDITOR-$(CONFIG_SED) += sed.o
17 EDITOR-$(CONFIG_VI) += vi.o
19 ifneq ($(strip $(EDITOR-y)),)
20 libraries-y+=$(EDITOR_DIR)$(EDITOR_AR)
23 EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITOR-y))
24 EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c)
25 APPLET_SRC-y+=$(EDITOR_SRC-y)
26 APPLET_SRC-a+=$(EDITOR_SRC-a)
29 needlibm-$(CONFIG_FEATURE_AWK_MATH) := y
31 ifeq ($(needlibm-y),y)
32 LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
35 $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
38 $(EDITOR_DIR)%.o: $(srcdir)/%.c