1 TOPSRCDIR = @top_srcdir@
15 KTHREAD_OBJS = kthread.o main.o version.o
16 PTHREAD_OBJS = pthread.o main.o version.o
18 MAIN_BINARY = @MAIN_BINARY@
19 EXTRA_BINARIES = @EXTRA_BINARIES@
20 WINE_BINARIES = $(MAIN_BINARY) $(EXTRA_BINARIES)
25 wine-freebsd-installed \
27 wine-glibc-installed \
29 wine-kthread-installed \
31 wine-preloader-installed \
33 wine-pthread-installed
37 INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
39 all: $(WINE_BINARIES) $(WINE_BINARIES:%=%-installed) $(MODULE) $(MANPAGES)
43 LIBPTHREAD = @LIBPTHREAD@
44 LDEXECFLAGS = @LDEXECFLAGS@
46 wine-freebsd: freebsd.o Makefile.in
47 $(CC) -o $@ freebsd.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
49 wine-freebsd-installed: freebsd.o Makefile.in
50 $(CC) -o $@ freebsd.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
52 wine-glibc: glibc.o Makefile.in
53 $(CC) -o $@ glibc.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
55 wine-glibc-installed: glibc.o Makefile.in
56 $(CC) -o $@ glibc.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
58 wine-preloader wine-preloader-installed: preloader.o Makefile.in
59 $(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
61 wine-kthread: $(KTHREAD_OBJS) Makefile.in
62 $(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
64 wine-kthread-installed: $(KTHREAD_OBJS) Makefile.in
65 $(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
67 wine-pthread: $(PTHREAD_OBJS) Makefile.in
68 $(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
70 wine-pthread-installed: $(PTHREAD_OBJS) Makefile.in
71 $(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
73 $(MODULE): $(MAIN_BINARY)
74 $(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
76 install:: $(WINE_BINARIES:%=%-installed) $(MANPAGES) $(INSTALLDIRS)
77 for f in $(WINE_BINARIES); do \
78 if [ "$(MAIN_BINARY)" = "$$f" ]; \
79 then $(INSTALL_PROGRAM) $$f-installed $(DESTDIR)$(bindir)/$(MODULE); \
80 else $(INSTALL_PROGRAM) $$f-installed $(DESTDIR)$(bindir)/$$f; \
83 $(INSTALL_DATA) wine.man $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
86 -cd $(DESTDIR)$(bindir) && $(RM) $(WINE_BINARIES) $(MODULE)
87 $(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
90 $(RM) version.c version-stamp
93 (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)
95 version.c: version-stamp
96 @cmp -s version-stamp $@ || cp version-stamp $@
98 @DEPENDENCIES@ # everything below this line is overwritten by make depend