makefiles: Use make dependencies to create installation directories.
[wine] / tools / winegcc / Makefile.in
1 DEFS = \
2         -DINCLUDEDIR="\"$(includedir)\"" \
3         -DDLLDIR="\"$(dlldir)\"" \
4         -DLIBDIR="\"$(libdir)\"" \
5         -DDLLFLAGS="\"@DLLFLAGS@\"" \
6         -DLDDLLFLAGS="\"@LDDLLFLAGS@\"" \
7         -DAS="\"$(AS)\"" \
8         -DCC="\"$(CC)\"" \
9         -DCPP="\"@CPPBIN@\"" \
10         -DCXX="\"$(CXX)\"" \
11         -DLD="\"$(LD)\"" \
12         -DPRELINK="\"$(PRELINK)\""
13
14 TOPSRCDIR = @top_srcdir@
15 TOPOBJDIR = ../..
16 SRCDIR    = @srcdir@
17 VPATH     = @srcdir@
18 EXEEXT    = @EXEEXT@
19 MODULE    = none
20
21 PROGRAMS = \
22         winecpp$(EXEEXT) \
23         winegcc$(EXEEXT) \
24         wineg++$(EXEEXT)
25
26 MANPAGES = winegcc.man
27
28 C_SRCS = \
29         utils.c \
30         winegcc.c
31
32 INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
33
34 all: $(PROGRAMS) $(MANPAGES)
35
36 @MAKE_RULES@
37
38 winegcc$(EXEEXT): winegcc.o utils.o
39         $(CC) $(CFLAGS) -o $@ winegcc.o utils.o $(LIBPORT) $(LDFLAGS)
40
41 winecpp$(EXEEXT) wineg++$(EXEEXT): winegcc$(EXEEXT)
42         $(RM) $@ && $(LN_S) winegcc$(EXEEXT) $@
43
44 install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS)
45         $(INSTALL_PROGRAM) winegcc$(EXEEXT) $(DESTDIR)$(bindir)/winegcc$(EXEEXT)
46         cd $(DESTDIR)$(bindir) && $(RM) wineg++$(EXEEXT) && $(LN_S) winegcc$(EXEEXT) wineg++$(EXEEXT)
47         cd $(DESTDIR)$(bindir) && $(RM) winecpp$(EXEEXT) && $(LN_S) winegcc$(EXEEXT) winecpp$(EXEEXT)
48         $(INSTALL_DATA) winegcc.man $(DESTDIR)$(mandir)/man$(prog_manext)/winegcc.$(prog_manext)
49         cd $(DESTDIR)$(mandir)/man$(prog_manext) && $(RM) wineg++.$(prog_manext) && $(LN_S) winegcc.$(prog_manext) wineg++.$(prog_manext)
50
51 uninstall::
52         $(RM) $(DESTDIR)$(bindir)/winegcc$(EXEEXT) $(DESTDIR)$(bindir)/wineg++$(EXEEXT) $(DESTDIR)$(bindir)/winecpp$(EXEEXT) \
53               $(DESTDIR)$(mandir)/man$(prog_manext)/winegcc.$(prog_manext) $(DESTDIR)$(mandir)/man$(prog_manext)/wineg++.$(prog_manext)
54
55 ### Dependencies: