########################################################################## # This program is Copyright (C) 1986-2002 by Jonathan Payne. JOVE is # # provided by Jonathan and Jovehacks without charge and without # # warranty. You may copy, modify, and/or distribute JOVE, provided that # # this notice is included in all the source files and documentation. # ########################################################################## # Makefile for Microsoft C version 8.0 (Visual C) # should also work with earlier versions # Once worked for MS VisualC++ 5.0 and MS VisualStudio 97 # Not recently tested (Windows and DOS packages now built with # mingw and Open Watcom C respectively). # # - supported targets: # + jjove.exe (build JOVE, but don't install it) # + jovedosx.zip (build executable JOVE kit for DOS) # + jovew32x.zip (build executable JOVE kit for Win32) # + clean # # - to install, do the following: # + copy jjove.exe where you wish # + copy doc/cmds.txt to /cmds.txt # + optional: copy some jove rc (none supplied) file to /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. # Visual Studio 2019 only works for Win32, Dos is part of the past. # For DOS, use the Open Watcom compiler, see Makefile.wat. WIN32=1 !if "$(DEBUG)" != "" DEB = -Gs -Od -Zi -DDEBUG !else DEB = -Ox -D_NDEBUG DEBLDFLAGS= !endif !IF "$(WIN32)" == "1" 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 generate archives for redistributing JOVE executables and docs. ZIP = pkzip TMPDIR = c:/tmp RECDIR = c:/tmp # BINDIR = c:/jove # LIBDIR and SHAREDIR are relative to BINDIR LIBDIR = SHAREDIR = doc 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 \ para.obj proc.obj re.obj reapp.obj rec.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 para.h proc.h \ re.h reapp.h rec.h scandir.h screen.h \ sysdep.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 recover.exe $(BROWSE_TGT) jjove.exe: $(OBJECTS) $(HEADERS) $(RESOURCE) !IF "$(WIN32)" != "" link /OUT:jjove.exe /MAP $(LIBS) @< keys.c keys.obj: keys.c jove.h $(CC) $(CFLAGS) -c keys.c clean: -del *.obj setmaps.exe keys.c *.bak *.map *.pdb *.vcp jove.lnk