makefiles: Use make dependencies to create installation directories.
[wine] / tools / wrc / Makefile.in
1 DEFS      = -DINCLUDEDIR="\"$(includedir)\""
2 TOPSRCDIR = @top_srcdir@
3 TOPOBJDIR = ../..
4 SRCDIR    = @srcdir@
5 VPATH     = @srcdir@
6 EXEEXT    = @EXEEXT@
7
8 PROGRAMS = wrc$(EXEEXT)
9 MANPAGES = wrc.man
10 MODULE   = none
11
12 C_SRCS = \
13         dumpres.c \
14         genres.c \
15         newstruc.c \
16         readres.c \
17         translation.c \
18         utils.c \
19         wrc.c \
20         writeres.c
21
22 EXTRA_SRCS = parser.y parser.l
23 EXTRA_OBJS = parser.tab.o @LEX_OUTPUT_ROOT@.o
24
25 INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
26
27 all: $(PROGRAMS) $(MANPAGES)
28
29 @MAKE_RULES@
30
31 wrc$(EXEEXT): $(OBJS) $(LIBWPP)
32         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBWINE) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
33
34 parser.tab.c parser.tab.h: parser.y
35         $(BISON) -d -t $(SRCDIR)/parser.y -o parser.tab.c
36
37 # hack to allow parallel make
38 parser.tab.h: parser.tab.c
39 parser.tab.o: parser.tab.h
40
41 @LEX_OUTPUT_ROOT@.c: parser.l
42         $(LEX) $(SRCDIR)/parser.l
43
44 @LEX_OUTPUT_ROOT@.o: parser.tab.h
45
46 install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS)
47         $(INSTALL_DATA) wrc.man $(DESTDIR)$(mandir)/man$(prog_manext)/wrc.$(prog_manext)
48         $(INSTALL_PROGRAM) wrc$(EXEEXT) $(DESTDIR)$(bindir)/wrc$(EXEEXT)
49
50 uninstall::
51         $(RM) $(DESTDIR)$(bindir)/wrc$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/wrc.$(prog_manext)
52
53 ### Dependencies: