File: makefile.unix

package info (click to toggle)
jvim 3.0-2.1a-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,744 kB
  • ctags: 4,544
  • sloc: ansic: 145,262; makefile: 228; sh: 41
file content (522 lines) | stat: -rw-r--r-- 13,424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
#
# Makefile for Vim on Unix
#

# Note: You MUST uncomment three hardware dependend lines!

# There are three types of defines:
#
# 1. configuration dependend
#	Used for "make install". Adjust the path names and protections
#	to your desire. Also defines the root for the X11 files (not required).
#
# 2. various choices
#	Can be changed to match your compiler or your preferences (not
#	required).
#
# 3. hardware dependend
#	If you machine is in the list, remove one '#' in front of the defines
#	following it. Otherwise: Find a machine that is similar and change the
#	defines to make it work. Normally you can just try and see what error
#	messages you get. (REQUIRED).

# The following systems have entries below. They have been tested and should
# work without modification. But later code changes may cause small problems.
# There are entries for other systems, but these have not been tested recently.

#system:		tested configurations:		tested by:

#Sun 4.1.x		cc	gcc	X11	no X11	(jw) (mool)
#FreeBSD		cc	gcc	X11	no X11	(mool)
#linux 1.0		cc		X11
#Linux 1.0.9			gcc		no X11	(jw)
#ULTRIX 4.2A on MIPS	cc	gcc		no X11	(mool)
#HPUX			cc	gcc	X11	no X11	(jw) (mool)
#irix 4.0.5H		cc		X11
#IRIX 4.0  SGI		cc		X11		(jw)
#SINIX-L 5.41		cc			no X11
#MOT188			cc			no X11
#Sequent/ptx 1.3	cc			no X11	(jw)
#osf1			cc			no X11	(jw)
#Unisys 6035		cc			no X11
#SCO 3.2		cc	gcc		no X11	jos@oce.nl
#Solaris		cc		X11
#Solaris/Sun OS 5.3	cc			no X11	(jw)
#AIX (rs6000)		cc			no X11	(jw)
#RISCos on MIPS		cc		X11	no X11	(jw)

# configurations marked by (jw) have been tested by Juergen Weigert:
#    jnweiger@uni-erlangen.de

#
# PART 1: configuration dependend
#

### root directory for X11 files (unless overruled in hardware-dependend part)
### Unfortunately there is no standard for these, everybody puts them
### somewhere else
X11LIBDIR = /usr/openwin/lib
X11INCDIR = /usr/openwin/include
### for some hpux systems:
#X11LIBDIR = /usr/lib/X11R5
#X11INCDIR = /usr/include/X11R5

### Prefix for location of files
PREFIX = /usr/local

### Location of binary
BINLOC = $(PREFIX)/bin

### Name of target
TARGET = vim

### Location of man page
MANLOC = $(PREFIX)/man/man1

### Location of help file
HELPLOC = $(PREFIX)/lib

### Program to run on installed binary
STRIP = strip

### Permissions for vim binary
BINMOD = 755

### Permissions for man page
MANMOD = 644

### Permissions for help file
HELPMOD = 644

MANFILE = ../doc/vim.1

HELPFILE = ../doc/vim.hlp

#
# PART 2: various choices
#

### -DDIGRAPHS		digraph support
### -DNO_FREE_NULL	do not call free() with a null pointer
### -DCOMPATIBLE	start in vi-compatible mode
### -DNOBACKUP		default is no backup file
### -DDEBUG		output a lot of debugging garbage
### -DSTRNCASECMP	use strncasecmp() instead of internal function
### -DUSE_LOCALE	use setlocale() to change ctype() and others
### -DTERMCAP		full termcap/terminfo file support
### -DTERMINFO		use terminfo instead of termcap entries for builtin terms
### -DNO_BUILTIN_TCAPS	do not include builtin termcap entries
###				(use only with -DTERMCAP)
### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
###				(use only without -DNO_BUILTIN_TCAPS)
### -DALL_BUILTIN_TCAPS	include all builtin termcap entries
###				(use only without -DNO_BUILTIN_TCAPS)
### -DMAXNAMLEN 31	maximum length of a file name (if not defined in sys/dir.h)
### -Dconst=		for compilers that don't have type const
### -DVIMRC_FILE=name		name of the .vimrc file in current dir
### -DEXRC_FILE=name		name of the .exrc file in current dir
### -DSYSVIMRC_FILE=name	name of the global .vimrc file
### -DSYSEXRC_FILE=name		name of the global .exrc file
### -DDEFVIMRC_FILE=name	name of the system-wide .vimrc file
### -DVIM_HLP=name		name of the help file
### -DUSE_SYSTEM	use system() instead of fork/exec for starting a shell
### -DVIM_ISSPACE	use when isspace() can't handle meta chars
### -DNOLIMITS		limits.h does not exist
### -DNOSTDLIB		stdlib.h does not exist
### -DUSE_X11		include code for xterm title saving
### -DWEBB_COMPLETE	include Webb's code for command line completion
### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
### -DNOTITLE		'title' option off by default
DEFS = -DDIGRAPHS -DTERMCAP -DSOME_BUILTIN_TCAPS -DNO_FREE_NULL -DVIM_ISSPACE \
		-DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL \
		-DVIM_HLP=\"$(HELPLOC)/vim.hlp\"

#
# PART 3: hardware dependend
#

### CC entry:      name and arguments for the compiler (also for linking)
### MACHINE entry: defines used for compiling (not for linking)
### LIBS:          defines used for linking

# generic for Sun, NeXT, POSIX and SYSV R4 (?) (TESTED for Sun 4.1.x)
# standard cc with optimizer
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=cc -O -I$(X11INCDIR)
#LIBS = -ltermlib -L$(X11LIBDIR) -lX11

# generic for Sun, FreeBSD, NetBSD, NeXT, POSIX and SYSV R4 (?) without x11 code
#	(TESTED for Sun 4.1.x and FreeBSD)
# standard cc with optimizer
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE
#CC=cc -O
#LIBS = -ltermlib

# FreeBSD and NetBSD with Xfree (TESTED for FreeBSD)
# standard cc with optimizer
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=cc -O -L/usr/X386/lib -I/usr/X386/include
#LIBS = -ltermlib -lX11

# FreeBSD and NetBSD with Xfree (TESTED for FreeBSD)
# gcc with optimizer
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=gcc -O -Wall -traditional -Dconst= -I/usr/X386/include
#LIBS = -ltermlib -L/usr/X386/lib -lX11

# like generic, but with termcap, for Linux, NeXT and others (NOT TESTED YET)
# standard cc with optimizer
#
#MACHINE = -DBSD_UNIX
#CC=cc -O
#LIBS = -ltermcap

# linux 1.0 with X11 (TESTED)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=cc -O -I/usr/X11/include
#LIBS = -ltermcap -L/usr/X11/lib -lX11

# like generic, but with debugging (NOT TESTED YET)
#
#MACHINE = -DBSD_UNIX -g
#CC=cc
#LIBS = -ltermlib

# like generic, but with gcc and X11 (TESTED on Sun 4.1.x)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=gcc -O -Wall -traditional -Dconst= -L$(X11LIBDIR) -I$(X11INCDIR)
#LIBS = -ltermlib -lX11

# like generic, but with gcc, without X11 (TESTED on ULTRIX 4.2A on MIPS)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE
#CC=gcc -O -Wall -traditional -Dconst=
#LIBS = -ltermlib

# like generic, but with gcc 2.5.8 (TESTED on Sun 4.1.3_U1)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE
#CC=gcc -O1000
#LIBS = -ltermlib

# standard cc with optimizer for ULTRIX 4.2A on MIPS (ultrix defined) (TESTED)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE
#CC=cc -O -Olimit 1500
#LIBS = -ltermlib

# GCC (2.2.2d) on Linux (1.0.9) (TESTED)
#
#MACHINE = -DBSD_UNIX
#CC=gcc -O6 -Wall
#LIBS = -ltermcap

# Apollo DOMAIN (with SYSTYPE = bsd4.3) (NOT TESTED YET)
#
#MACHINE = -DBSD_UNIX -DDOMAIN
#CC=cc -O -A systype,bsd4.3
#LIBS = -ltermlib

# HPUX with X11 (TESTED) (hpux is defined)
#
#MACHINE = -DBSD_UNIX -DTERMINFO -DUSE_X11
#CC=cc -O -I$(X11INCDIR)
#LIBS = -ltermcap -L$(X11LIBDIR) -lX11

# HPUX (TESTED) (hpux is defined)
#
#MACHINE = -DBSD_UNIX -DTERMINFO
#CC=cc -O
#LIBS = -ltermcap

# HPUX with gcc (TESTED) (hpux is defined)
#
#MACHINE = -DBSD_UNIX -DTERMINFO
#CC=gcc -O
#LIBS = -ltermcap

# hpux 9.01 (with termlib instead of termcap) (TESTED)
# irix 4.0.5H (TESTED)
#
#MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
#CC=cc -O -I$(X11INCDIR)
#LIBS = -ltermlib -L$(X11LIBDIR) -lX11

# IRIX 4.0 (Silicon Graphics Indigo, __sgi will be defined) (TESTED)
#
#MACHINE = -DBSD_UNIX -DUSE_X11                         
#CC=cc -O -Olimit 1500
#LIBS = -ltermlib -lX11 -lmalloc -lc_s

# Convex (NOT TESTED YET)
#
#MACHINE = -DBSD_UNIX -DCONVEX
#CC=cc -O
#LIBS = -ltermcap

# generic SYSV_UNIX for Dynix/PTX and SYSV R3 (and R4?) (TESTED on SINIX-L 5.41)
# (TESTED on MOT188) (TESTED on Sequent/ptx 1.3) (TESTED on osf1)
# First try the line with locale. If this gives error messages try the other one.
#
#MACHINE = -DSYSV_UNIX -DUSE_LOCALE
#MACHINE = -DSYSV_UNIX
#CC=cc -O
#LIBS = -ltermlib

# generic SYSV_UNIX with LOCALE (TESTED on Unisys 6035)
#
#MACHINE = -DSYSV_UNIX -DUSE_LOCALE -DUNISYS
#CC=cc -O
#LIBS = -ltermlib

# SCO Xenix (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -DSCO
#CC=cc -O
#LIBS = -ltermlib

# GCC on SCO 3.2 (TESTED by jos@oce.nl)
# cc works too.
#
#MACHINE = -DSYSV_UNIX -UM_XENIX -DSCO
#CC=gcc -O -Wall
#LIBS = -ltinfo

# GCC on another SCO Unix (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -UM_XENIX -DSCO -g
#CC=gcc -O6 -fpcc-struct-return -fwritable-strings
#LIBS = -ltermlib -lmalloc

# Dynix with gcc (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX
#CC=gcc -O -Wall -traditional
#LIBS = -ltermlib

# SOLARIS with X11 anc cc (TESTED)
#
#MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO -DUSE_X11
#CC=cc -O -Xa -v -R$(X11LIBDIR) -L$(X11LIBDIR) -I$(X11INCDIR)
#LIBS = -ltermlib -lX11

# SOLARIS with X11 and gcc (TESTED with SOLARIS 2.3 and gcc 2.5.8)
#
#MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO -DUSE_X11
#CC=gcc -O -R$(X11LIBDIR) -L$(X11LIBDIR) -I$(X11INCDIR)
#LIBS = -ltermlib -lX11

# SOLARIS (also works for Esix 4.0.3, SYSV R4?) (TESTED on Sun OS 5.3)
#
#MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO
#CC=cc -O -Xa -v
#LIBS = -ltermlib

# UNICOS (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -DUNICOS
#CC=cc -O
#LIBS = -ltermlib

# AIX (rs6000) (TESTED)
#
#MACHINE = -DSYSV_UNIX -DAIX
#CC=cc -O
#LIBS=-lcur

# UTS2 for Amdahl UTS 2.1.x (disable termcap below) (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -DUTS2
#CC=cc -O
#LIBS = -ltermlib -lsocket

# UTS4 for Amdahl UTS 4.x (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -DUTS4 -Xa
#CC=cc -O
#LIBS = -ltermlib

# USL for Unix Systems Laboratories (SYSV 4.2) (NOT TESTED YET)
#
#MACHINE = -DSYSV_UNIX -DUSL
#CC=cc -O
#LIBS = -ltermlib

# RISCos on MIPS without X11 (TESTED)
#
#MACHINE = -DSYSV_UNIX -DMIPS
#CC=cc -O
#LIBS = -ltermlib

# RISCos on MIPS with X11 (TESTED)
#
#MACHINE=-DSYSV_UNIX -DUSE_LOCALE -DUSE_X11
#CC=cc -O -I$(X11INCDIR)
#LIBS=-ltermlib -L$(X11LIBDIR) -lX11 -lsun

################################################
##   no changes required below this line      ##
################################################

CFLAGS = -c $(MACHINE) $(DEFS)

INCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h unix.h structs.h proto.h

OBJ =	alloc.o unix.o buffer.o charset.o cmdcmds.o cmdline.o \
	csearch.o digraph.o edit.o fileio.o getchar.o help.o \
	linefunc.o main.o mark.o memfile.o memline.o message.o misccmds.o \
	normal.o ops.o param.o quickfix.o regexp.o \
	regsub.o screen.o search.o \
	tag.o term.o undo.o window.o $(TERMLIB)

$(TARGET): $(OBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(TARGET) $(OBJ) version.o $(LIBS)

debug: $(OBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(TARGET) -g $(OBJ) version.o $(LIBS)

ctags:
	ctags *.c *.h

install: $(TARGET)
	-mkdir $(BINLOC)
	cp $(TARGET) $(BINLOC)
	chmod $(BINMOD) $(BINLOC)/$(TARGET)
	$(STRIP) $(BINLOC)/$(TARGET)
	-mkdir $(MANLOC)
	cp $(MANFILE) $(MANLOC)
	chmod $(MANMOD) $(MANLOC)/vim.1
	-mkdir $(HELPLOC)
	cp $(HELPFILE) $(HELPLOC)
	chmod $(HELPMOD) $(HELPLOC)/vim.hlp

clean:
	-rm -f $(OBJ) mkcmdtab.o version.o core $(TARGET) mkcmdtab cmdtab.h
	-rm -f *.bak

#use this in case the files have been transported via an MSDOS system

FILES = *.c *.h makefile makefile.* cmdtab.tab proto/*.pro tags

dos2unix:
	-mv arp_prot.h arp_proto.h
	-mv ptx_stdl.h ptx_stdlib.h
	-mv sun_stdl.h sun_stdlib.h
	-mv makefile.dic makefile.dice
	-mv makefile.uni makefile.unix
	-mv makefile.man makefile.manx
	-mv makefile.6sa makefile.6sas
	-mv makefile.5sa makefile.5sas
	for i in $(FILES); do tr -d '\r\032' < $$i > ~tmp~; mv ~tmp~ $$i; echo $$i; done

###########################################################################

alloc.o:	alloc.c  $(INCL)
	$(CC) $(CFLAGS) alloc.c

unix.o:	unix.c  $(INCL)
	$(CC) $(CFLAGS) unix.c

buffer.o:	buffer.c  $(INCL)
	$(CC) $(CFLAGS) buffer.c

charset.o:	charset.c  $(INCL)
	$(CC) $(CFLAGS) charset.c

cmdcmds.o:	cmdcmds.c  $(INCL)
	$(CC) $(CFLAGS) cmdcmds.c

cmdline.o:	cmdline.c  $(INCL) cmdtab.h ops.h
	$(CC) $(CFLAGS) cmdline.c

csearch.o:	csearch.c  $(INCL)
	$(CC) $(CFLAGS) csearch.c

digraph.o:	digraph.c  $(INCL)
	$(CC) $(CFLAGS) digraph.c

edit.o:	edit.c  $(INCL) ops.h
	$(CC) $(CFLAGS) edit.c

fileio.o:	fileio.c  $(INCL)
	$(CC) $(CFLAGS) fileio.c

getchar.o:	getchar.c  $(INCL)
	$(CC) $(CFLAGS) getchar.c

help.o:	help.c  $(INCL)
	$(CC) $(CFLAGS) help.c

linefunc.o:	linefunc.c  $(INCL)
	$(CC) $(CFLAGS) linefunc.c

main.o:	main.c  $(INCL)
	$(CC) $(CFLAGS) main.c

mark.o:	mark.c  $(INCL)
	$(CC) $(CFLAGS) mark.c

memfile.o:	memfile.c  $(INCL)
	$(CC) $(CFLAGS) memfile.c

memline.o:	memline.c  $(INCL)
	$(CC) $(CFLAGS) memline.c

message.o:	message.c  $(INCL)
	$(CC) $(CFLAGS) message.c

misccmds.o:	misccmds.c  $(INCL)
	$(CC) $(CFLAGS) misccmds.c

normal.o:	normal.c  $(INCL) ops.h
	$(CC) $(CFLAGS) normal.c

ops.o:	ops.c  $(INCL) ops.h
	$(CC) $(CFLAGS) ops.c

param.o:	param.c  $(INCL)
	$(CC) $(CFLAGS) param.c

quickfix.o:	quickfix.c  $(INCL)
	$(CC) $(CFLAGS) quickfix.c

regexp.o:	regexp.c  $(INCL)
	$(CC) $(CFLAGS) regexp.c

regsub.o:	regsub.c  $(INCL)
	$(CC) $(CFLAGS) regsub.c

screen.o:	screen.c  $(INCL)
	$(CC) $(CFLAGS) screen.c

search.o:	search.c  $(INCL) ops.h
	$(CC) $(CFLAGS) search.c

tag.o:	tag.c  $(INCL)
	$(CC) $(CFLAGS) tag.c

term.o:	term.c  $(INCL)
	$(CC) $(CFLAGS) term.c

undo.o:	undo.c  $(INCL)
	$(CC) $(CFLAGS) undo.c

window.o:	window.c  $(INCL)
	$(CC) $(CFLAGS) window.c

cmdtab.h: cmdtab.tab mkcmdtab
	./mkcmdtab cmdtab.tab cmdtab.h

mkcmdtab: mkcmdtab.o
	$(CC) -o mkcmdtab mkcmdtab.o

mkcmdtab.o: mkcmdtab.c
	$(CC) $(CFLAGS) mkcmdtab.c