]> git.sesse.net Git - vlc/blob - Makefile.modules
31ac491e03bd5e1ffdf5217e4469a4bb222791ed
[vlc] / Makefile.modules
1 ###############################################################################
2 # vlc (VideoLAN Client) common module Makefile
3 # (c)2001 VideoLAN
4 ###############################################################################
5 # This file should be included by all module Makefiles
6 ###############################################################################
7
8 #
9 # C headers directories
10 #
11 CFLAGS := -I../../include -I../../extras $(CFLAGS)
12
13 #
14 # C compiler flags: plugin compilation
15 #
16 PCFLAGS += -fPIC
17
18 #
19 # C compiler flags: plugin linking
20 #
21 ifneq (,$(findstring darwin,$(SYS)))
22 PLCFLAGS += -bundle -undefined suppress
23 else
24 ifeq ($(SYS),beos)
25 PLCFLAGS += -nostart ../../lib/_APP_
26 else
27 PLCFLAGS += -shared
28 endif
29 endif
30
31
32 # Standard dependencies
33 #
34 C_DEP := $(ALL_OBJ:%.o=.dep/%.d)
35
36 CPP_DEP := $(ALL_OBJ:%.o=.dep/%.dpp)
37
38 export
39
40 #
41 # Virtual targets
42 #
43 all:
44
45 clean:
46         rm -f $(ALL_OBJ)
47         rm -f *.o *.moc *.bak *.builtin
48         rm -rf .dep
49
50 FORCE:
51
52 $(ALL_OBJ): %.o: ../../Makefile.modules ../../Makefile.dep Makefile
53
54 $(C_DEP): %.d: FORCE
55         @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
56
57 $(CPP_DEP): %.dpp: FORCE
58         @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
59
60 $(PLUGIN_C): %.o: .dep/%.d
61 $(PLUGIN_C): %.o: %.c
62         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
63
64 $(BUILTIN_C): BUILTIN_%.o: .dep/%.d
65 $(BUILTIN_C): BUILTIN_%.o: %.c
66         $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
67
68 $(PLUGIN_CPP): %.o: .dep/%.dpp
69 $(PLUGIN_CPP): %.o: %.cpp
70         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
71
72 $(BUILTIN_CPP): BUILTIN_%.o: .dep/%.dpp
73 $(BUILTIN_CPP): BUILTIN_%.o: %.cpp
74         $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
75
76