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