Makefile.in 2.11 KB
Newer Older
1
DEFS      = -D__WINESRC__ $(EXTRADEFS)
Alexandre Julliard's avatar
Alexandre Julliard committed
2

Alexandre Julliard's avatar
Alexandre Julliard committed
3
C_SRCS = \
4
	main.c \
5
	preloader.c
6

7
MAIN_BINARY    = @MAIN_BINARY@
8
EXTRA_BINARIES = @EXTRA_BINARIES@
9

10 11
PROGRAMS = \
	wine \
12
	wine-installed \
13 14 15
	wine-preloader \
	wine64 \
	wine64-preloader
16

17 18 19
MANPAGE = wine.man

EXTRA_MANPAGES = \
20
	wine.de.man \
21 22
	wine.fr.man \
	wine.pl.man
23

24 25 26
INSTALLDIRS = \
	$(DESTDIR)$(bindir) \
	$(DESTDIR)$(mandir)/man$(prog_manext) \
27
	$(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext) \
28 29
	$(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext) \
	$(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)
30

31
all: $(MAIN_BINARY) wine-installed $(EXTRA_BINARIES)
Alexandre Julliard's avatar
Alexandre Julliard committed
32

Alexandre Julliard's avatar
Alexandre Julliard committed
33
@MAKE_RULES@
Alexandre Julliard's avatar
Alexandre Julliard committed
34

35
LIBPTHREAD  = @LIBPTHREAD@
36
LDEXECFLAGS = @LDEXECFLAGS@
37

38 39
wine-preloader wine64-preloader: preloader.o Makefile.in
	$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 preloader.o $(LIBPORT) $(LDFLAGS)
40

41
$(MAIN_BINARY): main.o Makefile.in
42
	$(CC) -o $@ $(LDEXECFLAGS) main.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
43

44 45
wine-installed: main.o Makefile.in
	$(CC) -o $@ $(LDEXECFLAGS) main.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
46

47
$(EXTRA_BINARIES:%=__install__%): $(EXTRA_BINARIES) $(DESTDIR)$(bindir) dummy
48 49
	f=`expr $@ : '__install__\(.*\)'` && $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir)/$$f

50
.PHONY: install-man-pages $(EXTRA_BINARIES:%=__install__%)
51

52
install install-lib:: wine-installed $(DESTDIR)$(bindir) $(EXTRA_BINARIES:%=__install__%)
53
	$(INSTALL_PROGRAM) wine-installed $(DESTDIR)$(bindir)/$(MAIN_BINARY)
54

55
install-man-pages:: $(EXTRA_MANPAGES) $(INSTALLDIRS) dummy
56
	$(INSTALL_DATA) wine.de.man $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
57
	$(INSTALL_DATA) wine.fr.man $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
58
	$(INSTALL_DATA) wine.pl.man $(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)/wine.$(prog_manext)
59 60

uninstall::
61
	-cd $(DESTDIR)$(bindir) && $(RM) $(MAIN_BINARY) $(EXTRA_BINARIES)
62
	$(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
63
	$(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
64
	$(RM) $(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)/wine.$(prog_manext)