1 ################################################################################
2 # vlc (VideoLAN Client) dependancies makefile
4 ################################################################################
5 # This Makefile is dedicated to build of .d files. It should not be called
6 # directly by user, but only through main Makefile.
7 # See notes at the end of the main makefile for explanations.
8 ################################################################################
10 # All settings and options are passed through main Makefile
12 ################################################################################
14 ################################################################################
17 @echo "This Makefile should not be called directly,"
18 @echo "see notes at end of main Makefile."
20 ################################################################################
21 # Dependancies creation
22 ################################################################################
24 # A dependancies file needs to be rebuilt if the .c changed or if one of the
25 # dependancies files have been changed. In other words, it depends from the
28 -include $(MAKECMDGOALS)
29 $(dependancies): .dep/%.d: %.c
30 @test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
31 #@echo "generating dependancies for $*.c"
32 @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) $< \
33 | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
34 .dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
35 [ -s $@ ] || rm -f $@'