home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
jove-4.16-src.tgz
/
tar.out
/
bsd
/
jove
/
Makefile.msc
< prev
next >
Wrap
Makefile
|
1996-09-28
|
6KB
|
214 lines
########################################################################
# This program is Copyright (C) 1986-1996 by Jonathan Payne. JOVE is #
# provided to you without charge, and with no warranty. You may give #
# away copies of JOVE, including sources, provided that this notice is #
# included in all the files. #
########################################################################
# Makefile for Microsoft C version 8.0 (Visual C)
# should also work with earlier versions
#
# - supported targets:
# + jjove.exe (build JOVE, but don't install it)
# + jovedosx.zoo (build executable JOVE kit for DOS)
# + jovedosx.zip (build executable JOVE kit for DOS)
# + jovew32x.zoo (build executable JOVE kit for Win32)
# + jovew32x.zip (build executable JOVE kit for Win32)
# + clean
#
# - to install, do the following:
# + copy jjove.exe where you wish
# + copy doc/cmds.doc to <SHAREDIR>/cmds.doc
# + optional: copy some jove rc (none supplied) file to <SHAREDIR>/jove.rc
# Options (specify on MAKE command line with -D)
# DEBUG=1 : enable debugging, disable optimizations
# ARCH=0|2|3 : compile for 086/286/386 (-G option). Still 16-bit though.
!if "$(DEBUG)" != ""
DEB = -Gs -Od -Zi -DDEBUG
!else
DEB = -Ox -D_NDEBUG
DEBLDFLAGS=
!endif
!IF "$(WIN32)" != ""
SYSCFLAGS = -DWIN32
SYSLDFLAGS = /SUBSYSTEM:Console
SYSOBJS = win32.obj
LIBS = /DEFAULTLIB:USER32 /DEFAULTLIB:KERNEL32 /DEFAULTLIB:COMDLG32
OS = W32
!if "$(DEBUG)" != ""
DEBLDFLAGS= /DEBUG
!else
DEBLDFLAGS=
!endif
!ELSE # Not WIN32 - 16-bit DOS
!IF "$(ARCH)" == ""
ARCH = 0 # Default to 8086
!ENDIF
OS = DOS
MEM = L # M for medium or L for large
SYSCFLAGS = -A$(MEM) -J -Zp -G$(ARCH)
SYSLDFLAGS = /PACKC/NOE/NOI/MAP/E/STACK:0x2000
SYSOBJS = msgetch.obj ibmpcdos.obj
!if "$(DEBUG)" != ""
DEBLDFLAGS=/CO/F/B
!endif
!ENDIF # WIN32
!IF "$(BROWSE)" != ""
BROWSE_FLG = -FR
BROWSE_TGT = jjove.bsc
!ENDIF
CFLAGS = $(SYSCFLAGS) $(BROWSE_FLG) -nologo $(DEB)
#
# linker flags: for debugging use /NOE/NOI/F/B/PAC/CO/STACK:0x2000
#
LDFLAGS = $(SYSLDFLAGS) $(DEBLDFLAGS)
#
# set VPATH as below if you have sources in SRC
#
SRC = .
# VPATH = .;.. # should read .;$(SRC) - but doesn't work
# Other utilities used in build - defined here so they can be overridden
# Used to unpack binary sources. May not be needed if unpacked
# aready on a Unix archive.
UUDECODE = uudecode
# Used to generate archives for redistributing JOVE executables and docs.
ZOO = zoo
ZIP = pkzip
TMPDIR = c:/tmp
RECDIR = c:/tmp
LIBDIR = c:/jove
SHAREDIR = $(LIBDIR)
# BINDIR = c:/jove
DFLTSHELL = command
OBJECTS = keys.obj commands.obj abbrev.obj ask.obj buf.obj c.obj \
case.obj jctype.obj delete.obj extend.obj argcount.obj \
insert.obj io.obj jove.obj macros.obj marks.obj misc.obj mouse.obj move.obj \
paragraph.obj proc.obj re.obj reapp.obj scandir.obj \
list.obj keymaps.obj util.obj vars.obj wind.obj \
fmt.obj disp.obj term.obj fp.obj screen.obj \
$(SYSOBJS)
HEADERS = abbrev.h argcount.h ask.h buf.h c.h case.h chars.h commands.h \
jctype.h dataobj.h delete.h disp.h extend.h externs.h \
fmt.h fp.h insert.h io.h iproc.h jove.h \
keymaps.h list.h mac.h macros.h marks.h \
misc.h mouse.h move.h paragraph.h proc.h \
re.h reapp.h rec.h scandir.h screen.h \
sysdep.h sysprocs.h temp.h term.h ttystate.h \
tune.h util.h vars.h version.h wind.h
!IF "$(WIN32)" != ""
RESOURCE = jjove.res
!ENDIF
all: jjove.exe $(BROWSE_TGT)
jjove.exe: $(OBJECTS) $(HEADERS) $(RESOURCE)
!IF "$(WIN32)" != ""
link /OUT:jjove.exe /MAP $(LIBS) @<<jove.lnk $(LDFLAGS)
$(OBJECTS: = ^
)
setargv.obj
$(RESOURCE)
<<KEEP
!ELSE
link @<<jove.lnk $(LDFLAGS)
$(OBJECTS: = +^
) +
setargv.obj
jjove.exe
<<KEEP
!ENDIF
# Jove users note: don't confuse jjove.rc with jove.rc, which
# is the Jove setup script.
jjove.res: jjove.rc jjove.ico resource.h
$(RC) $(RCDEFINES) -r jjove.rc
jjove.bsc: $(OBJECTS:.obj=.sbr)
bscmake @<<
/o $@ $(OBJECTS:.obj=.sbr)
<<
jove.obj: paths.h
vars.obj: vars.tab
commands.obj: commands.tab
setmaps.obj: vars.tab commands.tab
# Compensate for 8.3 naming (or lack thereof)
!IF "$(WIN32)" == ""
paragraph.h:
if exist paragr~1.h rename paragr~1.h paragraph.h
paragraph.c:
if exist paragr~1.c rename paragr~1.c paragraph.c
!ELSE
paragraph.h:
if exist paragrap.h rename paragrap.h paragraph.h
paragraph.c:
if exist paragrap.c rename paragrap.c paragraph.c
!ENDIF
jove$(OS)x.zoo: paths.h jjove.exe
-del jove$(OS)x.zoo
-del jove.exe
rename jjove.exe jove.exe
$(ZOO) -add jove$(OS)x.zoo jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.$(OS)
jove$(OS)x.zip: paths.h jjove.exe
-del jove$(OS)x.zip
-del jove.exe
rename jjove.exe jove.exe
$(ZIP) -aP jove$(OS)x.zip jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.$(OS)
paths.h: makefile.msc
@echo Making <<paths.h
/* Changes should be made in Makefile, not to this file! */
#define TMPDIR "$(TMPDIR)"
#define RECDIR "$(RECDIR)"
#define LIBDIR "$(LIBDIR)"
#define SHAREDIR "$(SHAREDIR)"
#define DFLTSHELL "$(DFLTSHELL)"
<<KEEP
# The Jove icon target should be part of the distributed ZOO file, but
# if not this rule will build it.
jjove.ico: jjoveico.uue
$(UUDECODE) $**
!IFNDEF WIN32
ibmpcdos.obj: ibmpcdos.c jove.h
$(CC) $(CFLAGS) -I$(SRC) -NTscreen_text -c ibmpcdos.c
!ENDIF
$(OBJECTS): $(HEADERS)
setmaps.exe: setmaps.obj
cl /F 6000 setmaps.obj
setmaps.obj: commands.tab vars.tab keys.txt setmaps.c
keys.c: setmaps.exe keys.txt
setmaps < keys.txt > keys.c
keys.obj: keys.c jove.h
$(CC) $(CFLAGS) -I$(SRC) -c keys.c
clean:
-rm *.obj setmaps.exe keys.c *.bak *.map *.pdb *.vcp jove.lnk