Makefile.in 2.13 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR    = @srcdir@
VPATH     = @srcdir@
5
MODULE    = wine
Alexandre Julliard's avatar
Alexandre Julliard committed
6

Alexandre Julliard's avatar
Alexandre Julliard committed
7
C_SRCS = \
8
	glibc.c \
9 10
	kthread.c \
	main.c \
11
	preloader.c \
12
	pthread.c
Alexandre Julliard's avatar
Alexandre Julliard committed
13

14 15
KTHREAD_OBJS = kthread.o main.o version.o
PTHREAD_OBJS = pthread.o main.o version.o
16

17 18 19
MAIN_BINARY    = @MAIN_BINARY@
EXTRA_BINARIES = @EXTRA_BINARIES@
WINE_BINARIES  = $(MAIN_BINARY) $(EXTRA_BINARIES)
20

21 22 23 24 25 26 27
PROGRAMS = \
	wine \
	wine-glibc \
	wine-kthread \
	wine-preloader \
	wine-pthread\

28
MANPAGES = wine.man
29

30 31
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)

32
all: $(WINE_BINARIES) $(MODULE) $(MANPAGES)
Alexandre Julliard's avatar
Alexandre Julliard committed
33

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

36
LIBPTHREAD  = @LIBPTHREAD@
37
LDEXECFLAGS = @LDEXECFLAGS@
38

39
wine-glibc: glibc.o Makefile.in
40
	$(CC) -o $@ glibc.o $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
41 42

wine-preloader: preloader.o Makefile.in
43
	$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
44

45
wine-kthread: $(KTHREAD_OBJS) Makefile.in
46
	$(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
47 48

wine-pthread: $(PTHREAD_OBJS) Makefile.in
49
	$(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
50 51 52

$(MODULE): $(MAIN_BINARY)
	$(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
53

54
install:: $(WINE_BINARIES) $(MANPAGES) $(INSTALLDIRS)
55 56
	for f in $(WINE_BINARIES); do \
	  if [ "$(MAIN_BINARY)" = "$$f" ]; \
57 58
	  then $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir)/$(MODULE); \
	  else $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir)/$$f; \
59 60
	  fi; \
	done
61
	$(INSTALL_DATA) wine.man $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
62 63

uninstall::
64 65
	-cd $(DESTDIR)$(bindir) && $(RM) $(WINE_BINARIES) $(MODULE)
	$(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
66 67

clean::
68
	$(RM) version.c version-stamp
69 70

version-stamp: dummy
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)
72 73 74

version.c: version-stamp
	@cmp -s version-stamp $@ || cp version-stamp $@
75

76
@DEPENDENCIES@  # everything below this line is overwritten by make depend