OSDN Git Service

import the last version of the original mayu extracted by following command:
[yamy/yamy.git] / mayu-common.mak
1 ############################################################## -*- Makefile -*-
2 #
3 # Makefile for mayu
4 #
5 ###############################################################################
6
7
8 !if "$(VERSION)" == ""
9 #VERSION                = 3.31
10 VERSION         = snapshot20050612
11 !endif
12
13 !if "$(TARGETOS)" == "WINNT"
14 OS_SPECIFIC_DEFINES     =  -DUNICODE -D_UNICODE
15 DISTRIB_OS      = xp
16 !endif
17
18 !if "$(TARGETOS)" == "WIN95"
19 OS_SPECIFIC_DEFINES     =  -D_MBCS
20 DISTRIB_OS      = 9x
21 !endif
22
23 !if "$(TARGETOS)" == "BOTH"
24 !error You must specify TARGETOS=WINNT
25 !endif
26
27
28 COMMON_DEFINES  = -DSTRICT -D_WIN32_IE=0x0500 $(OS_SPECIFIC_DEFINES)
29 BOOST_DIR       = ../boost_$(BOOST_VER)_0
30
31
32 # mayu.exe      ###############################################################
33
34 TARGET_1        = $(OUT_DIR)\mayu.exe
35 OBJS_1          =                                       \
36                 $(OUT_DIR)\compiler_specific_func.obj   \
37                 $(OUT_DIR)\dlgeditsetting.obj           \
38                 $(OUT_DIR)\dlginvestigate.obj           \
39                 $(OUT_DIR)\dlglog.obj                   \
40                 $(OUT_DIR)\dlgsetting.obj               \
41                 $(OUT_DIR)\dlgversion.obj               \
42                 $(OUT_DIR)\engine.obj                   \
43                 $(OUT_DIR)\focus.obj                    \
44                 $(OUT_DIR)\function.obj                 \
45                 $(OUT_DIR)\keyboard.obj                 \
46                 $(OUT_DIR)\keymap.obj                   \
47                 $(OUT_DIR)\layoutmanager.obj            \
48                 $(OUT_DIR)\mayu.obj                     \
49                 $(OUT_DIR)\parser.obj                   \
50                 $(OUT_DIR)\registry.obj                 \
51                 $(OUT_DIR)\setting.obj                  \
52                 $(OUT_DIR)\stringtool.obj               \
53                 $(OUT_DIR)\target.obj                   \
54                 $(OUT_DIR)\vkeytable.obj                \
55                 $(OUT_DIR)\windowstool.obj              \
56
57 SRCS_1          =                               \
58                 compiler_specific_func.cpp      \
59                 dlgeditsetting.cpp              \
60                 dlginvestigate.cpp              \
61                 dlglog.cpp                      \
62                 dlgsetting.cpp                  \
63                 dlgversion.cpp                  \
64                 engine.cpp                      \
65                 focus.cpp                       \
66                 function.cpp                    \
67                 keyboard.cpp                    \
68                 keymap.cpp                      \
69                 layoutmanager.cpp               \
70                 mayu.cpp                        \
71                 parser.cpp                      \
72                 registry.cpp                    \
73                 setting.cpp                     \
74                 stringtool.cpp                  \
75                 target.cpp                      \
76                 vkeytable.cpp                   \
77                 windowstool.cpp                 \
78
79 RES_1           = $(OUT_DIR)\mayu.res
80
81 LIBS_1          =                       \
82                 $(guixlibsmt)           \
83                 shell32.lib             \
84                 comctl32.lib            \
85                 wtsapi32.lib            \
86                 $(OUT_DIR)\mayu.lib     \
87
88 EXTRADEP_1      = $(OUT_DIR)\mayu.lib
89
90 # mayu.dll      ###############################################################
91
92 TARGET_2        = $(OUT_DIR)\mayu.dll
93 OBJS_2          = $(OUT_DIR)\hook.obj $(OUT_DIR)\stringtool.obj
94 SRCS_2          = hook.cpp stringtool.cpp
95 LIBS_2          = $(guixlibsmt) imm32.lib
96
97
98 # mayu.lib      ###############################################################
99
100 TARGET_3        = $(OUT_DIR)\mayu.lib
101 DLL_3           = $(OUT_DIR)\mayu.dll
102
103
104 # distribution  ###############################################################
105
106 DISTRIB_SETTINGS =                      \
107                 104.mayu                \
108                 104on109.mayu           \
109                 109.mayu                \
110                 109on104.mayu           \
111                 default.mayu            \
112                 emacsedit.mayu          \
113                 dot.mayu                \
114
115 DISTRIB_MANUAL  =                               \
116                 doc\banner-ja.gif               \
117                 doc\CONTENTS-ja.html            \
118                 doc\CUSTOMIZE-ja.html           \
119                 doc\edit-setting-ja.png         \
120                 doc\investigate-ja.png          \
121                 doc\log-ja.png                  \
122                 doc\MANUAL-ja.html              \
123                 doc\menu-ja.png                 \
124                 doc\pause-ja.png                \
125                 doc\README-ja.html              \
126                 doc\README.css                  \
127                 doc\setting-ja.png              \
128                 doc\syntax.txt                  \
129                 doc\target.png                  \
130                 doc\version-ja.png              \
131                 mayu-mode.el                    \
132
133 DISTRIB_CONTRIBS =                              \
134                 contrib\109onAX.mayu            \
135                 contrib\mayu-settings.txt       \
136                 contrib\dvorak.mayu             \
137                 contrib\dvorak109.mayu          \
138                 contrib\keitai.mayu             \
139                 contrib\ax.mayu                 \
140                 contrib\98x1.mayu               \
141                 contrib\DVORAKon109.mayu        \
142
143 !if "$(TARGETOS)" == "WINNT"
144 DISTRIB_DRIVER  =                               \
145                 d\i386\mayud.sys                \
146                 d\rescue\i386\mayudrsc.sys      \
147                 d\nt4\i386\mayudnt4.sys
148 !endif
149 !if "$(TARGETOS)" == "WIN95"
150 DISTRIB_DRIVER  = d_win9x\mayud.vxd
151 !endif
152
153 DISTRIB         =                       \
154                 $(TARGET_1)             \
155                 $(TARGET_2)             \
156                 s\$(OUT_DIR)\setup.exe  \
157                 $(DISTRIB_SETTINGS)     \
158                 $(DISTRIB_MANUAL)       \
159                 $(DISTRIB_CONTRIBS)     \
160                 $(DISTRIB_DRIVER)       \
161
162
163 # tools         ###############################################################
164
165 IEXPRESS        = iexpress
166 DOCXX           = doc++.exe
167 MAKEDEPEND      = perl tools/makedepend -o.obj
168 DOS2UNIX        = perl tools/dos2unix
169 UNIX2DOS        = perl tools/unix2dos
170 MAKEFUNC        = perl tools/makefunc
171 GETCVSFILES     = perl tools/getcvsfiles
172 GENIEXPRESS     = perl tools/geniexpress
173
174
175 # rules         ###############################################################
176
177 all:            boost $(OUT_DIR) $(TARGET_1) $(TARGET_2) $(TARGET_3)
178
179 $(OUT_DIR):
180                 if not exist "$(OUT_DIR)\\" $(MKDIR) $(OUT_DIR)
181
182 functions.h:    engine.h tools/makefunc
183                 $(MAKEFUNC) < engine.h > functions.h
184
185 clean::
186                 -$(RM) $(TARGET_1) $(TARGET_2) $(TARGET_3)
187                 -$(RM) $(OUT_DIR)\*.obj
188                 -$(RM) $(OUT_DIR)\*.res $(OUT_DIR)\*.exp
189                 -$(RM) mayu.aps mayu.opt $(OUT_DIR)\*.pdb
190                 -$(RM) *~ $(CLEAN)
191                 -$(RMDIR) $(OUT_DIR)
192
193 depend::
194                 $(MAKEDEPEND) -fmayu-common.mak \
195                 -- $(DEPENDFLAGS) -- $(SRCS_1) $(SRCS_2)
196
197 distrib:
198                 -@echo "we need cygwin tool"
199                 -rm -f mayu-$(VERSION) 
200                 -ln -s . mayu-$(VERSION)
201                 -bash -c "tar cvjf mayu-$(VERSION)-src.tar.bz2 `$(GETCVSFILES) | sed 's/^./mayu-$(VERSION)/'`"
202                 -rm -f mayu-$(VERSION) 
203                 -$(GENIEXPRESS) \
204                         mayu-$(VERSION)-$(DISTRIB_OS).exe \
205                         "MADO TSUKAI NO YUUTSU $(VERSION) $(TARGETOS)" \
206                         setup.exe $(DISTRIB) > __mayu__.sed
207                 -$(UNIX2DOS) $(DISTRIB_SETTINGS) $(DISTRIB_CONTRIBS)
208                 -$(IEXPRESS) /N __mayu__.sed
209                 -$(DOS2UNIX) $(DISTRIB_SETTINGS) $(DISTRIB_CONTRIBS)
210                 -$(RM) __mayu__.sed
211
212 srcdesc::
213                 @$(ECHO) USE DOC++ 3.4.4 OR HIGHER
214                 $(DOCXX) *.h
215
216 # DO NOT DELETE
217
218 $(OUT_DIR)\compiler_specific_func.obj: compiler_specific.h \
219  compiler_specific_func.h misc.h stringtool.h
220 $(OUT_DIR)\dlgeditsetting.obj: compiler_specific.h dlgeditsetting.h \
221  layoutmanager.h mayurc.h misc.h stringtool.h windowstool.h
222 $(OUT_DIR)\dlginvestigate.obj: compiler_specific.h d\ioctl.h \
223  dlginvestigate.h driver.h engine.h focus.h function.h functions.h hook.h \
224  keyboard.h keymap.h mayurc.h misc.h msgstream.h multithread.h parser.h \
225  setting.h stringtool.h target.h vkeytable.h windowstool.h
226 $(OUT_DIR)\dlglog.obj: compiler_specific.h dlglog.h layoutmanager.h mayu.h \
227  mayurc.h misc.h msgstream.h multithread.h registry.h stringtool.h \
228  windowstool.h
229 $(OUT_DIR)\dlgsetting.obj: compiler_specific.h d\ioctl.h dlgeditsetting.h \
230  driver.h function.h functions.h keyboard.h keymap.h layoutmanager.h mayu.h \
231  mayurc.h misc.h multithread.h parser.h registry.h setting.h stringtool.h \
232  windowstool.h
233 $(OUT_DIR)\dlgversion.obj: compiler_specific.h compiler_specific_func.h \
234  layoutmanager.h mayu.h mayurc.h misc.h stringtool.h windowstool.h
235 $(OUT_DIR)\engine.obj: compiler_specific.h d\ioctl.h driver.h engine.h \
236  errormessage.h function.h functions.h hook.h keyboard.h keymap.h mayurc.h \
237  misc.h msgstream.h multithread.h parser.h setting.h stringtool.h \
238  windowstool.h
239 $(OUT_DIR)\focus.obj: compiler_specific.h focus.h misc.h stringtool.h \
240  windowstool.h
241 $(OUT_DIR)\function.obj: compiler_specific.h d\ioctl.h driver.h engine.h \
242  function.h functions.h hook.h keyboard.h keymap.h mayu.h mayurc.h misc.h \
243  msgstream.h multithread.h parser.h registry.h setting.h stringtool.h \
244  vkeytable.h windowstool.h
245 $(OUT_DIR)\keyboard.obj: compiler_specific.h d\ioctl.h driver.h keyboard.h \
246  misc.h stringtool.h
247 $(OUT_DIR)\keymap.obj: compiler_specific.h d\ioctl.h driver.h \
248  errormessage.h function.h functions.h keyboard.h keymap.h misc.h \
249  multithread.h parser.h setting.h stringtool.h
250 $(OUT_DIR)\layoutmanager.obj: compiler_specific.h layoutmanager.h misc.h \
251  stringtool.h windowstool.h
252 $(OUT_DIR)\mayu.obj: compiler_specific.h compiler_specific_func.h d\ioctl.h \
253  dlginvestigate.h dlglog.h dlgsetting.h dlgversion.h driver.h engine.h \
254  errormessage.h focus.h function.h functions.h hook.h keyboard.h keymap.h \
255  mayu.h mayuipc.h mayurc.h misc.h msgstream.h multithread.h parser.h \
256  registry.h setting.h stringtool.h target.h windowstool.h
257 $(OUT_DIR)\parser.obj: compiler_specific.h errormessage.h misc.h parser.h \
258  stringtool.h
259 $(OUT_DIR)\registry.obj: array.h compiler_specific.h misc.h registry.h \
260  stringtool.h
261 $(OUT_DIR)\setting.obj: array.h compiler_specific.h d\ioctl.h dlgsetting.h \
262  driver.h errormessage.h function.h functions.h keyboard.h keymap.h mayu.h \
263  mayurc.h misc.h multithread.h parser.h registry.h setting.h stringtool.h \
264  vkeytable.h windowstool.h
265 $(OUT_DIR)\stringtool.obj: array.h compiler_specific.h misc.h stringtool.h
266 $(OUT_DIR)\target.obj: compiler_specific.h mayurc.h misc.h stringtool.h \
267  target.h windowstool.h
268 $(OUT_DIR)\vkeytable.obj: compiler_specific.h misc.h vkeytable.h
269 $(OUT_DIR)\windowstool.obj: array.h compiler_specific.h misc.h stringtool.h \
270  windowstool.h
271 $(OUT_DIR)\hook.obj: compiler_specific.h hook.h misc.h stringtool.h
272 $(OUT_DIR)\stringtool.obj: array.h compiler_specific.h misc.h stringtool.h