3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
5 # Licensed under the GPL v2, see the file LICENSE in this tarball.
7 srcdir:=$(top_srcdir)/editors
8 objdir:=$(top_builddir)/editors
10 EDITORS-$(CONFIG_AWK) += awk.o
11 EDITORS-$(CONFIG_PATCH) += patch.o
12 EDITORS-$(CONFIG_SED) += sed.o
13 EDITORS-$(CONFIG_VI) += vi.o
16 needlibm-$(CONFIG_FEATURE_AWK_MATH) := y
18 ifeq ($(needlibm-y),y)
19 LIBRARIES := $(filter-out -lm,$(LIBRARIES)) -lm
22 EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITORS-y))
23 EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c)
24 APPLET_SRC-y+=$(EDITOR_SRC-y)
25 APPLET_SRC-a+=$(EDITOR_SRC-a)
27 editors_OBJ:= $(patsubst %,$(objdir)/%,$(EDITORS-y))
29 $(editors_OBJ): $(objdir)/%.o: $(srcdir)/%.c
30 $(objdir)/editors.a: $(editors_OBJ)
31 libraries-y:=$(libraries-y) $(objdir)/editors.a