2003-04-27 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / makefile
1 VERSION=0.23.99
2 DIST=monocharge-`date -u +%Y%m%d`
3
4 DIRS=jay nant mcs class nunit20 monoresgen tools mbas ilasm
5 INSTALL= /usr/bin/install
6
7 all: 
8         if test x$(OS) = xWindows_NT; then make windows; else make -f makefile.gnu; fi
9
10 install:
11         if test x$(OS) = xWindows_NT; then make windowsinstall; else make -f makefile.gnu install; fi
12
13 windows:
14         for i in $(DIRS); do                    \
15                 (cd $$i; make windows) || exit 1;       \
16         done
17
18 linux:
19         for i in $(DIRS); do                    \
20                 (cd $$i; make linux) || exit 1; \
21         done
22
23 test:
24         if test x$(OS) = xWindows_NT; then make testwindows; else make -f makefile.gnu test; fi
25
26 testcorlib:
27         if test x$(OS) = xWindows_NT; then make testcorlibwindows; else make -f makefile.gnu testcorlib; fi
28
29 testwindows:
30         $(MAKE) -C nunit20
31         $(MAKE) -C class test
32
33 testcorlibwindows:
34         $(MAKE) -C class testcorlib
35
36 clean:
37         if test x$(OS) = xWindows_NT; then make cleanwindows; else make cleanlinux; fi
38
39 cleanwindows:
40         for i in $(DIRS); do                    \
41                 (cd $$i; make clean)            \
42         done
43
44 cleanlinux:
45         for i in $(DIRS); do                    \
46                 (cd $$i; make -f makefile.gnu clean)            \
47         done
48
49 dist: 
50         (c=`pwd`; d=`basename $$c`; cd ..; cp -a $$d mcs-$(VERSION); cd mcs-$(VERSION); make clean; cd ..; \
51         tar czvf $$d/mcs-$(VERSION).tar.gz --exclude=CVS --exclude='.#*' --exclude=core --exclude='*~' --exclude='*.exe' mcs-$(VERSION); \
52         rm -rf mcs-$(VERSION))
53
54 binary-snapshot: all
55         mkdir $(DIST)
56         $(MAKE) install prefix=$(PWD)/$(DIST) || exit 1; \
57         tar -c $(DIST) | gzip > $(DIST).tar.gz
58         rm -rf $(DIST)
59
60 windowsinstall:
61         if test x$$prefix = x; then             \
62                 echo Usage is: make install prefix=X:/cygwin/home/MyHome/mono/install;  exit 1; \
63         fi
64         mkdir -p $(prefix)/bin/
65         for iexe in $(MONO_WIN_INSTALL_BIN) ; do                                        \
66                 echo Installing exe $$iexe;     \
67                 ($(INSTALL) -m 755 $$iexe $(prefix)/bin/) || exit 1;    \
68                 sed -e 's^\@bindir\@^$(prefix)^g' -e "s^\\@thewindowexe\\@^`basename \"$$iexe\"`^g" < ./winexe.in > ./winexe.tmp;       \
69                 mv ./winexe.tmp ./$$iexe.sh;    \
70                 ($(INSTALL) -m 755 $$iexe.sh $(prefix)/bin/) || exit 1;         \
71         done
72         mkdir -p $(prefix)/lib/
73         for idll in $(MONO_WIN_INSTALL_LIB) ; do                                \
74                 echo Installing dll $$idll;     \
75                 ($(INSTALL) -m 755 $$idll $(prefix)/lib/) || exit 1;    \
76         done
77
78 MONO_WIN_INSTALL_LIB=   \
79         class/lib/Accessibility.dll     \
80         class/lib/ICSharpCode.SharpZipLib.dll \
81         class/lib/ByteFX.Data.dll \
82         class/lib/I18N.CJK.dll  \
83         class/lib/I18N.MidEast.dll      \
84         class/lib/I18N.Other.dll        \
85         class/lib/I18N.Rare.dll \
86         class/lib/I18N.West.dll \
87         class/lib/I18N.dll      \
88         class/lib/Microsoft.VisualBasic.dll     \
89         class/lib/Microsoft.VisualC.dll \
90         class/lib/Mono.Data.dll \
91         class/lib/Mono.Data.DB2Client.dll       \
92         class/lib/Mono.Data.MySql.dll   \
93         class/lib/Mono.Data.PostgreSqlClient.dll        \
94         class/lib/Mono.Data.SqliteClient.dll    \
95         class/lib/Mono.Data.SybaseClient.dll    \
96         class/lib/Mono.Data.Tds.dll     \
97         class/lib/Mono.Data.TdsClient.dll       \
98         class/lib/Mono.Directory.LDAP.dll       \
99         class/lib/Mono.GetOptions.dll   \
100         class/lib/Mono.PEToolkit.dll    \
101         class/lib/Mono.Posix.dll        \
102         class/lib/Mono.Security.dll     \
103         class/lib/Mono.Security.Win32.dll       \
104         class/lib/Npgsql.dll    \
105         class/lib/PEAPI.dll     \
106         class/lib/System.Configuration.Install.dll      \
107         class/lib/System.Data.dll       \
108         class/lib/System.Data.OracleClient.dll  \
109         class/lib/System.Design.dll     \
110         class/lib/System.Drawing.dll    \
111         class/lib/System.EnterpriseServices.dll \
112         class/lib/System.Management.dll \
113         class/lib/System.Runtime.Remoting.dll   \
114         class/lib/System.Runtime.Serialization.Formatters.Soap.dll      \
115         class/lib/System.Security.dll   \
116         class/lib/System.ServiceProcess.dll     \
117         class/lib/System.Web.Services.dll       \
118         class/lib/System.Web.dll        \
119         class/lib/System.Windows.Forms.dll      \
120         class/lib/System.Xml.dll        \
121         class/lib/System.dll    \
122         class/lib/corlib.dll
123
124 MONO_WIN_INSTALL_BIN=   \
125         mcs/mcs.exe     \
126         mbas/mbas.exe   \
127         nant/NAnt.exe   \
128         ilasm/ilasm.exe \
129         monoresgen/monoresgen.exe       \
130         tools/EnumCheck.exe     \
131         tools/IFaceDisco.exe    \
132         tools/verifier.exe      \
133         tools/GenerateDelegate.exe      \
134         tools/monostyle.exe     \
135         tools/SqlSharp/sqlsharp.exe     \