]> git.sesse.net Git - vlc/blob - activex/Makefile.am
compilation fixes for MSVC
[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     viewobject.cpp \
36     viewobject.h \
37     vlccontrol.cpp \
38     vlccontrol.h \
39     plugin.cpp \
40     plugin.h \
41     axvlc_idl.c \
42     axvlc_idl.h \
43     $(NULL)
44
45 DIST_rsrc = \
46     axvlc_rc.rc \
47     $(NULL)
48
49 DIST_misc = \
50     README.TXT \
51     axvlc.def \
52     axvlc.idl \
53     axvlc.tlb \
54     inplace.bmp \
55     test.html \
56     $(NULL)
57
58 LIBRARIES_libvlc = $(top_builddir)/lib/libvlc.a
59
60 if BUILD_ACTIVEX
61
62 noinst_LIBRARIES_activex = libaxvlc.a
63 axvlc_DATA = axvlc$(LIBEXT)
64 axvlcdir = $(libdir)
65
66 LDFLAGS_activex = `$(VLC_CONFIG) --libs vlc activex builtin`
67
68 libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll)
69 libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex`
70 libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
71 libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc)
72
73 axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \
74                       $(libaxvlc_a_DEPENDENCIES) stamp-pic
75         $(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) \
76         -Wl,--enable-stdcall-fixup $(srcdir)/axvlc.def \
77           $(LIBRARIES_libvlc) -shared $(LDFLAGS_activex)
78
79
80 DATA_axvlc_tlb = $(axvlc_tlb_DATA)
81 noinst_axvlc_tlb_DATA = axvlc.tlb
82 noinst_axvlc_tlbdir = $(libdir)
83
84 if HAS_MIDL_COMPILER
85
86 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
87         $(MIDL) -Oicf -error all -env win32 -tlb axvlc.tlb -iid axvlc_idl.c -h axvlc_idl.h axvlc.idl
88
89 clean-tlb:
90         rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
91
92 else
93
94 clean-tlb:
95
96 endif
97
98 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
99 noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
100 noinst_axvlc_rcdir = $(libdir)
101 axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb
102         $(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 $@
103
104 else
105
106 clean-tlb:
107
108 endif
109
110 ###############################################################################
111 # Stamp rules
112 ###############################################################################
113
114 clean-stamp:
115         rm -f stamp-pic
116
117 stamp-pic: FORCE
118         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
119           if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \
120             rm -f $@; \
121             break; \
122           fi; \
123         done
124         @if test ! -f $@; then printf "" > $@; fi
125
126 ###############################################################################
127 # Clean rules
128 ###############################################################################
129
130 clean-local: clean-stamp clean-tlb
131         rm -f axvlc$(LIBEXT)
132
133 ###############################################################################
134 # Force rule
135 ###############################################################################
136 FORCE:
137