]> git.sesse.net Git - vlc/blob - activex/Makefile.am
d89eaf25af03bba1665ce4ae4c2ddd24604ccecf
[vlc] / activex / Makefile.am
1 ###############################################################################
2 # Building the Activex plugin
3 ###############################################################################
4
5 noinst_LIBRARIES = $(noinst_LIBRARIES_activex)
6
7 MOSTLYCLEANFILES = $(LIBRARIES_activex)
8 EXTRA_DIST = $(SOURCES_activex) $(DIST_rsrc) $(DIST_misc)
9 BUILT_SOURCES = $(BUILT_SOURCES_activex)
10
11 SOURCES_activex = \
12     main.cpp \
13     utils.cpp \
14     utils.h \
15     olecontrol.cpp \
16     olecontrol.h \
17     oleinplaceactiveobject.cpp \
18     oleinplaceactiveobject.h \
19     oleinplaceobject.cpp \
20     oleinplaceobject.h \
21     oleobject.cpp \
22     oleobject.h \
23     persistpropbag.cpp \
24     persistpropbag.h \
25     persiststorage.cpp \
26     persiststorage.h \
27     persiststreaminit.cpp \
28     persiststreaminit.h \
29     provideclassinfo.cpp \
30     provideclassinfo.h \
31     connectioncontainer.cpp \
32     connectioncontainer.h \
33     objectsafety.cpp \
34     objectsafety.h \
35     vlccontrol.cpp \
36     vlccontrol.h \
37     plugin.cpp \
38     plugin.h \
39     axvlc_idl.c \
40     axvlc_idl.h \
41         $(NULL)
42
43 DIST_rsrc = \
44         axvlc_rc.rc \
45         $(NULL)
46
47 DIST_misc = \
48         README.TXT \
49         axvlc.def \
50         axvlc.idl \
51         axvlc.reg \
52         axvlc.tlb \
53         inplace.bmp \
54         test.html \
55         $(NULL)
56
57 LIBRARIES_libvlc = $(top_builddir)/lib/libvlc.a
58
59 if BUILD_ACTIVEX
60
61 noinst_LIBRARIES_activex = libaxvlc.a
62 axvlc_DATA = axvlc$(LIBEXT)
63 axvlcdir = $(libdir)
64
65 LDFLAGS_activex = `$(VLC_CONFIG) --libs vlc activex builtin`
66
67 libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll)
68 libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex`
69 libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
70 libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc)
71
72 axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \
73                       $(libaxvlc_a_DEPENDENCIES) stamp-pic
74         $(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) -Wl,--enable-stdcall-fixup axvlc.def \
75           $(LIBRARIES_libvlc) -shared $(LDFLAGS_activex)
76
77
78 DATA_axvlc_tlb = $(axvlc_tlb_DATA)
79 noinst_axvlc_tlb_DATA = axvlc.tlb
80 noinst_axvlc_tlbdir = $(libdir)
81
82 if HAS_MIDL_COMPILER
83
84 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
85         $(MIDL) -Oicf -error all -env win32 -tlb axvlc.tlb -iid axvlc_idl.c -h axvlc_idl.h axvlc.idl
86
87 clean-tlb:
88         -rm axvlc.tlb axvlc_idl.c axvlc_idl.h
89
90 else
91
92 clean-tlb:
93
94 endif
95
96 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
97 noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
98 noinst_axvlc_rcdir = $(libdir)
99 axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp $(axvlc_tlb_DATA)
100         $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@
101
102 else
103
104 clean-tlb:
105
106 endif
107
108 ###############################################################################
109 # Stamp rules
110 ###############################################################################
111
112 clean-stamp:
113         rm -f stamp-pic
114
115 stamp-pic: FORCE
116         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
117           if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \
118             rm -f $@; \
119             break; \
120           fi; \
121         done
122         @if test ! -f $@; then printf "" > $@; fi
123
124 ###############################################################################
125 # Clean rules
126 ###############################################################################
127
128 clean-local: clean-stamp clean-tlb
129         -rm axvlc$(LIBEXT)
130
131 ###############################################################################
132 # Force rule
133 ###############################################################################
134 FORCE:
135