home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / versions.mk < prev   
Encoding:
Text File  |  1995-01-23  |  714 b   |  29 lines

  1. ifdef CONFIG_MODVERSIONS
  2. TOPINCL := $(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.     $(CC) $(CFLAGS) -E -D__GENKSYMS__ $< | genksyms -w $(TOPINCL)/modules
  15.     @ln -sf $(TOPINCL)/modules/$@ .
  16.  
  17. $(SYMTAB_OBJS):
  18.     $(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c)
  19.  
  20. $(TOPINCL)/modversions.h: $(SYMTAB_OBJS:.o=.ver)
  21.     @echo updating $(TOPINCL)/modversions.h
  22.     @(cd $(TOPINCL)/modules; for f in *.ver;\
  23.     do echo "#include <linux/modules/$${f}>"; done) \
  24.     > $(TOPINCL)/modversions.h
  25.  
  26. dep: $(TOPINCL)/modversions.h
  27.  
  28. endif
  29.