jfb2 writes in Bug 119:
[oweals/busybox.git] / editors / Makefile.in
index f4f604e6a6a78765815654299efa86acdad1ab75..571e05568147ddcf545a8eecf597a77c78646a48 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for busybox
 #
-# Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 EDITOR_AR:=editors.a
 ifndef $(EDITOR_DIR)
-EDITOR_DIR:=$(TOPDIR)editors/
+EDITOR_DIR:=$(top_builddir)/editors/
 endif
+srcdir=$(top_srcdir)/editors
 
 EDITOR-y:=
 EDITOR-$(CONFIG_AWK)      += awk.o
+EDITOR-$(CONFIG_PATCH)    += patch.o
 EDITOR-$(CONFIG_SED)       += sed.o
 EDITOR-$(CONFIG_VI)        += vi.o
 EDITOR_SRC:= $(EDITOR-y)
@@ -41,3 +43,6 @@ endif
 $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
        $(AR) -ro $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
 
+$(EDITOR_DIR)%.o: $(srcdir)/%.c
+       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+