]> git.sesse.net Git - vlc/blob - activex/Makefile.am
- Fix building axvlc from subdirectory
[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) \
75         -Wl,--enable-stdcall-fixup $(srcdir)/axvlc.def \
76           $(LIBRARIES_libvlc) -shared $(LDFLAGS_activex)
77
78
79 DATA_axvlc_tlb = $(axvlc_tlb_DATA)
80 noinst_axvlc_tlb_DATA = axvlc.tlb
81 noinst_axvlc_tlbdir = $(libdir)
82
83 if HAS_MIDL_COMPILER
84
85 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
86         $(MIDL) -Oicf -error all -env win32 -tlb axvlc.tlb -iid axvlc_idl.c -h axvlc_idl.h axvlc.idl
87
88 clean-tlb:
89         -rm axvlc.tlb axvlc_idl.c axvlc_idl.h
90
91 else
92
93 clean-tlb:
94
95 endif
96
97 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
98 noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
99 noinst_axvlc_rcdir = $(libdir)
100 axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb
101         $(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 $@
102
103 else
104
105 clean-tlb:
106
107 endif
108
109 ###############################################################################
110 # Stamp rules
111 ###############################################################################
112
113 clean-stamp:
114         rm -f stamp-pic
115
116 stamp-pic: FORCE
117         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
118           if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \
119             rm -f $@; \
120             break; \
121           fi; \
122         done
123         @if test ! -f $@; then printf "" > $@; fi
124
125 ###############################################################################
126 # Clean rules
127 ###############################################################################
128
129 clean-local: clean-stamp clean-tlb
130         -rm axvlc$(LIBEXT)
131
132 ###############################################################################
133 # Force rule
134 ###############################################################################
135 FORCE:
136