linux-old/versions.mk
<<
>>
Prefs
   1ifdef CONFIG_MODVERSIONS
   2TOPINCL := $(TOPDIR)/include/linux
   3
   4# Uses SYMTAB_OBJS
   5# Separate the object into "normal" objects and "exporting" objects
   6# Exporting objects are: all objects that define symbol tables
   7#
   8# Add dependence on $(SYMTAB_OBJS) to the main target
   9#
  10
  11.SUFFIXES: .ver
  12
  13.c.ver:
  14        @if [ ! -x /sbin/genksyms ]; then echo "Please read: README.modules"; fi
  15        $(CC) $(CFLAGS) -E -DCONFIG_MODVERSIONS -D__GENKSYMS__ $< | /sbin/genksyms -w $(TOPINCL)/modules
  16        @ln -sf $(TOPINCL)/modules/$@ .
  17
  18$(SYMTAB_OBJS):
  19        $(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c)
  20
  21$(SYMTAB_OBJS:.o=.ver): $(TOPINCL)/autoconf.h
  22
  23$(TOPINCL)/modversions.h: $(SYMTAB_OBJS:.o=.ver)
  24        @echo updating $(TOPINCL)/modversions.h
  25        @(cd $(TOPINCL)/modules; for f in *.ver;\
  26        do echo "#include <linux/modules/$${f}>"; done) \
  27        > $(TOPINCL)/modversions.h
  28
  29dep: $(TOPINCL)/modversions.h
  30
  31endif
  32
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.