1 TOPSRCDIR = @top_srcdir@
14 KTHREAD_OBJS = kthread.o main.o version.o
15 PTHREAD_OBJS = pthread.o main.o version.o
17 MAIN_BINARY = @MAIN_BINARY@
18 EXTRA_BINARIES = @EXTRA_BINARIES@
19 WINE_BINARIES = $(MAIN_BINARY) $(EXTRA_BINARIES)
30 INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
32 all: $(WINE_BINARIES) $(MODULE) $(MANPAGES)
36 LIBPTHREAD = @LIBPTHREAD@
37 LDEXECFLAGS = @LDEXECFLAGS@
39 wine-glibc: glibc.o Makefile.in
40 $(CC) -o $@ glibc.o $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
42 wine-preloader: preloader.o Makefile.in
43 $(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
45 wine-kthread: $(KTHREAD_OBJS) Makefile.in
46 $(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
48 wine-pthread: $(PTHREAD_OBJS) Makefile.in
49 $(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
51 $(MODULE): $(MAIN_BINARY)
52 $(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
54 install:: $(WINE_BINARIES) $(MANPAGES) $(INSTALLDIRS)
55 for f in $(WINE_BINARIES); do \
56 if [ "$(MAIN_BINARY)" = "$$f" ]; \
57 then $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir)/$(MODULE); \
58 else $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir)/$$f; \
61 $(INSTALL_DATA) wine.man $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
64 -cd $(DESTDIR)$(bindir) && $(RM) $(WINE_BINARIES) $(MODULE)
65 $(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
68 $(RM) version.c version-stamp
71 (GIT_DIR=$(TOPSRCDIR)/.git git-describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_version[] = "\1";/' >$@ || ($(RM) $@ && exit 1)
73 version.c: version-stamp
74 @cmp -s version-stamp $@ || cp version-stamp $@
76 @DEPENDENCIES@ # everything below this line is overwritten by make depend