Commit 9c712914 authored by Eddie Kohler's avatar Eddie Kohler

Place libclick dependencies in .deps.

parent 3a2d9abe
......@@ -59,7 +59,7 @@ click-buildtool: $(srcdir)/click-buildtool.in config.status
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@chmod +x click-buildtool; touch click-buildtool
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/m4/click.m4
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/m4/click.m4
cd $(srcdir) && $(AUTOCONF)
config.status: $(srcdir)/configure
$(SHELL) $(srcdir)/configure @ac_configure_args@
......
......@@ -24,6 +24,9 @@ RANLIB = @RANLIB@
INSTALL = @INSTALL@
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
DEPDIR = .deps
DEPSTAMP = $(DEPDIR)/stamp
.SUFFIXES:
.SUFFIXES: .S .c .cc .o .s .ii
......@@ -62,7 +65,7 @@ STD_ELEMENT_OBJS = addressinfo.o alignmentinfo.o errorelement.o \
CPPFLAGS = @CPPFLAGS@ -DCLICK_USERLEVEL
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
DEPCFLAGS = @DEPCFLAGS@
DEPCFLAGS = @DEPCFLAGS@ @DEPDIRFLAG@
DEFS = @DEFS@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
......@@ -89,12 +92,17 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
#!gmake
DEPFILES := $(wildcard *.d)
DEPFILES := $(wildcard $(DEPDIR)/*.d)
ifneq ($(DEPFILES),)
include $(DEPFILES)
endif
#!end gmake
$(LIBOBJS): $(DEPSTAMP)
$(DEPSTAMP):
@-mkdir $(DEPDIR) >/dev/null 2>&1
@touch $@
install: install-lib
install-lib: $(INSTALLLIBS)
$(mkinstalldirs) $(DESTDIR)$(libdir)
......@@ -103,7 +111,7 @@ uninstall:
for i in $(INSTALLLIBS); do rm -f $(DESTDIR)$(libdir)/$$i; done
clean:
rm -f *.d *.o libclick.a
rm -f .deps *.o libclick.a
clean-lib:
rm -f $(LIBOBJS) libclick.a
distclean: clean
......
......@@ -23,6 +23,7 @@ AC_DEFUN([CLICK_INIT], [
ac_user_kernel_cxxflags=${KERNEL_CXXFLAGS+y}
ac_user_build_cxx=${BUILD_CXX+y}
ac_user_depcflags=${DEPCFLAGS+y}
ac_user_depdirflag=${DEPDIRFLAG+y}
ac_compile_with_warnings=y
conf_auxdir=$1
......@@ -50,6 +51,9 @@ AC_DEFUN([CLICK_PROG_CC], [
test -z "$ac_user_cflags" -a -n "$GCC" -a -n "$ac_compile_with_warnings" -a -z "$ac_user_depcflags" && \
DEPCFLAGS="-MD -MP"
AC_SUBST(DEPCFLAGS)
test -z "$ac_user_cflags" -a -n "$GCC" -a -n "$ac_compile_with_warnings" -a -z "$ac_user_depdirflag" && \
DEPDIRFLAG=['-MF $(DEPDIR)/$][*.d']
AC_SUBST(DEPDIRFLAG)
save_cflags="$CFLAGS"
AC_CACHE_CHECK([whether the C compiler accepts -W -Wall], [ac_cv_c_w_wall], [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment