Fixed some handle type mismatches and added a few casts in prevision
[wine] / programs / Makefile.in
1 TOPSRCDIR = @top_srcdir@
2 TOPOBJDIR = ..
3 SRCDIR    = @srcdir@
4 VPATH     = @srcdir@
5 MODULE    = none
6
7 SUBDIRS = \
8         $(TOPOBJDIR)/debugger \
9         avitools \
10         clock \
11         cmdlgtst \
12         control \
13         expand \
14         notepad \
15         osversioncheck \
16         progman \
17         regapi \
18         regedit \
19         regsvr32 \
20         regtest \
21         uninstaller \
22         view \
23         wcmd \
24         wineconsole \
25         winefile \
26         winemine \
27         winepath \
28         winetest \
29         winhelp \
30         winver
31
32 # Sub-directories to run make install into
33 INSTALLSUBDIRS = $(SUBDIRS)
34
35 # Programs to install in bin directory
36 # We don't install everything to avoid polluting /usr/bin too much
37 INSTALLPROGS = \
38         notepad \
39         progman \
40         regedit \
41         regsvr32 \
42         uninstaller \
43         wcmd \
44         wineconsole \
45         winedbg \
46         winefile \
47         winemine \
48         winepath \
49         winhelp
50
51 # Symlinks to apps that we want to run from inside the source tree
52 SYMLINKS = \
53         wineconsole.exe \
54         winedbg.exe \
55         winetest.exe
56
57 @MAKE_RULES@
58
59 all: wineapploader winelauncher $(SUBDIRS) $(SYMLINKS:%=%$(DLLEXT))
60
61 wineapploader: wineapploader.in
62         sed -e 's,@bindir\@,$(bindir),g' $(SRCDIR)/wineapploader.in >$@ || $(RM) $@
63
64 winelauncher: winelauncher.in
65         sed -e 's,@bindir\@,$(bindir),g' -e 's,@libdir\@,$(libdir),g' -e 's,@dlldir\@,$(dlldir),g' $(SRCDIR)/winelauncher.in >$@ || $(RM) $@
66
67 # Rules for installation
68
69 .PHONY: install-apploader install-progs install-progs.so $(INSTALLPROGS:%=%/__installprog__)
70
71 install-apploader: wineapploader dummy
72         $(MKINSTALLDIRS) $(bindir)
73         $(INSTALL_SCRIPT) wineapploader $(bindir)/wineapploader
74
75 $(INSTALLPROGS:%=%/__installprog__): install-apploader
76         $(RM) $(bindir)/`dirname $@` && $(LN) $(bindir)/wineapploader $(bindir)/`dirname $@`
77
78 install-progs.so: $(INSTALLPROGS:%=%/__installprog__)
79         $(RM) $(bindir)/wineapploader
80
81 install-progs: # nothing to do here
82
83 install:: winelauncher install-progs$(DLLEXT)
84         $(MKINSTALLDIRS) $(bindir)
85         $(INSTALL_SCRIPT) winelauncher $(bindir)/winelauncher
86
87 uninstall::
88         $(RM) $(bindir)/wineapploader $(bindir)/winelauncher $(INSTALLPROGS:%=$(bindir)/%)
89         -rmdir $(dlldir)
90
91 clean::
92         $(RM) wineapploader winelauncher $(SYMLINKS)
93
94 # Rules for testing
95
96 $(SUBDIRS:%=%/__checklink__): dummy
97         @cd `dirname $@` && $(MAKE) checklink
98
99 checklink:: $(SUBDIRS:%=%/__checklink__)
100
101 check test:: $(SUBDIRS:%=%/__test__)
102
103 # Rules for symlinks
104
105 wineconsole.exe$(DLLEXT): wineconsole/wineconsole.exe$(DLLEXT)
106         $(RM) $@ && $(LN_S) wineconsole/wineconsole.exe$(DLLEXT) $@
107
108 winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT)
109         $(RM) $@ && $(LN_S) $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT) $@
110
111 winetest.exe$(DLLEXT): winetest/winetest.exe$(DLLEXT)
112         $(RM) $@ && $(LN_S) winetest/winetest.exe$(DLLEXT) $@
113
114 wineconsole/wineconsole.exe$(DLLEXT): wineconsole
115 $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger
116 winetest/winetest.exe$(DLLEXT): winetest
117
118 ### Dependencies: