libwine: Don't export the selector functions for the Windows build.
[wine] / libs / wine / Makefile.in
1 TOPSRCDIR = @top_srcdir@
2 TOPOBJDIR = ../..
3 SRCDIR    = @srcdir@
4 VPATH     = @srcdir@
5 DLLFLAGS  = @DLLFLAGS@
6 LIBEXT    = @LIBEXT@
7 MODULE    = libwine.$(LIBEXT)
8 VERSCRIPT = $(SRCDIR)/wine.map
9 EXTRALIBS = $(LIBPORT) @LIBDL@ @CRTLIBS@
10 DEFS      = -D__WINESRC__ -DWINE_UNICODE_API=""
11
12 VERSION   = 1.0
13 SOVERSION = 1
14 SONAME    = libwine.so.$(SOVERSION)
15 DYNAME    = libwine.$(SOVERSION).dylib
16
17 INSTALLDIRS = $(DESTDIR)$(libdir)
18
19 C_SRCS = \
20         casemap.c \
21         collation.c \
22         compose.c \
23         config.c \
24         cptable.c \
25         debug.c \
26         fold.c \
27         ldt.c \
28         loader.c \
29         mbtowc.c \
30         mmap.c \
31         port.c \
32         sortkey.c \
33         string.c \
34         utf8.c \
35         wctomb.c \
36         wctype.c \
37         c_037.c \
38         c_424.c \
39         c_437.c \
40         c_500.c \
41         c_737.c \
42         c_775.c \
43         c_850.c \
44         c_852.c \
45         c_855.c \
46         c_856.c \
47         c_857.c \
48         c_860.c \
49         c_861.c \
50         c_862.c \
51         c_863.c \
52         c_864.c \
53         c_865.c \
54         c_866.c \
55         c_869.c \
56         c_874.c \
57         c_875.c \
58         c_878.c \
59         c_932.c \
60         c_936.c \
61         c_949.c \
62         c_950.c \
63         c_1006.c \
64         c_1026.c \
65         c_1250.c \
66         c_1251.c \
67         c_1252.c \
68         c_1253.c \
69         c_1254.c \
70         c_1255.c \
71         c_1256.c \
72         c_1257.c \
73         c_1258.c \
74         c_1361.c \
75         c_10000.c \
76         c_10006.c \
77         c_10007.c \
78         c_10029.c \
79         c_10079.c \
80         c_10081.c \
81         c_20127.c \
82         c_20866.c \
83         c_20932.c \
84         c_21866.c \
85         c_28591.c \
86         c_28592.c \
87         c_28593.c \
88         c_28594.c \
89         c_28595.c \
90         c_28596.c \
91         c_28597.c \
92         c_28598.c \
93         c_28599.c \
94         c_28600.c \
95         c_28603.c \
96         c_28604.c \
97         c_28605.c \
98         c_28606.c
99
100 EXTRA_OBJS = version.o
101
102 all: $(MODULE) $(MODULE:.dll=.a)
103
104 @MAKE_RULES@
105
106 # Special defines needed for config.c
107
108 CONFIGDIRS = \
109         -DBINDIR='"$(bindir)"' \
110         -DDLLDIR='"$(dlldir)"' \
111         -DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(bindir)`\" \
112         -DLIB_TO_DLLDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
113         -DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
114         -DLIB_TO_DATADIR=\"`$(RELPATH) $(libdir) $(datadir)/wine`\" \
115         -DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine`\"
116
117 config.o: config.c $(RELPATH)
118         $(CC) -c $(ALLCFLAGS) -o $@ $(SRCDIR)/config.c $(CONFIGDIRS)
119
120 # Linking rules
121
122 libwine.so.$(VERSION): $(OBJS) $(VERSCRIPT) Makefile.in
123         $(LDSHARED) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@
124
125 libwine.so.$(SOVERSION): libwine.so.$(VERSION)
126         $(RM) $@ && $(LN_S) libwine.so.$(VERSION) $@
127
128 libwine.so: libwine.so.$(SOVERSION)
129         $(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
130
131 libwine.a: wine.def
132         $(DLLTOOL) -l $@ -d $(SRCDIR)/wine.def
133
134 libwine.dll: $(OBJS) wine.def Makefile.in
135         $(DLLWRAP) --def $(SRCDIR)/wine.def -o $@ $(OBJS) $(EXTRALIBS)
136
137 DYLIB_LDFLAGS = -compatibility_version $(SOVERSION) -current_version $(VERSION)
138
139 libwine.$(VERSION).dylib: $(OBJS) $(RELPATH) Makefile.in
140         $(LDSHARED) -install_name $(libdir)/$(DYNAME) $(DYLIB_LDFLAGS) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@
141
142 libwine.$(SOVERSION).dylib: libwine.$(VERSION).dylib
143         cp -p libwine.$(VERSION).dylib $@ && install_name_tool -id @executable_path/`$(RELPATH) $(bindir) $(libdir)`/$(DYNAME) $@ || $(RM) $@
144
145 libwine.dylib: libwine.$(SOVERSION).dylib
146         $(RM) $@ && $(LN_S) libwine.$(SOVERSION).dylib $@
147
148 # Install rules
149
150 .PHONY: install-lib-so install-lib-dll install-lib-dylib install-dev-so install-dev-dll install-dev-dylib
151
152 install-lib-so: libwine.so.$(VERSION) $(DESTDIR)$(libdir) dummy
153         $(INSTALL_PROGRAM) libwine.so.$(VERSION) $(DESTDIR)$(libdir)/libwine.so.$(VERSION)
154         cd $(DESTDIR)$(libdir) && $(RM) libwine.so.$(SOVERSION) && $(LN_S) libwine.so.$(VERSION) libwine.so.$(SOVERSION)
155
156 install-lib-dll: libwine.dll $(DESTDIR)$(libdir) dummy
157         $(INSTALL_DATA) libwine.dll $(DESTDIR)$(libdir)/libwine.dll
158
159 install-lib-dylib: libwine.$(VERSION).dylib $(DESTDIR)$(libdir) dummy
160         $(INSTALL_PROGRAM) libwine.$(VERSION).dylib $(DESTDIR)$(libdir)/libwine.$(VERSION).dylib
161         cd $(DESTDIR)$(libdir) && $(RM) libwine.$(SOVERSION).dylib && $(LN_S) libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib
162
163 install-dev-so: $(DESTDIR)$(libdir) dummy
164         cd $(DESTDIR)$(libdir) && $(RM) libwine.so && $(LN_S) libwine.so.$(VERSION) libwine.so
165
166 install-dev-dll: libwine.a $(DESTDIR)$(libdir) dummy
167         $(INSTALL_DATA) libwine.a $(DESTDIR)$(libdir)/libwine.a
168
169 install-dev-dylib: $(DESTDIR)$(libdir) dummy
170         cd $(DESTDIR)$(libdir) && $(RM) libwine.dylib && $(LN_S) libwine.$(VERSION).dylib libwine.dylib
171
172 install install-lib:: $(LIBEXT:%=install-lib-%)
173 install install-dev:: $(LIBEXT:%=install-dev-%)
174
175 uninstall::
176         -cd $(DESTDIR)$(libdir) && $(RM) libwine.a libwine.dll libwine.so libwine.so.$(VERSION) \
177                 libwine.so.$(SOVERSION) libwine.dylib libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib
178
179 version-stamp: dummy
180         (GIT_DIR=$(TOPSRCDIR)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p' >$@ || ($(RM) $@ && exit 1)
181
182 version.c: version-stamp
183         @cmp -s version-stamp $@ || cp version-stamp $@
184
185 clean::
186         $(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION) version.c version-stamp
187
188 $(RELPATH):
189         @cd $(TOOLSDIR)/tools && $(MAKE) relpath
190
191 @DEPENDENCIES@  # everything below this line is overwritten by make depend