Show
Ignore:
Timestamp:
11/03/98 02:32:55 (15 years ago)
Author:
frodo
Message:

Introduced automatic dependencies within Makefiles.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/Makefile

    r4 r5  
    6363.PHONY: all clean install version package 
    6464 
     65# Make all the default rule 
     66all:: 
     67 
    6568# Include all makefiles for sub-modules 
    6669include $(patsubst %,%/Module.mk,$(MODULES)) 
     
    7376clean:: 
    7477        $(RM) lm_sensors-* 
     78 
     79# Create a dependency file. Tricky. 
     80%.d: %.c 
     81        gcc -M -MG $(CFLAGS) $< | \ 
     82        sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@ 
     83         
    7584 
    7685# This is tricky, but it works like a charm. It needs lots of utilities