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