Separate LDFLAGS from LIBS for real.
[vlc.git] / activex / Makefile.am
1 ###############################################################################
2 # Building the Activex plugin
3 ###############################################################################
4
5 MOSTLYCLEANFILES = 
6 EXTRA_DIST = $(SOURCES_activex) $(DIST_rsrc) $(DIST_misc)
7 BUILT_SOURCES = $(BUILT_SOURCES_activex)
8
9 SOURCES_activex = \
10     main.cpp \
11     utils.cpp \
12     utils.h \
13     olecontrol.cpp \
14     olecontrol.h \
15     oleinplaceactiveobject.cpp \
16     oleinplaceactiveobject.h \
17     oleinplaceobject.cpp \
18     oleinplaceobject.h \
19     oleobject.cpp \
20     oleobject.h \
21     persistpropbag.cpp \
22     persistpropbag.h \
23     persiststorage.cpp \
24     persiststorage.h \
25     persiststreaminit.cpp \
26     persiststreaminit.h \
27     provideclassinfo.cpp \
28     provideclassinfo.h \
29     connectioncontainer.cpp \
30     connectioncontainer.h \
31     objectsafety.cpp \
32     objectsafety.h \
33     dataobject.cpp \
34     dataobject.h \
35     viewobject.cpp \
36     viewobject.h \
37     supporterrorinfo.cpp \
38     supporterrorinfo.h \
39     vlccontrol.cpp \
40     vlccontrol.h \
41     vlccontrol2.cpp \
42     vlccontrol2.h \
43     plugin.cpp \
44     plugin.h \
45     axvlc_idl.c \
46     axvlc_idl.h \
47     guiddef.h \
48     $(NULL)
49
50 DIST_rsrc = \
51     axvlc_rc.rc \
52     $(NULL)
53
54 DIST_misc = \
55     README.TXT \
56     axvlc.inf.in \
57     axvlc.def \
58     axvlc.idl \
59     axvlc.tlb \
60     inplace.bmp \
61     vlc16x16.bmp \
62     test.html \
63     $(NULL)
64
65 if BUILD_ACTIVEX
66
67 lib_LTLIBRARIES = axvlc.la
68
69 LIBRARIES_libvlc = $(top_builddir)/src/libvlc-control.la \
70                                    $(top_builddir)/src/libvlc.la
71
72 axvlc_la_SOURCES = $(SOURCES_activex)
73 axvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags activex`
74 axvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
75 axvlc_la_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc)
76 axvlc_la_LDFLAGS = $(srcdir)/axvlc.def -Wl,$(DATA_axvlc_rc) \
77     -no-undefined -avoid-version -module \
78     `$(VLC_CONFIG) --ldflags activex libvlc`
79 axvlc_la_LIBADD = $(LIBRARIES_libvlc) \
80         `$(VLC_CONFIG) -libs activex`
81
82 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
83 noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
84 noinst_axvlc_rcdir = 
85 axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb
86         $(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 $@
87
88 DATA_axvlc_tlb = $(axvlc_tlb_DATA)
89 noinst_axvlc_tlb_DATA = axvlc.tlb
90 noinst_axvlc_tlbdir = $(libdir)
91
92 if HAS_MIDL_COMPILER
93
94 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
95         $(MIDL) -Oicf -error all -env win32 -tlb axvlc.tlb -iid axvlc_idl.c -h axvlc_idl.h axvlc.idl
96
97 clean-tlb:
98         rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
99
100 else
101 if HAS_WIDL_COMPILER
102
103 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
104         $(WIDL) -I$(WINE_SDK_PATH)/include -tuh -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h axvlc.idl
105
106 clean-tlb:
107         rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
108
109 else
110
111 clean-tlb:
112
113 endif
114 endif
115
116 else
117
118 clean-tlb:
119
120 endif
121
122 ###############################################################################
123 # Clean rules
124 ###############################################################################
125
126 clean-local: clean-tlb
127
128 ###############################################################################
129 # Force rules
130 ###############################################################################
131