#
# Makefile for Vim on Unix, using gcc or standard cc
#
MAKE = make
CSH = csh
TARGET = $(JVIM) $(JGREP) $(JFOLD) $(JCAT)

# Mail Domain for URL support
# $B$3$3$K!"%a%$%k%"%I%l%9$N%I%a%$%sL>$r@_Dj$7$F$/$@$5$$!#(B
#
# example: MDOMAIN = -DMDOMAIN=\"mrit.mei.co.jp\"
#
MDOMAIN = -DMDOMAIN=\"Set.Your.Mail.Domain\"

#
#>>>>> choose Japanese Kanji code
#JPCODE = -DJP=\".NN\"
#JPCODE = -DJP=\".EE\"
#JPCODE = -DJP=\".NN\" -DJPFEP

#>>>>> ONEW specific options
JPDEF = -DONEW -DWNN_ISDIR		# Wnn + Canna / Onew
JPLIB = -lonew -ljd -lcanna		# Wnn + Canna / Onew
#JPDEF = -DONEW				# Canna / Onew
#JPLIB = -lonew -lcanna			# Canna / Onew
#JPDEF = -DONEW -DWNN_ISDIR		# Wnn / Onew
#JPLIB = -lonew -ljd			# Wnn / Onew
#JPDEF=					# no Onew
#JPLIB=					# no Onew


#>>>>> choose one compiler
### standard C compiler, with optimizer, debugger or vanilla
CC=cc -O
#CC=cc -g


#>>>>> Japanese specific Library paths
#
#	paths containing jp specific libraries (libonew, libjd, libcanna)
JPLIBPATH = -L../../onew		\
	    -L../onew			\
	    -L/usr/local/canna/lib	\
	    -L/usr/local/wnn/jlib.V3	\
	    -L/usr/lib/wnn		\
	    -L/usr/i18n/lib		\
	    -L/usr/X386/lib		\
	    -L/usr/local/X11R5/lib	\
	    -L/usr/local/lib		\
	    -L/usr/lib
######################################################################

all:
	@$(MAKE) 'JPCODE = -DJP=\".NN\"' system

euc:
	@$(MAKE) 'JPCODE = -DJP=\".EE\"' system

sjis:
	@$(MAKE) 'JPCODE = -DJP=\",SS\"' system

system:
	@$ if [ -x /bin/uname -o -x /usr/bin/uname ] ; then		\
	   	$(MAKE) 'JPCODE=$(JPCODE)' `uname` ;			\
	   elif [ -d /usr/lib/NextStep ] ; then				\
	   	$(MAKE) 'JPCODE=$(JPCODE)' NeXT ;			\
	   else 							\
		echo 'Your system does not have uname command.';	\
		echo "type 'make NEWS'	    for SONY NEWS(4.x)";	\
		echo "type 'make PureBSD43' for 4.3BSD";		\
		echo "type 'make BSD'       for other BSD systems";	\
		echo "type 'make USL'       for System V release 4";	\
		echo "type 'make SYSV'      for other System V";	\
		exit ;							\
	   fi

#>>>>>> choose BSD for bsd (SONY NEWS, OMRON LUNA/MACH), 
#	   or SYSV for SystemV,
#	   or USL for SystemV Rel.4,
#	   or CONVEX for Convex
#	   or DOMAIN for Apollo DOMAIN (with SYSTYPE = bsd4.3)
#          or UNICOS
#	   or UTS2 for Amdahl UTS 2.1.x (disable termcap below)
#	   or UTS4 for Amdahl UTS 4.x
#	@$(MAKE) BSD
#	@$(MAKE) SYSV
#	@$(MAKE) USL
#
# For the following systems, I do not know the value of 'uname' command,
# and, thus, not examined.
#	@$(MAKE) DOMAIN
#	@$(MAKE) CONVEX
#	@$(MAKE) UNICOS
#	@$(MAKE) UTS2
#	@$(MAKE) UTS4
# If you try and construct, or find some problems, on the system below
# or the system not listed,
# let me know the better way to identify the the system.

#>>>>> Set system specific options
#
# 	Set MACHINE, LIBS and CC for your system
#
#	Ex.
#	  C compiler
#		'CC=gcc -O -Wall -traditional'			gcc
#		'CC=gcc -O6 -g -fpcc-struct-return -fwritable-strings'
#								gcc/SCO Unix
#		'CC=clcc -O'					CenterLine cc
#	  Libralies
#		'LIBS = -ltermcap' 		  HPUX, NeXT and others
#		'LIBS = -ltermlib -lsocket'	  UTS 2.1.6a (Amdahl UTS, _UTS will be defined)
#		'LIBS = -ltinfo' 		  SCO UNIX 3.2
#		'LIBS = -ltermlib -lmalloc'	  some SCO UNIX with gcc
#		'LIBS = ' 			  without TERMCAP defined
#	  Japanese
#		'JPDEF = -DONEW' 'JPLIB = -lonew -lcanna'	   # ONEW/Canna
#		'JPDEF = -DONEW -DWNN_ISDIR' 'JPLIB = -lonew -ljd' # ONEW/Wnn
#		'JPDEF =' 'JPLIB ='				   # no ONEW
#		'JPCODE=' 'JPDEF =' 'JPLIB ='			   # non-JP
#

#
#	major systems
#
BSD MACH ULTRIX BSD/386:
	@echo 'Barkley Standard Distribution'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'

USL panix:
	@echo 'Unix System V Release 4'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DUSL'	\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'

SYSV:
	@echo 'Unix System V'
	$(MAKE) $(TARGET)	\
		'MACHINE = -DSYSV_UNIX'		\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'	

#
#	uname supported systems
#
#	Canna$B$N$_!"(BWnn$B$N$_$H$$$&J}$O!"<!$N9T$r%+%C%H(B&$B%Z!<%9%H$7$F$/$@$5$$!#(B
#
#		'JPDEF = -DONEW' 'JPLIB = -lonew -lcanna'	   # ONEW/Canna
#		'JPDEF = -DONEW -DWNN_ISDIR' 'JPLIB = -lonew -ljd' # ONEW/Wnn

#SunOS4: SunOS4-gcc
SunOS4: SunOS4-cc

SunOS4-cc panaOS/S:
	@echo 'Sun SunOS 4.1.X'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'

SunOS4-gcc:
	@echo 'Sun SunOS 4.1.X'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'		\
		'CC = gcc -O2 -Wall'

#SunOS5: SunOS5-gcc
SunOS5: SunOS5-acc

SunOS5-acc:
	@echo 'Sun Solaris 2.X(acc)'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO'	\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'		\
		'CC = /opt/SUNWspro/bin/cc -O'

SunOS5-gcc:
	@echo 'Sun Solaris 2.X(gcc)'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO'	\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'		\
		'CC = gcc -O2 -Wall'

FreeBSD:
	@echo 'FreeBSD'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'		\
		'CC = gcc -O2 -Wall'

# for FreeBSD before 2.0.5R, 'LIBS = -ltermcap -lcompat' may be needed.

NetBSD:
	@echo 'NetBSD'
	$(MAKE) $(TARGET)		\
		'MACHINE = -DBSD_UNIX'	\
		'CC = gcc -O2 -Wall'

AIX3.2:
	@echo 'AIX 3.2'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DAIX'	\
		'LIBS = -lcur'
AIX3.1:
	@echo 'AIX 3.1'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DAIX -DAIX31'	\
		'CC = gcc -O -Wall'			\
		'LIBS = -lcur'

OSF1:
	@echo 'OSF1/DEC Alpha'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'		\
		'CC = cc -O'

HP-UX:
	@echo 'HP-UX'
	LANG=C;export LANG;$(MAKE) 'MACHINE = -DBSD_UNIX -DTERMINFO' $(TARGET)

HI-UX:
	@echo 'HI-UX'
	LANG=C;export LANG;$(MAKE) 'MACHINE = -DBSD_UNIX -DTERMINFO' 'CC = /bin/cc -O' $(TARGET)

IRIX5:
	@echo 'IRIX Release 5'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DUSL'	\
		'LIBS = -ltermlib -lmalloc -lc_s'

IRIX4:
	@echo 'IRIX Release 4'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX'		\
		'CC = cc -cckr'			\
		'LIBS = -ltermlib -lmalloc -lc_s'

Linux:
	@echo 'Linux'
	$(MAKE) $(TARGET) \
		'MACHINE = -DBSD_UNIX'		\
		'CC=gcc -O2 -Wall'

EWS3:
	@echo 'NEC EWS4800' `uname -r`
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX'			\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'

EWS4:
	@echo 'NEC EWS4800' `uname -r` 'with Canna/Onew'
	$(MAKE) $(TARGET) \
		'CC = /usr/abiccs/bin/cc -KOlimit=1200'	\
		'MACHINE = -DSYSV_UNIX -DUSL'		\
		'LIBS = -ltermlib -lsocket -lnsl -lgen'

NEWS-OS:
	@echo 'SONY NEWS-OS' `uname -r`
	$(MAKE) $(TARGET)	\
		'MACHINE = -DSYSV_UNIX -DUSL -DSONY_NEWS_SVR4'  \
		'CC=cc -O -Olimit 2000' 			\
		'LIBS = -lcurses -lsocket -lnsl -lgen'

NEWS:
	@echo 'SONY NEWS-OS 4.X'
	@echo '-----------------------------------------------'
	@echo 'If you are making for RISC version of NEWS,'
	@echo 'type "make NEWS_R" for a little optimized code.'
	@echo '-----------------------------------------------'
	$(MAKE) $(TARGET)	\
		'MACHINE = -DBSD_UNIX -DSONY_NEWS_BSD'

NEWS_R:
	@echo 'SONY NEWS-OS 4.X with a little optimization'
	$(MAKE) $(TARGET)	\
		'MACHINE = -DBSD_UNIX -DSONY_NEWS_BSD'		\
		'CC=cc -O -Olimit 2000'

A/UX:
	@echo 'Apple Macintosh A/UX3.01'
	cp /lib/libPW.a .
	ar x libPW.a regex.o
	ar x libPW.a regcmp.o
	$(MAKE) $(TARGET)                       \
		'MACHINE = -DSYSV_UNIX -DAUX3'  \
		'LIBS = -ltermcap ./regcmp.o ./regex.o'	\
		'JPLIBPATH = -L/usr/local/canna/lib -L/usr/local/lib'

NeXT/i386:
	@echo 'NeXT step / Intel 80386'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'

NeXT/mc68K:
	@echo 'NeXT step / Motorola 68000'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX'

PureBSD43:
	@echo 'Pure 4.3BSD'
	$(MAKE) $(TARGET)			\
		'MACHINE = -DBSD_UNIX -DPureBSD43'

#
#	Release dependent systems
#

SunOS :
	@echo 'SunOS '
	@$(MAKE) SunOS`uname -r | sed -e '1s/^\(.\).*/\1/`

IRIX :
	@echo 'Silicon Graphics '
	@$(MAKE) IRIX`uname -r | sed -e '1s/^\(.\).*/\1/`

AIX :
	@echo 'IBM RS6000 AIX'
	@$(MAKE) AIX`uname -v`.`uname -r`

UNIX_System_V:
	@echo 'NEC EWS4800 UNIX_System_V Release <= 9.2'
	@$(MAKE) EWS`uname -r | sed -e '1s/^\(.\).*/\1/`

UNIX_SV:
	@echo 'NEC EWS4800 UNIX_System_V Release >= 10.1'
	@$(MAKE) EWS`uname -r | sed -e '1s/^\(.\).*/\1/`

NeXT:
	@echo 'NeXT step'
	@if [ -f /usr/bin/arch -a `arch` = i386 ]; then \
	 	$(MAKE) NeXT/i386 ; \
	 else \
		$(MAKE) NeXT/mc68K; \
	 fi

#
# non-examined systems. ('uname' is not known.)
#
DOMAIN:
	@echo 'Constructing on Appolo DOMAIN.'
	$(MAKE) $(TARGET) \
		'MACHINE = -DBSD_UNIX -DDOMAIN'	\
		'CC=cc -O -A systype,bsd4.3'

CONVEX:
	@echo 'Constructing on CONVEX.'
	$(MAKE) $(TARGET) \
		'MACHINE = -DBSD_UNIX -DCONVEX'

UNICOS:
	@echo 'Constructing on UNICOS.'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DUNICOS'

UTS2:
	@echo 'Constructing on UTS2.'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DUTS2'

UTS4:
	@echo 'Constructing on UTS4.'
	$(MAKE) $(TARGET) \
		'MACHINE = -DSYSV_UNIX -DUTS4 -Xa'


#>>>>> choose options for install
### Name of target
JVIM  = jvim
JCAT  = jcat
JFOLD = jfold
JGREP = jgrep

### Prefix for location of files
PREFIX = /usr/local/jvim2.0

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

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

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

### Permissions for vim binary
BINMOD = 755

### Permissions for man page
MANMOD = 644

### Permissions for help file
HELPMOD = 644

MANFILE = jvim.1

HELPFILE = jvim.hlp

#>>>>> choose options:
### -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 file support
### -DTERMINFO		use terminfo entries for builtin termcaps
### -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
### -DJVIMRC_FILE	name of the .jvimrc file in current dir
### -DVIMRC_FILE	name of the .vimrc file in current dir
### -DEXRC_FILE		name of the .exrc file in current dir
### -DSYSJVIMRC_FILE	name of the global .jvimrc file
### -DSYSVIMRC_FILE	name of the global .vimrc file
### -DSYSEXRC_FILE	name of the global .exrc file
### -DDEFVIMRC_FILE	name of the system-wide .vimrc file
### -DVIM_HLP		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
### -DSCO		SCO UNIX
### -UM_XENIX		needed on SCO UNIX when using gcc
DEFS = -DTERMCAP -DSOME_BUILTIN_TCAPS -DNO_FREE_NULL \
	-DSYSJVIMRC_FILE=\"\$$HOME/.jvimrc\" \
	-DSYSVIMRC_FILE=\"\$$HOME/.vimrc\" -DSYSEXRC_FILE=\"\$$HOME/.exrc\" \
	-DDEFVIMRC_FILE=\"/etc/vimrc\" -DVIM_HLP=\"$(HELPLOC)/$(HELPFILE)\" \
	$(JPCODE) $(JPDEF) $(MDOMAIN)

#>>>>> link with termlib or termcap only if TERMCAP is defined
### default
LIBS = -ltermcap


#>>>>> end of choices
###########################################################################

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

INCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h unix.h \
	debug.h jp.h

OBJ =	alloc.o unix.o buffers.o charset.o cmdline.o csearch.o digraph.o \
	edit.o fileio.o help.o linefunc.o mark.o message.o misccmds.o \
	normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \
	script.o search.o storage.o tag.o term.o undo.o jp.o jpfep.o track.o \
	url.o

GENOBJ = Gjp.o Gregexp.o

JVIMOBJ  = main.o  $(OBJ)
JGREPOBJ = $(JGREP).o $(GENOBJ)
JCATOBJ  = $(JCAT).o  $(GENOBJ)
JFOLDOBJ = $(JFOLD).o $(GENOBJ)

Gjp.o:		jp.c jptab.h
	@$(CSH) -f -c "if (! -f Gjp.c) ln -s jp.c Gjp.c"
	$(CC) $(CFLAGS) -DGENERAL		Gjp.c
Gregexp.o:	regexp.c
	@$(CSH) -f -c "if (! -f Gregexp.c) ln -s regexp.c Gregexp.c"
	$(CC) $(CFLAGS) -DGENERAL -DEMPTY_RE	Gregexp.c

$(JVIM): $(JVIMOBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(JVIM) $(JVIMOBJ) version.o $(JPLIBPATH) $(JPLIB) $(LIBS)

$(JGREP): $(JGREPOBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(JGREP) $(JGREPOBJ) version.o $(LIBS)

$(JCAT): $(JCATOBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(JCAT) $(JCATOBJ) version.o $(LIBS)

$(JFOLD): $(JFOLDOBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(JFOLD) $(JFOLDOBJ) version.o $(LIBS)

debug: $(JVIMOBJ) version.c
	$(CC) $(CFLAGS) version.c
	$(CC) -o $(JVIM)  -g $(JVIMOBJ)  version.o $(JPLIBPATH) $(JPLIB) $(LIBS)
	$(CC) -o $(JGREP) -g $(JGREPOBJ) version.o $(JPLIBPATH) $(JPLIB) $(LIBS)

ctags:
	$(CSH) -c ctags *.c *.h

install:
	@$(CSH) -f -c "if (! -d $(PREFIX)) mkdir $(PREFIX)"
	@$(CSH) -f -c "if (! -d $(BINLOC)) mkdir $(BINLOC)"
	cp $(JVIM) $(BINLOC)
	chmod  $(BINMOD) $(BINLOC)/$(JVIM)
	@$(CSH) -f -c "cd $(BINLOC); if (! -f jview) ln -s $(JVIM) jview"
	cp $(JGREP) $(BINLOC)
	chmod  $(BINMOD) $(BINLOC)/$(JGREP)
	cp $(JCAT) $(BINLOC)
	chmod  $(BINMOD) $(BINLOC)/$(JCAT)
	cp $(JFOLD) $(BINLOC)
	chmod  $(BINMOD) $(BINLOC)/$(JFOLD)
	@$(CSH) -f -c "if (! -d $(MANDIR)) mkdir $(MANDIR)"
	@$(CSH) -f -c "if (! -d $(MANLOC)) mkdir $(MANLOC)"
	cp ../doc/$(MANFILE) $(MANLOC)
	chmod $(MANMOD) $(MANLOC)/$(MANFILE)
	cp ../doc/$(JGREP).1   ../doc/$(JGREP).man $(MANLOC)
	chmod $(MANMOD) $(MANLOC)/$(JGREP).1 $(MANLOC)/$(JGREP).man
	cp ../doc/$(JCAT).1    ../doc/$(JCAT).man  $(MANLOC)
	chmod $(MANMOD) $(MANLOC)/$(JCAT).1  $(MANLOC)/$(JCAT).man
	cp ../doc/$(JFOLD).1   ../doc/$(JFOLD).man $(MANLOC)
	chmod $(MANMOD) $(MANLOC)/$(JFOLD).1 $(MANLOC)/$(JFOLD).man
	@$(CSH) -f -c "if (! -d $(HELPLOC)) mkdir $(HELPLOC)"
	cp ../doc/$(HELPFILE) $(HELPLOC)
	chmod $(HELPMOD) $(HELPLOC)/$(HELPFILE)
	@chmod 755 $(PREFIX) $(BINLOC) $(MANLOC) $(HELPLOC)
	@echo "Installed with $(MDOMAIN)"

install-doc:
	@$(CSH) -f -c "if (! -d $(PREFIX)/doc) mkdir $(PREFIX)/doc"
	@$(CSH) -f -c "if (! -d $(PREFIX)/tutor) mkdir $(PREFIX)/tutor"
	cp ../doc/* $(PREFIX)/doc
	@rm $(PREFIX)/doc/$(MANFILE)
	@rm $(PREFIX)/doc/$(JGREP).1 $(PREFIX)/doc/$(JGREP).man
	@rm $(PREFIX)/doc/$(JCAT).1  $(PREFIX)/doc/$(JCAT).man
	@rm $(PREFIX)/doc/$(JFOLD).1 $(PREFIX)/doc/$(JFOLD).man
	cp ../tutor/* $(PREFIX)/tutor
	cp ../README.jvim $(PREFIX)/doc
	cp ../uganda.jp $(PREFIX)/doc
	chmod 755 $(PREFIX)/doc $(PREFIX)/tutor
	chmod $(HELPMOD) $(PREFIX)/doc/* $(PREFIX)/tutor/*

patch:
	@make -f makefile.junx clean
	-(rm -f Makefile ; make -f makefile.junx patch-gen)

patch-gen:
	-(cd ..; diff -c -r ../vim . > jp/diff; cd src)
	(cd ..; tar cf jp/files-doc README.jvim *.jp doc/jvim.* doc/*.jp)
	(cd ..; tar cf jp/files-src src/jp* src/track* src/makefile.junx)
	(cd ..; gzip jp/files-src jp/files-doc jp/diff)

clean:
	-rm -f $(OBJ) $(GENOBJ) mkcmdtab.o version.o
	-rm -f core $(JVIM) $(JGREP) $(JCAT) $(JFOLD) mkcmdtab cmdtab.h
	-rm -f $(JGREP).o $(JCAT).o $(JFOLD).o main.o
	-rm -f Gjp.c Gregexp.c
	-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) unix.h
	$(CC) $(CFLAGS) unix.c

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

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

cmdline.o:	cmdline.c  $(INCL) cmdtab.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)
	$(CC) $(CFLAGS) edit.c

fileio.o:	fileio.c  $(INCL)
	$(CC) $(CFLAGS) fileio.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

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

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

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

storage.o:	storage.c  $(INCL)
	$(CC) $(CFLAGS) storage.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

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

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

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

jp.o: jp.c $(INCL) jptab.h
	$(CC) $(CFLAGS) jp.c

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

jptab.h: jptab.c
	$(CC) -o jptab jptab.c
	./jptab >jptab.h
	rm jptab

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



syntax highlighted by Code2HTML, v. 0.9.1