Explicitly clean generated symlinks.
[wine] / programs / Makefile.in
1 TOPSRCDIR = @top_srcdir@
2 TOPOBJDIR = ..
3 SRCDIR    = @srcdir@
4 VPATH     = @srcdir@
5 MODULE    = none
6
7 SUBDIRS = \
8         avitools \
9         clock \
10         cmdlgtst \
11         control \
12         expand \
13         notepad \
14         osversioncheck \
15         progman \
16         regapi \
17         regedit \
18         regsvr32 \
19         regtest \
20         rpcss \
21         rundll32 \
22         start \
23         uninstaller \
24         view \
25         wcmd \
26         wineboot \
27         winecfg \
28         wineconsole \
29         winedbg \
30         winefile \
31         winemine \
32         winepath \
33         winevdm \
34         winhelp \
35         winver
36
37 # Sub-directories to run make install into
38 INSTALLSUBDIRS = \
39         avitools \
40         clock \
41         control \
42         expand \
43         notepad \
44         progman \
45         regedit \
46         regsvr32 \
47         rpcss \
48         rundll32 \
49         start \
50         uninstaller \
51         wcmd \
52         wineboot \
53         winecfg \
54         wineconsole \
55         winedbg \
56         winefile \
57         winemine \
58         winepath \
59         winevdm \
60         winhelp \
61         winver
62
63 # Programs to install in bin directory
64 # We don't install everything to avoid polluting /usr/bin too much
65 INSTALLPROGS = \
66         notepad \
67         progman \
68         regedit \
69         regsvr32 \
70         uninstaller \
71         wcmd \
72         wineboot \
73         winecfg \
74         wineconsole \
75         winedbg \
76         winefile \
77         winemine \
78         winepath \
79         winhelp
80
81 # Symlinks to apps that we want to run from inside the source tree
82 SYMLINKS = \
83         rpcss.exe \
84         wcmd.exe \
85         wineconsole.exe \
86         winedbg.exe \
87         winevdm.exe \
88         winhelp.exe
89
90 @MAKE_RULES@
91
92 all: wineapploader winelauncher $(SUBDIRS) $(SYMLINKS:%=%$(DLLEXT))
93
94 wineapploader: wineapploader.in
95         sed -e 's,@bindir\@,$(bindir),g' $(SRCDIR)/wineapploader.in >$@ || $(RM) $@
96
97 winelauncher: winelauncher.in
98         sed -e 's,@bindir\@,$(bindir),g' -e 's,@libdir\@,$(libdir),g' -e 's,@dlldir\@,$(dlldir),g' $(SRCDIR)/winelauncher.in >$@ || $(RM) $@
99
100 # Rules for installation
101
102 .PHONY: install-apploader install-progs install-progs.so $(INSTALLPROGS:%=%/__installprog__)
103
104 install-apploader: wineapploader dummy
105         $(MKINSTALLDIRS) $(bindir)
106         $(INSTALL_SCRIPT) wineapploader $(bindir)/wineapploader
107
108 $(INSTALLPROGS:%=%/__installprog__): install-apploader
109         $(RM) $(bindir)/`dirname $@` && $(LN) $(bindir)/wineapploader $(bindir)/`dirname $@`
110
111 install-progs.so: $(INSTALLPROGS:%=%/__installprog__)
112         $(RM) $(bindir)/wineapploader
113
114 install-progs: # nothing to do here
115
116 install:: winelauncher install-progs$(DLLEXT)
117         $(MKINSTALLDIRS) $(bindir)
118         $(INSTALL_SCRIPT) winelauncher $(bindir)/winelauncher
119
120 uninstall::
121         $(RM) $(bindir)/wineapploader $(bindir)/winelauncher $(INSTALLPROGS:%=$(bindir)/%)
122         -rmdir $(dlldir)
123
124 clean::
125         $(RM) wineapploader winelauncher $(SYMLINKS)
126
127 # Rules for testing
128
129 check test:: $(SUBDIRS:%=%/__test__)
130
131 # Rules for symlinks
132
133 rpcss.exe$(DLLEXT): rpcss/rpcss.exe$(DLLEXT)
134         $(RM) $@ && $(LN_S) rpcss/rpcss.exe$(DLLEXT) $@
135
136 wcmd.exe$(DLLEXT): wcmd/wcmd.exe$(DLLEXT)
137         $(RM) $@ && $(LN_S) wcmd/wcmd.exe$(DLLEXT) $@
138
139 wineconsole.exe$(DLLEXT): wineconsole/wineconsole.exe$(DLLEXT)
140         $(RM) $@ && $(LN_S) wineconsole/wineconsole.exe$(DLLEXT) $@
141
142 winedbg.exe$(DLLEXT): winedbg/winedbg.exe$(DLLEXT)
143         $(RM) $@ && $(LN_S) winedbg/winedbg.exe$(DLLEXT) $@
144
145 winevdm.exe$(DLLEXT): winevdm/winevdm.exe$(DLLEXT)
146         $(RM) $@ && $(LN_S) winevdm/winevdm.exe$(DLLEXT) $@
147
148 winhelp.exe$(DLLEXT): winhelp/winhelp.exe$(DLLEXT)
149         $(RM) $@ && $(LN_S) winhelp/winhelp.exe$(DLLEXT) $@
150
151 wcmd/wcmd.exe$(DLLEXT): wcmd
152 wineconsole/wineconsole.exe$(DLLEXT): wineconsole
153 winedbg/winedbg.exe$(DLLEXT): winedbg
154 winevdm/winevdm.exe$(DLLEXT): winevdm
155 winhelp/winhelp.exe$(DLLEXT): winhelp
156
157 ### Dependencies: