linux-old/scripts/Makefile
<<
>>
Prefs
   1HOSTCFLAGS:=$(HOSTCFLAGS) -g -Wall
   2HEADER=header.tk
   3TAIL=tail.tk
   4
   5# We allow the Makefile in drivers/sound to decide when to rebuild its
   6# files, rather than trying to second-guess it like we did before.
   7#
   8soundscript:
   9        make -C ${TOPDIR}/drivers/sound mkscript
  10        @echo
  11
  12# There is probably a better way to decide when to rebuild kconfig.tk; this
  13# one won't catch every last change to the various Config.in files.  However,
  14# the reliance on ${TOPDIR}/Makefile makes sure we at least rebuild when the
  15# kernel version number changes.
  16#
  17kconfig.tk: soundscript ${TOPDIR}/Makefile ${TOPDIR}/arch/${ARCH}/config.in \
  18                tkparse ${HEADER} ${TAIL}
  19        ./tkparse < ../arch/${ARCH}/config.in  > kconfig.tmp
  20        @if [ -f /usr/local/bin/wish ]; then \
  21                echo '#!'"/usr/local/bin/wish -f" > kconfig.tk; \
  22        else \
  23                echo '#!'"/usr/bin/wish -f" > kconfig.tk; \
  24        fi
  25        cat ${HEADER} >> ./kconfig.tk
  26        cat kconfig.tmp >> kconfig.tk
  27        rm -f kconfig.tmp
  28        echo "set defaults \"arch/${ARCH}/defconfig\"" >> kconfig.tk
  29        cat ${TAIL} >> kconfig.tk
  30        chmod 755 kconfig.tk
  31
  32tkparse: tkparse.o tkcond.o tkgen.o
  33        ${HOSTCC} -o tkparse tkparse.o tkcond.o tkgen.o
  34
  35tkparse.o: tkparse.c tkparse.h
  36        $(HOSTCC) $(HOSTCFLAGS) -c -o tkparse.o tkparse.c
  37
  38tkcond.o: tkcond.c tkparse.h
  39        $(HOSTCC) $(HOSTCFLAGS) -c -o tkcond.o tkcond.c
  40
  41tkgen.o: tkgen.c tkparse.h
  42        $(HOSTCC) $(HOSTCFLAGS) -c -o tkgen.o tkgen.c
  43
  44clean:
  45        rm -f *~ kconfig.tk *.o tkparse
  46
  47include $(TOPDIR)/Rules.make
  48
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.