2 MODULE
= libwine.
$(LIBEXT
)
3 VERSCRIPT
= $(srcdir)/wine.map
4 EXTRALIBS
= $(LIBPORT
) @LIBDL@ @CRTLIBS@ @COREFOUNDATIONLIB@
5 DEFS
= -D__WINESRC__
-DWINE_UNICODE_API
=""
9 SONAME
= libwine.so.
$(SOVERSION
)
10 DYNAME
= libwine.
$(SOVERSION
).dylib
12 INSTALLDIRS
= $(DESTDIR
)$(libdir)
95 EXTRA_OBJS
= version.o
97 all: $(MODULE
) $(MODULE
:.dll
=.a
)
101 # Special defines needed for config.c
104 -DBINDIR
='"$(bindir)"' \
105 -DDLLDIR
='"$(dlldir)"' \
106 -DLIB_TO_BINDIR
=\"`$(RELPATH) $(libdir) $(bindir)`\" \
107 -DLIB_TO_DLLDIR
=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
108 -DBIN_TO_DLLDIR
=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
109 -DBIN_TO_DATADIR
=\"`$(RELPATH) $(bindir) $(datadir)/wine`\"
111 config.o
: config.c
$(RELPATH
)
112 $(CC
) -c
$(ALLCFLAGS
) -o
$@
$(srcdir)/config.c
$(CONFIGDIRS
)
116 libwine.so.
$(VERSION
): $(OBJS
) $(VERSCRIPT
) Makefile.in
117 $(LDSHARED
) $(OBJS
) $(EXTRALIBS
) $(LDFLAGS
) $(LIBS
) -o
$@
119 libwine.so.
$(SOVERSION
): libwine.so.
$(VERSION
)
120 $(RM
) $@
&& $(LN_S
) libwine.so.
$(VERSION
) $@
122 libwine.so
: libwine.so.
$(SOVERSION
)
123 $(RM
) $@
&& $(LN_S
) libwine.so.
$(SOVERSION
) $@
126 $(DLLTOOL
) -l
$@
-d
$(srcdir)/wine.def
128 libwine.dll
: $(OBJS
) wine.def Makefile.in
129 $(DLLWRAP
) --def
$(srcdir)/wine.def
-o
$@
$(OBJS
) $(EXTRALIBS
)
131 DYLIB_LDFLAGS
= -compatibility_version
$(SOVERSION
) -current_version
$(VERSION
) -Wl
,-headerpad_max_install_names
133 libwine.
$(VERSION
).dylib
: $(OBJS
) $(RELPATH
) Makefile.in
134 $(LDSHARED
) -install_name
$(libdir)/$(DYNAME
) $(DYLIB_LDFLAGS
) $(OBJS
) $(EXTRALIBS
) $(LDFLAGS
) $(LIBS
) -o
$@
136 libwine.
$(SOVERSION
).dylib
: libwine.
$(VERSION
).dylib
137 cp
-p libwine.
$(VERSION
).dylib
$@
&& install_name_tool
-id @executable_path
/`$(RELPATH) $(bindir) $(libdir)`/$(DYNAME
) $@ ||
$(RM
) $@
139 libwine.dylib
: libwine.
$(SOVERSION
).dylib
140 $(RM
) $@
&& $(LN_S
) libwine.
$(SOVERSION
).dylib
$@
144 .PHONY
: install-lib-so install-lib-dll install-lib-dylib install-dev-so install-dev-dll install-dev-dylib
146 install-lib-so
: libwine.so.
$(VERSION
) $(DESTDIR
)$(libdir) dummy
147 $(INSTALL_PROGRAM
) libwine.so.
$(VERSION
) $(DESTDIR
)$(libdir)/libwine.so.
$(VERSION
)
148 cd
$(DESTDIR
)$(libdir) && $(RM
) libwine.so.
$(SOVERSION
) && $(LN_S
) libwine.so.
$(VERSION
) libwine.so.
$(SOVERSION
)
150 install-lib-dll
: libwine.dll
$(DESTDIR
)$(libdir) dummy
151 $(INSTALL_DATA
) libwine.dll
$(DESTDIR
)$(libdir)/libwine.dll
153 install-lib-dylib
: libwine.
$(VERSION
).dylib
$(DESTDIR
)$(libdir) dummy
154 $(INSTALL_PROGRAM
) libwine.
$(VERSION
).dylib
$(DESTDIR
)$(libdir)/libwine.
$(VERSION
).dylib
155 cd
$(DESTDIR
)$(libdir) && $(RM
) libwine.
$(SOVERSION
).dylib
&& $(LN_S
) libwine.
$(VERSION
).dylib libwine.
$(SOVERSION
).dylib
157 install-dev-so
: $(DESTDIR
)$(libdir) dummy
158 cd
$(DESTDIR
)$(libdir) && $(RM
) libwine.so
&& $(LN_S
) libwine.so.
$(VERSION
) libwine.so
160 install-dev-dll
: libwine.a
$(DESTDIR
)$(libdir) dummy
161 $(INSTALL_DATA
) libwine.a
$(DESTDIR
)$(libdir)/libwine.a
163 install-dev-dylib
: $(DESTDIR
)$(libdir) dummy
164 cd
$(DESTDIR
)$(libdir) && $(RM
) libwine.dylib
&& $(LN_S
) libwine.
$(VERSION
).dylib libwine.dylib
166 install install-lib
:: $(LIBEXT
:%=install-lib-
%)
167 install install-dev
:: $(LIBEXT
:%=install-dev-
%)
170 -cd
$(DESTDIR
)$(libdir) && $(RM
) libwine.a libwine.dll libwine.so libwine.so.
$(VERSION
) \
171 libwine.so.
$(SOVERSION
) libwine.dylib libwine.
$(VERSION
).dylib libwine.
$(SOVERSION
).dylib
174 version
=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo
$$version | cmp
-s
- $@
) || echo
$$version >$@ ||
($(RM
) $@
&& exit
1)
177 $(RM
) libwine.so.
$(SOVERSION
) libwine.so.
$(VERSION
) version.c
180 @cd
$(TOOLSDIR
)/tools
&& $(MAKE
) relpath
$(TOOLSEXT
)