Makefile.modules 1.29 KB
Newer Older
Sam Hocevar's avatar
 
Sam Hocevar committed
1 2 3 4 5 6 7
###############################################################################
# vlc (VideoLAN Client) common module Makefile
# (c)2001 VideoLAN
###############################################################################
# This file should be included by all module Makefiles
###############################################################################

Sam Hocevar's avatar
 
Sam Hocevar committed
8 9 10 11 12 13 14 15
#
# C headers directories
#
CFLAGS := -I../../include -I../../extras $(CFLAGS)

# 
# Standard dependencies
#
Sam Hocevar's avatar
 
Sam Hocevar committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
C_DEP := $(ALL_OBJ:%.o=.dep/%.d)

CPP_DEP := $(ALL_OBJ:%.o=.dep/%.dpp)

export

#
# Virtual targets
#
all:

clean:
	rm -f $(ALL_OBJ)
	rm -f *.o *.moc *.bak *.builtin
	rm -rf .dep

FORCE:

$(ALL_OBJ): %.o: ../../Makefile.modules ../../Makefile.dep Makefile

$(C_DEP): %.d: FORCE
	@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@

$(CPP_DEP): %.dpp: FORCE
	@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@

$(PLUGIN_C): %.o: .dep/%.d
$(PLUGIN_C): %.o: %.c
Sam Hocevar's avatar
 
Sam Hocevar committed
44
	$(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
Sam Hocevar's avatar
 
Sam Hocevar committed
45 46 47 48 49 50 51

$(BUILTIN_C): BUILTIN_%.o: .dep/%.d
$(BUILTIN_C): BUILTIN_%.o: %.c
	$(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<

$(PLUGIN_CPP): %.o: .dep/%.dpp
$(PLUGIN_CPP): %.o: %.cpp
Sam Hocevar's avatar
 
Sam Hocevar committed
52
	$(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
Sam Hocevar's avatar
 
Sam Hocevar committed
53 54 55 56 57 58

$(BUILTIN_CPP): BUILTIN_%.o: .dep/%.dpp
$(BUILTIN_CPP): BUILTIN_%.o: %.cpp
	$(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<