jfb2 writes in Bug 119:
[oweals/busybox.git] / editors / Makefile.in
index 97450479de006912730c6f295717367d6ee13363..571e05568147ddcf545a8eecf597a77c78646a48 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for busybox
 #
-# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.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
@@ -19,8 +19,9 @@
 
 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
@@ -42,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 $@ $<
+