]> git.llucax.com Git - software/druntime.git/blob - src/dmd-win32.mak
Changed D 2.0 runtime to account for 'this' being changed from a pointer to a referen...
[software/druntime.git] / src / dmd-win32.mak
1 # Makefile to build the composite D runtime library for Win32
2 # Designed to work with DigitalMars make
3 # Targets:
4 #   make
5 #       Same as make all
6 #   make lib
7 #       Build the runtime library
8 #   make doc
9 #       Generate documentation
10 #   make clean
11 #       Delete unneeded files created by build process
12
13 LIB_TARGET=druntime-dmd.lib
14 DUP_TARGET=druntime.lib
15 LIB_MASK=druntime*.lib
16
17 DIR_CC=common
18 DIR_RT=compiler\dmd
19 DIR_GC=gc\basic
20 DIR_GC_STUB=gc\stub
21
22 LIB_CC=$(DIR_CC)\druntime-core.lib
23 LIB_RT=$(DIR_RT)\druntime-rt-dmd.lib
24 LIB_GC=$(DIR_GC)\druntime-gc-basic.lib
25
26 CP=xcopy /y
27 RM=del /f
28 MD=mkdir
29
30 CC=dmc
31 LC=lib
32 DC=dmd
33
34 LIB_DEST=..\lib
35
36 ADD_CFLAGS=
37 ADD_DFLAGS=
38
39 targets : lib doc
40 all     : lib doc
41
42 ######################################################
43
44 ALL_OBJS=
45
46 ######################################################
47
48 ALL_DOCS=
49
50 ######################################################
51
52 lib : $(ALL_OBJS)
53         cd $(DIR_CC)
54         make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
55         cd ..
56         cd $(DIR_RT)
57         make -fwin32.mak lib DC=$(DC)
58         cd ..\..
59         cd $(DIR_GC)
60         make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
61         cd ..\..
62         cd $(DIR_GC_STUB)
63         make -fwin32.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
64         cd ..\..
65         $(RM) $(LIB_TARGET)
66         $(LC) -c -n $(LIB_TARGET) $(LIB_CC) $(LIB_RT) $(LIB_GC)
67         $(RM) $(DUP_TARGET)
68         copy $(LIB_TARGET) $(DUP_TARGET)
69
70
71 doc : $(ALL_DOCS)
72         cd $(DIR_CC)
73         make -fwin32.mak doc DC=$(DC)
74         cd ..
75         cd $(DIR_RT)
76         make -fwin32.mak doc DC=$(DC)
77         cd ..\..
78         cd $(DIR_GC)
79         make -fwin32.mak doc DC=$(DC)
80         cd ..\..
81         cd $(DIR_GC_STUB)
82         make -fwin32.mak doc DC=$(DC)
83         cd ..\..
84
85 ######################################################
86
87 clean :
88         $(RM) /s *.di
89         $(RM) $(ALL_OBJS)
90         $(RM) $(ALL_DOCS)
91         cd $(DIR_CC)
92         make -fwin32.mak clean
93         cd ..
94         cd $(DIR_RT)
95         make -fwin32.mak clean
96         cd ..\..
97         cd $(DIR_GC)
98         make -fwin32.mak clean
99         cd ..\..
100         cd $(DIR_GC_STUB)
101         make -fwin32.mak clean
102         cd ..\..
103         $(RM) $(LIB_MASK)
104
105 install :
106         cd $(DIR_CC)
107         make -fwin32.mak install
108         cd ..
109         cd $(DIR_RT)
110         make -fwin32.mak install
111         cd ..\..
112         cd $(DIR_GC)
113         make -fwin32.mak install
114         cd ..\..
115         cd $(DIR_GC_STUB)
116         make -fwin32.mak install
117         cd ..\..
118         $(CP) $(LIB_MASK) $(LIB_DEST)\.