comparison src/Make_vms.mms @ 7:3fc0f57ecb91 v7.0001

updated for version 7.0001
author vimboss
date Sun, 13 Jun 2004 20:20:40 +0000
parents
children 410fa1a31baf
comparison
equal deleted inserted replaced
6:c2daee826b8f 7:3fc0f57ecb91
1 #
2 # Makefile for Vim on OpenVMS
3 #
4 # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
5 # Last change: 2004 May 04
6 #
7 # This has script been tested on VMS 6.2 to 7.3 on DEC Alpha and VAX
8 # with MMS and MMK
9 #
10 # The following could be built:
11 # vim.exe: standard (terminal, GUI/Motif, GUI/GTK)
12 # dvim.exe: debug
13 #
14 # Edit the lines in the Configuration section below for fine tuning.
15 #
16 # To build: mms/descrip=Make_vms.mms
17 # To clean up: mms/descrip=Make_vms.mms clean
18 #
19 # Hints and detailed description could be found in INSTALLVMS.TXT file.
20 #
21 ######################################################################
22 # Configuration section.
23 ######################################################################
24 # Platform selection
25 # Define this if you will use the VAX platform to build.
26 # VAX = YES
27
28 # VMS version
29 # Uncomment if you use VMS version 6.2 or older
30 # OLD_VMS = YES
31
32 # Compiler selection.
33 # Comment out if you use the VAXC compiler
34 DECC = YES
35
36 # Build model selection
37 # TINY - Almost no features enabled, not even multiple windows
38 # SMALL - Few features enabled, as basic as possible
39 # NORMAL - A default selection of features enabled
40 # BIG - Many features enabled, as rich as possible. (default)
41 # HUGE - All possible featues enabled.
42 # Please select one of these alternatives above.
43 MODEL = BIG
44
45 # GUI or terminal mode executable.
46 # Comment out if you want just the character terminal mode only.
47 GUI = YES
48
49 # GUI with GTK
50 # If you have GTK installed you might want to enable this option.
51 # GTK = YES
52
53 # Comment out if you want the compiler version with :ver command.
54 # NOTE: This part can make some complications if you're using some
55 # predefined symbols/flags for your compiler. If does, just leave behind
56 # the comment varialbe CCVER.
57 CCVER = YES
58
59 # Uncomment if want a debug version. Resulting executable is DVIM.EXE
60 # Development purpose only! Normally, it should not be defined. !!!
61 # DEBUG = YES
62
63 # Languages support for Perl, Python, TCL etc.
64 # If you don't need it really, leave them behind the comment.
65 # You will need related libraries, include files etc.
66 # VIM_TCL = YES
67 # VIM_PERL = YES
68 # VIM_PYTHON = YES
69 # VIM_RUBY = YES
70 # VIM_SNIFF = YES
71
72 # X Input Method. For entering special languages like chinese and
73 # Japanese. Please define just one: VIM_XIM or VIM_HANGULIN
74 # If you don't need it really, leave it behind the comment.
75 # VIM_XIM = YES
76
77 # Internal Hangul input method. GUI only.
78 # If you don't need it really, leave it behind the comment.
79 # VIM_HANGULIN = YES
80
81 # Allow any white space to separate the fields in a tags file
82 # When not defined, only a TAB is allowed.
83 # VIM_TAG_ANYWHITE = YES
84
85 ######################################################################
86 # Directory, library and include files configuration section.
87 # Normally you need not to change anything below. !
88 # These may need to be defined if things are not in standard locations
89 #
90 # You can find some explanation in INSTALLVMS.TXT
91 ######################################################################
92
93 # Compiler setup
94
95 .IFDEF VAX
96 .IFDEF DECC # VAX with DECC
97 CC_DEF = cc/decc
98 PREFIX = /prefix=all
99 .ELSE # VAX with VAXC
100 CC_DEF = cc
101 PREFIX =
102 CCVER =
103 .ENDIF
104 .ELSE # AXP wixh DECC
105 CC_DEF = cc
106 PREFIX = /prefix=all
107 .ENDIF
108
109 LD_DEF = link
110 C_INC = [.proto]
111
112 .IFDEF OLD_VMS
113 VMS_DEF = ,"OLD_VMS"
114 .ENDIF
115
116 .IFDEF DEBUG
117 DEBUG_DEF = ,"DEBUG"
118 TARGET = dvim.exe
119 CFLAGS = /debug/noopt$(PREFIX)
120 LDFLAGS = /debug
121 .ELSE
122 TARGET = vim.exe
123 CFLAGS = /opt$(PREFIX)
124 LDFLAGS =
125 .ENDIF
126
127 # Predefined VIM directories
128 # Please, use $VIM and $VIMRUNTIME logicals instead
129 VIMLOC = ""
130 VIMRUN = ""
131
132 CONFIG_H = os_vms_conf.h
133
134 .IFDEF GTK
135 .IFDEF GUI
136 .ELSE
137 GUI = YES
138 .ENDIF
139 .ENDIF
140
141 .IFDEF GUI
142 # X/Motif/GTK executable (also works in terminal mode )
143
144 .IFDEF GTK
145 GTK_DIR = ALPHA$DKA0:[GTK128.]
146 DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
147 LIBS = ,OS_VMS_GTK.OPT/OPT
148 GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm
149 GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_gtk_x11.c pty.c
150 GUI_OBJ = gui.obj gui_gtk.obj gui_gtk_f.obj gui_gtk_x11.obj pty.obj
151 GUI_INC = ,"/gtk_root/gtk","/gtk_root/glib"
152 # GUI_INC_VER is used just for :ver information
153 # this string should escape from C and DCL in the same time
154 GUI_INC_VER= ,\""/gtk_root/gtk\"",\""/gtk_root/glib\""
155 .else
156 MOTIF = YES
157 DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
158 LIBS = ,OS_VMS_MOTIF.OPT/OPT
159 GUI_FLAG =
160 GUI_SRC = gui.c gui_motif.c gui_x11.c
161 GUI_OBJ = gui.obj gui_motif.obj gui_x11.obj
162 GUI_INC =
163 .ENDIF
164
165 # You need to define these variables if you do not have DECW files
166 # at standard location
167 GUI_INC_DIR = ,decw$include:
168 # GUI_LIB_DIR = ,sys$library:
169
170 .ELSE
171 # Character terminal only executable
172 DEFS = "HAVE_CONFIG_H"
173 LIBS =
174 .ENDIF
175
176 .IFDEF VIM_PERL
177 # Perl related setup.
178 PERL = perl
179 PERL_DEF = ,"FEAT_PERL"
180 PERL_SRC = if_perlsfio.c if_perl.xs
181 PERL_OBJ = if_perlsfio.obj if_perl.obj
182 PERL_LIB = ,OS_VMS_PERL.OPT/OPT
183 PERL_INC = ,dka0:[perlbuild.perl.lib.vms_axp.5_6_1.core]
184 .ENDIF
185
186 .IFDEF VIM_PYTHON
187 # Python related setup.
188 PYTHON_DEF = ,"FEAT_PYTHON"
189 PYTHON_SRC = if_python.c
190 PYTHON_OBJ = if_python.obj
191 PYTHON_LIB = ,OS_VMS_PYTHON.OPT/OPT
192 PYTHON_INC = ,PYTHON_INCLUDE
193 .ENDIF
194
195 .IFDEF VIM_TCL
196 # TCL related setup.
197 TCL_DEF = ,"FEAT_TCL"
198 TCL_SRC = if_tcl.c
199 TCL_OBJ = if_tcl.obj
200 TCL_LIB = ,OS_VMS_TCL.OPT/OPT
201 TCL_INC = ,dka0:[tcl80.generic]
202 .ENDIF
203
204 .IFDEF VIM_SNIFF
205 # SNIFF related setup.
206 SNIFF_DEF = ,"FEAT_SNIFF"
207 SNIFF_SRC = if_sniff.c
208 SNIFF_OBJ = if_sniff.obj
209 SNIFF_LIB =
210 SNIFF_INC =
211 .ENDIF
212
213 .IFDEF VIM_RUBY
214 # RUBY related setup.
215 RUBY_DEF = ,"FEAT_RUBY"
216 RUBY_SRC = if_ruby.c
217 RUBY_OBJ = if_ruby.obj
218 RUBY_LIB = ,OS_VMS_RUBY.OPT/OPT
219 RUBY_INC =
220 .ENDIF
221
222 .IFDEF VIM_XIM
223 # XIM related setup.
224 .IFDEF GUI
225 XIM_DEF = ,"FEAT_XIM"
226 .ENDIF
227 .ENDIF
228
229 .IFDEF VIM_HANGULIN
230 # HANGULIN related setup.
231 .IFDEF GUI
232 HANGULIN_DEF = ,"FEAT_HANGULIN"
233 HANGULIN_SRC = hangulin.c
234 HANGULIN_OBJ = hangulin.obj
235 .ENDIF
236 .ENDIF
237
238 .IFDEF VIM_TAG_ANYWHITE
239 # TAG_ANYWHITE related setup.
240 TAG_DEF = ,"FEAT_TAG_ANYWHITE"
241 .ENDIF
242
243
244 ######################################################################
245 # End of configuration section.
246 # Please, do not change anything below without programming experience.
247 ######################################################################
248
249
250 MODEL_DEF = "FEAT_$(MODEL)",
251
252 # These go into pathdef.c
253 VIMUSER = "''F$EDIT(F$GETJPI(" ","USERNAME"),"TRIM")'"
254 VIMHOST = "''F$TRNLNM("SYS$NODE")'''F$TRNLNM("UCX$INET_HOST")'.''F$TRNLNM("UCX$INET_DOMAIN")'"
255
256 .SUFFIXES : .obj .c
257
258 ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
259 $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)) -
260 $(CFLAGS)$(GUI_FLAG) -
261 /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
262
263 # CFLAGS displayed in :ver information
264 # It is specially formated for correct display of unix like includes
265 # as $(GUI_INC) - replaced with $(GUI_INC_VER)
266 # Otherwise should not be any other difference.
267 ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
268 $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)) -
269 $(CFLAGS)$(GUI_FLAG) -
270 /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
271
272 ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
273 $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(SNIFF_LIB) $(RUBY_LIB)
274
275 SRC = buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
276 ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c fileio.c fold.c getchar.c \
277 main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
278 misc2.c move.c normal.c ops.c option.c quickfix.c regexp.c search.c \
279 syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
280 window.c os_unix.c os_vms.c pathdef.c \
281 $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \
282 $(RUBY_SRC) $(HANGULIN_SRC)
283
284 OBJ = buffer.obj charset.obj diff.obj digraph.obj edit.obj eval.obj \
285 ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
286 if_xcmdsrv.obj fileio.obj fold.obj getchar.obj main.obj mark.obj \
287 menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
288 move.obj mbyte.obj normal.obj ops.obj option.obj quickfix.obj \
289 regexp.obj search.obj syntax.obj tag.obj term.obj termlib.obj \
290 ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
291 os_vms.obj pathdef.obj \
292 $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
293 $(RUBY_OBJ) $(HANGULIN_OBJ)
294
295 # Default target is making the executable
296 all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
297 ! $@
298
299 [.auto]config.h : $(CONFIG_H)
300 copy/nolog $(CONFIG_H) [.auto]config.h
301
302 mmk_compat :
303 -@ open/write pd pathdef.c
304 -@ write pd "/* Empty file to satisfy MMK depend. */"
305 -@ write pd "/* It will be owerwritten later on... */"
306 -@ close pd
307 clean :
308 -@ if "''F$SEARCH("*.exe")'" .NES. "" then delete/noconfirm/nolog *.exe;*
309 -@ if "''F$SEARCH("*.obj")'" .NES. "" then delete/noconfirm/nolog *.obj;*
310 -@ if "''F$SEARCH("[.auto]config.h")'" .NES. "" then delete/noconfirm/nolog [.auto]config.h;*
311 -@ if "''F$SEARCH("pathdef.c")'" .NES. "" then delete/noconfirm/nolog pathdef.c;*
312 -@ if "''F$SEARCH("if_perl.c")'" .NES. "" then delete/noconfirm/nolog if_perl.c;*
313 -@ if "''F$SEARCH("*.opt")'" .NES. "" then delete/noconfirm/nolog *.opt;*
314
315 # Link the target
316 $(TARGET) : $(OBJ)
317 $(LD_DEF) $(LDFLAGS) /exe=$(TARGET) $+ $(ALL_LIBS)
318
319 .c.obj :
320 $(CC_DEF) $(ALL_CFLAGS) $<
321
322 pathdef.c : check_ccver $(CONFIG_H)
323 -@ write sys$output "creating PATHDEF.C file."
324 -@ open/write pd pathdef.c
325 -@ write pd "/* pathdef.c -- DO NOT EDIT! */"
326 -@ write pd "/* This file is automatically created by MAKE_VMS.MMS"
327 -@ write pd " * Change the file MAKE_VMS.MMS Only. */"
328 -@ write pd "typedef unsigned char char_u;"
329 -@ write pd "char_u *default_vim_dir = (char_u *)"$(VIMLOC)";"
330 -@ write pd "char_u *default_vimruntime_dir = (char_u *)"$(VIMRUN)";"
331 -@ write pd "char_u *all_cflags = (char_u *)""$(CC_DEF)$(ALL_CFLAGS_VER)"";"
332 -@ write pd "char_u *all_lflags = (char_u *)""$(LD_DEF)$(LDFLAGS) /exe=$(TARGET) *.OBJ $(ALL_LIBS)"";"
333 -@ write pd "char_u *compiler_version = (char_u *) ""''CC_VER'"";"
334 -@ write pd "char_u *compiled_user = (char_u *) "$(VIMUSER)";"
335 -@ write pd "char_u *compiled_sys = (char_u *) "$(VIMHOST)";"
336 -@ close pd
337
338 if_perl.c : if_perl.xs
339 -@ $(PERL) PERL_ROOT:[LIB.ExtUtils]xsubpp -prototypes -typemap -
340 PERL_ROOT:[LIB.ExtUtils]typemap if_perl.xs >> $@
341
342 make_vms.mms :
343 -@ write sys$output "The name of the makefile MUST be <MAKE_VMS.MMS> !!!"
344
345 .IFDEF CCVER
346 # This part can make some complications if you're using some predefined
347 # symbols/flags for your compiler. If does, just comment out CCVER variable
348 check_ccver :
349 -@ define sys$output cc_ver.tmp
350 -@ $(CC_DEF)/version
351 -@ deassign sys$output
352 -@ open/read file cc_ver.tmp
353 -@ read file CC_VER
354 -@ close file
355 -@ delete/noconfirm/nolog cc_ver.tmp.*
356 .ELSE
357 check_ccver :
358 -@ !
359 .ENDIF
360
361 .IFDEF MOTIF
362 motif_env :
363 -@ write sys$output "using DECW/Motif environment."
364 -@ write sys$output "creating OS_VMS_MOTIF.OPT file."
365 -@ open/write opt_file OS_VMS_MOTIF.OPT
366 -@ write opt_file "sys$share:decw$xmlibshr12.exe/share,-"
367 -@ write opt_file "sys$share:decw$xtlibshrr5.exe/share,-"
368 -@ write opt_file "sys$share:decw$xlibshr.exe/share"
369 -@ close opt_file
370 .ELSE
371 motif_env :
372 -@ !
373 .ENDIF
374
375
376 .IFDEF GTK
377 gtk_env :
378 -@ write sys$output "using GTK environment:"
379 -@ define/nolog gtk_root /trans=conc $(GTK_DIR)
380 -@ show logical gtk_root
381 -@ write sys$output " include path: "$(GUI_INC)""
382 -@ write sys$output "creating OS_VMS_GTK.OPT file."
383 -@ open/write opt_file OS_VMS_GTK.OPT
384 -@ write opt_file "gtk_root:[glib]libglib.exe /share,-"
385 -@ write opt_file "gtk_root:[glib.gmodule]libgmodule.exe /share,-"
386 -@ write opt_file "gtk_root:[gtk.gdk]libgdk.exe /share,-"
387 -@ write opt_file "gtk_root:[gtk.gtk]libgtk.exe /share,-"
388 -@ write opt_file "sys$share:decw$xmlibshr12.exe/share,-"
389 -@ write opt_file "sys$share:decw$xtlibshrr5.exe/share,-"
390 -@ write opt_file "sys$share:decw$xlibshr.exe/share"
391 -@ close opt_file
392 .ELSE
393 gtk_env :
394 -@ !
395 .ENDIF
396
397 .IFDEF VIM_PERL
398 perl_env :
399 -@ write sys$output "using PERL environment:"
400 -@ show logical PERLSHR
401 -@ write sys$output " include path: ""$(PERL_INC)"""
402 -@ show symbol perl
403 -@ open/write pd if_perl.c
404 -@ write pd "/* Empty file to satisfy MMK depend. */"
405 -@ write pd "/* It will be owerwritten later on... */"
406 -@ close pd
407 -@ write sys$output "creating OS_VMS_PERL.OPT file."
408 -@ open/write opt_file OS_VMS_PERL.OPT
409 -@ write opt_file "PERLSHR /share"
410 -@ close opt_file
411 .ELSE
412 perl_env :
413 -@ !
414 .ENDIF
415
416 .IFDEF VIM_PYTHON
417 python_env :
418 -@ write sys$output "using PYTHON environment:"
419 -@ show logical PYTHON_INCLUDE
420 -@ show logical PYTHON_OLB
421 -@ write sys$output "creating OS_VMS_PYTHON.OPT file."
422 -@ open/write opt_file OS_VMS_PYTHON.OPT
423 -@ write opt_file "PYTHON_OLB:PYTHON.OLB /share"
424 -@ close opt_file
425 .ELSE
426 python_env :
427 -@ !
428 .ENDIF
429
430 .IFDEF VIM_TCL
431 tcl_env :
432 -@ write sys$output "using TCL environment:"
433 -@ show logical TCLSHR
434 -@ write sys$output " include path: ""$(TCL_INC)"""
435 -@ write sys$output "creating OS_VMS_TCL.OPT file."
436 -@ open/write opt_file OS_VMS_TCL.OPT
437 -@ write opt_file "TCLSHR /share"
438 -@ close opt_file
439 .ELSE
440 tcl_env :
441 -@ !
442 .ENDIF
443
444 .IFDEF VIM_RUBY
445 ruby_env :
446 -@ write sys$output "using RUBY environment:"
447 -@ write sys$output " include path: ""$(RUBY_INC)"""
448 -@ write sys$output "creating OS_VMS_RUBY.OPT file."
449 -@ open/write opt_file OS_VMS_RUBY.OPT
450 -@ write opt_file "RUBYSHR /share"
451 -@ close opt_file
452 .ELSE
453 ruby_env :
454 -@ !
455 .ENDIF
456
457