aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/Makefile10
-rw-r--r--miscutils/Makefile.in7
2 files changed, 11 insertions, 6 deletions
diff --git a/miscutils/Makefile b/miscutils/Makefile
index 4bae72476..ac427dc09 100644
--- a/miscutils/Makefile
+++ b/miscutils/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)/miscutils
MISCUTILS_DIR:=./
-include $(TOPDIR).config
-include $(TOPDIR)Rules.mak
+include $(top_builddir)/Rules.mak
+include $(top_builddir)/.config
include Makefile.in
all: $(libraries-y)
--include $(TOPDIR).depend
+-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in
index 89e3208a6..ddddf72b3 100644
--- a/miscutils/Makefile.in
+++ b/miscutils/Makefile.in
@@ -19,9 +19,9 @@
MISCUTILS_AR:=miscutils.a
ifndef $(MISCUTILS_DIR)
-MISCUTILS_DIR:=$(TOPDIR)miscutils/
+MISCUTILS_DIR:=$(top_builddir)/miscutils/
endif
-
+srcdir=$(top_srcdir)/miscutils
MISCUTILS-y:=
MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
@@ -50,3 +50,6 @@ endif
$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
$(AR) -ro $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
+$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+