udpate rdoc.
[ruby-svn.git] / wince / setup.mak
blob96151c7da7e70848ecc75ff53569350721c8a32d
1 # -*- makefile -*-
3 !if "$(srcdir)" != ""
4 WIN32DIR = $(srcdir)/win32
5 !elseif "$(WIN32DIR)" == "win32"
6 srcdir = .
7 !elseif "$(WIN32DIR)" == "$(WIN32DIR:/win32=)/win32"
8 srcdir = $(WIN32DIR:/win32=)
9 !else
10 srcdir = $(WIN32DIR)/..
11 !endif
12 !ifndef prefix
13 prefix = /usr
14 !endif
15 OS = mswince
16 RT = msvcrt
17 INCLUDE = !include
18 APPEND = echo>>$(MAKEFILE)
19 !ifdef MAKEFILE
20 MAKE = $(MAKE) -f $(MAKEFILE)
21 !else
22 MAKEFILE = Makefile
23 !endif
24 ARCH = PROCESSOR_ARCHITECTURE
25 CPU = PROCESSOR_LEVEL
26 CPP = cl -nologo -EP
28 all: -prologue- -generic- -epilogue-
29 i386-$(OS): -prologue- -i386- -epilogue-
30 i486-$(OS): -prologue- -i486- -epilogue-
31 i586-$(OS): -prologue- -i586- -epilogue-
32 i686-$(OS): -prologue- -i686- -epilogue-
33 alpha-$(OS): -prologue- -alpha- -epilogue-
35 # CE
36 mips-hpc2k-wince: -prologue- -mips- -hpc2k- -epilogue-
37 mips-ppc-wince: -prologue- -mips- -ppc- -epilogue-
38 mips-hpcpro-wince: -prologue- -mips- -hpcpro- -epilogue-
39 arm-hpc2k-wince: -prologue- -arm- -hpc2k- -epilogue-
40 arm-ppc-wince: -prologue- -arm- -ppc- -epilogue-
41 arm-hpcpro-wince: -prologue- -arm- -hpcpro- -epilogue-
42 sh3-ppc-wince: -prologue- -sh3- -ppc- -epilogue-
43 sh3-hpcpro-wince: -prologue- -sh3- -hpcpro- -epilogue-
44 sh4-hpcpro-wince: -prologue- -sh4- -hpcpro- -epilogue-
45 armv4-.net41-wince: -prologue- -armv4- -.net41- -epilogue-
46 armv4t-.net41-wince: -prologue- -armv4t- -.net41- -epilogue-
47 armv4i-sig3-wince: -prologue- -armv4i- -sig3- -epilogue-
49 -prologue-: nul
50 @type << > $(MAKEFILE)
51 ### Makefile for ruby $(OS) ###
52 srcdir = $(srcdir:\=/)
53 prefix = $(prefix:\=/)
54 EXTSTATIC = $(EXTSTATIC)
55 !if defined(RDOCTARGET)
56 RDOCTARGET = $(RDOCTARGET)
57 !endif
58 !if defined(EXTOUT)
59 EXTOUT = $(EXTOUT)
60 !endif
61 !if defined(BASERUBY)
62 BASERUBY = $(BASERUBY)
63 !endif
65 @$(CPP) -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
66 #define RUBY_REVISION 0
67 #include "version.h"
68 MAJOR = RUBY_VERSION_MAJOR
69 MINOR = RUBY_VERSION_MINOR
70 TEENY = RUBY_VERSION_TEENY
71 MSC_VER = _MSC_VER
74 -generic-: nul
75 !if defined($(ARCH)) || defined($(CPU))
76 @type << >>$(MAKEFILE)
77 !if defined($(ARCH))
78 $(ARCH) = $(PROCESSOR_ARCHITECTURE)
79 !endif
80 !if defined($(CPU))
81 $(CPU) = $(PROCESSOR_LEVEL)
82 !endif
85 !endif
87 -alpha-: nul
88 @$(APPEND) $(ARCH) = alpha
89 -ix86-: nul
90 @$(APPEND) $(ARCH) = x86
92 -i386-: -ix86-
93 @$(APPEND) $(CPU) = 3
94 -i486-: -ix86-
95 @$(APPEND) $(CPU) = 4
96 -i586-: -ix86-
97 @$(APPEND) $(CPU) = 5
98 -i686-: -ix86-
99 @$(APPEND) $(CPU) = 6
101 # CE
102 -mips- -arm- -sh3- -sh4-::
103 @$(APPEND) $(ARCH) = $(@:-=)
104 -mips- -arm-::
105 @$(APPEND) CC = cl$(@:-=)
106 -sh3- -sh4-::
107 @$(APPEND) CC = shcl
108 -armv4- -armv4i-::
109 @$(APPEND) CC = clarm
110 @$(APPEND) ARCHFOLDER = $(@:-=)
111 -armv4t-::
112 @$(APPEND) CC = clthumb
113 @$(APPEND) ARCHFOLDER = $(@:-=)
115 -arm-::
116 @$(APPEND) CECPUDEF = -DARM -D_ARM_
117 -mips-::
118 @$(APPEND) CECPUDEF = -DMIPS -D_MIPS_
119 -sh3-::
120 @$(APPEND) CECPUDEF = -DSHx -DSH3 -D_SH3_
121 -sh4-::
122 @$(APPEND) CECPUDEF = -DSHx -DSH4 -D_SH4_
123 @$(APPEND) QSH4 = -Qsh4
124 -armv4-::
125 @$(APPEND) CECPUDEF = -DARM -D_ARM_ -DARMV4
126 @$(APPEND) $(ARCH) = ARM
127 -armv4t- -armv4i-::
128 @$(APPEND) CECPUDEF = -DARM -D_ARM_ -DARMV4T -DTHUMB -D_THUMB_
129 @$(APPEND) $(ARCH) = THUMB
132 -hpc2k-: -hpc2000-
133 -ppc-: "-MS Pocket PC-"
134 -hpcpro2-: "-MS HPC Pro-"
135 -hpcpro-: "-MS HPC Pro--"
137 -mswin32-:
138 @type << >>$(MAKEFILE)
139 OS = mswin32
140 RT = msvcrt
143 -mswince-:
144 @type << >>$(MAKEFILE)
145 !ifdef CE_TOOLS_DIR
146 CE_TOOLS_DIR = $(CE_TOOLS_DIR)
147 !endif
148 !ifdef EMBEDDED_TOOLS_DIR
149 EMBEDDED_TOOLS_DIR = $(EMBEDDED_TOOLS_DIR)
150 !endif
152 OS = mswince
153 RT = $$(OS)
156 -mswince4-:
157 @type << >>$(MAKEFILE)
158 !ifdef CE_TOOLS4_DIR
159 CE_TOOLS4_DIR = $(CE_TOOLS4_DIR)
160 !endif
161 !ifdef EMBEDDED_TOOLS4_DIR
162 EMBEDDED_TOOLS4_DIR = $(EMBEDDED_TOOLS4_DIR)
163 !endif
165 OS = mswince
166 RT = $$(OS)
170 -mswince-3.00 -mswince-2.11: -mswince-
171 @type << >>$(MAKEFILE)
172 SUBSYSVERSION = $(@:-mswince-=)
173 PATH = $$(EMBEDDED_TOOLS_DIR)/common/evc/bin;$$(EMBEDDED_TOOLS_DIR)/EVC/WCE$$(SUBSYSVERSION:.=)/bin
176 -mswince-4.10: -mswince4-
177 @type << >>$(MAKEFILE)
178 SUBSYSVERSION = $(@:-mswince-=)
179 EXTLIBS = ws2.lib
180 PATH = $$(EMBEDDED_TOOLS4_DIR)/common/evc/bin;$$(EMBEDDED_TOOLS4_DIR)/EVC/WCE$$(SUBSYSVERSION:.=)/bin
183 -hpc2000- "-MS Pocket PC-": -mswince-3.00
184 "-MS HPC Pro-" "-MS HPC Pro--": -mswince-2.11
185 -.net41- -sig3-: -mswince-4.10
187 -hpc2000-:
188 @type << >>$(MAKEFILE)
189 SUBSYSTEM = windowsce,3.0
190 INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/include
191 LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/lib/$$(PROCESSOR_ARCHITECTURE)
194 "-MS Pocket PC-":
195 @type << >>$(MAKEFILE)
196 SUBSYSTEM = windowsce,3.0
197 INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS Pocket PC/include
198 LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS Pocket PC/lib/$$(PROCESSOR_ARCHITECTURE)
202 "-MS HPC Pro--":
203 @type << >>$(MAKEFILE)
204 SUBSYSTEM = windowsce,2.11
205 INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS HPC Pro/include
206 LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS HPC Pro/lib/$$(PROCESSOR_ARCHITECTURE)
209 -.net41-:
210 @type << >>$(MAKEFILE)
211 SUBSYSTEM = windowsce,4.1
212 INCLUDE = $$(CE_TOOLS4_DIR)/wce400/STANDARDSDK/include/$$(ARCHFOLDER)
213 LIB = $$(CE_TOOLS4_DIR)/wce400/STANDARDSDK/lib/$$(ARCHFOLDER)
216 -sig3-:
217 @type << >>$(MAKEFILE)
218 SUBSYSTEM = windowsce,4.1
219 INCLUDE = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/include/$$(ARCHFOLDER)
220 LIB = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/lib/$$(ARCHFOLDER)
223 -epilogue-: -encs-
225 -encs-: nul
226 @$(MAKE) -l -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE)
228 -epilogue-: nul
229 @type << >>$(MAKEFILE)
230 !ifdef RUBY_INSTALL_NAME
231 RUBY_INSTALL_NAME = $(RUBY_INSTALL_NAME)
232 !else ifdef RUBY_SUFFIX
233 RUBY_INSTALL_NAME = ruby$(RUBY_SUFFIX)
234 !endif
235 !ifdef RUBY_SO_NAME
236 RUBY_SO_NAME = $(RUBY_SO_NAME)
237 !else
238 # RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
239 !endif
240 # CFLAGS = -nologo $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG)
241 CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -I$$(srcdir)/wince \
242 $$(CECPUDEF) -DUNDER_CE -D_WIN32_WCE=$$(SUBSYSVERSION:.=) \
243 -DFILENAME_MAX=MAX_PATH -DTLS_OUT_OF_INDEXES=0xFFFFFFFF \
244 -DBUFSIZ=512 -D_UNICODE -DUNICODE $$(QSH4)
245 # STACK = 0x10000,0x1000
246 # LDFLAGS = $$(CFLAGS) -Fm
247 # XLDFLAGS =
248 # RFLAGS = -r
249 # EXTLIBS =
251 $(INCLUDE) $$(srcdir)/wince/Makefile.sub
253 @$(srcdir:/=\)\win32\rm.bat config.h config.status
254 @echo type `$(MAKE)' to make ruby for $(OS).