aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/Makefile12
-rw-r--r--findutils/Makefile.in6
2 files changed, 12 insertions, 6 deletions
diff --git a/findutils/Makefile b/findutils/Makefile
index ba65a0e1d..f3f8bb872 100644
--- a/findutils/Makefile
+++ b/findutils/Makefile
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-TOPDIR:= ../
+top_srcdir=..
+top_builddir=..
+srcdir=$(top_srcdir)/findutils
FINDUTILS_DIR:=./
-include $(TOPDIR).config
-include $(TOPDIR)Rules.mak
-include Makefile.in
+include $(top_builddir)/Rules.mak
+include $(top_builddir)/.config
+include $(srcdir)/Makefile.in
all: $(libraries-y)
--include $(TOPDIR).depend
+-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
diff --git a/findutils/Makefile.in b/findutils/Makefile.in
index 2d2f242a0..ae71070d9 100644
--- a/findutils/Makefile.in
+++ b/findutils/Makefile.in
@@ -19,8 +19,9 @@
FINDUTILS_AR:=findutils.a
ifndef $(FINDUTILS_DIR)
-FINDUTILS_DIR:=$(TOPDIR)findutils/
+FINDUTILS_DIR:=$(top_builddir)/findutils/
endif
+srcdir=$(top_srcdir)/findutils
FINDUTILS-y:=
FINDUTILS-$(CONFIG_FIND) += find.o
@@ -32,3 +33,6 @@ libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR)
$(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
$(AR) -ro $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
+$(FINDUTILS_DIR)%.o: $(srcdir)/%.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+