## Makefile for 8-bit Bibtex (win32 version)		-*- Makefile -*-
## Time-stamp: "97/08/02 14:06:28 mik"

!include ..\miktex.inc

srcdir = .
docdir = $(prefix)\doc\bibtex8

BIBTEX_DEFINES = -DSUPPORT_8BIT

.c.obj:
	$(CC) -c $(BIBTEX_DEFINES) -DMIKTEX -DMIKTEX_DLL \
		-I$(libdir) $(release_info) \
		-MD -O2 $(cflags) $(CFLAGS) $*.c

HDRFILES = bibtex.h datatype.h gblprocs.h gblvars.h sysdep.h \
		utils.h version.h

OBJFILES = bibtex.obj \
		bibtex-1.obj bibtex-2.obj bibtex-3.obj bibtex-4.obj \
		utils.obj

all: bibtex8.exe

bibtex8.exe: $(OBJFILES)
	link -out:$@ $(ldflags) $(LDFLAGS) $(OBJFILES) \
		advapi32.lib $(libdir)\miktex.lib

install: bibtex8.exe 00readme.txt HISTORY csfile.txt file_id.diz
	$(INSTALL_PROGRAM) bibtex8.exe $(bindir)\bibtex8.exe
	$(INSTALL_DATA) 00readme.txt $(docdir)\00readme.txt
	$(INSTALL_DATA) HISTORY $(docdir)\HISTORY
	$(INSTALL_DATA) csfile.txt $(docdir)\csfile.txt
	$(INSTALL_DATA) file_id.diz $(docdir)\file_id.diz

clean:
	-del *.obj
	-del *.exe
	-del *.ilk
	-del *.pdb

distclean: clean
	-del *.opt
	-del makefile.win32.bak

depend: bibtex.c bibtex-1.c bibtex-2.c bibtex-3.c bibtex-4.c utils.c
	makedepend -f makefile.win32 -I. -I..\lib $**
# DO NOT DELETE

bibtex.obj: sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h utils.h
bibtex.obj: version.h
bibtex-1.obj: sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h utils.h
bibtex-1.obj: version.h
bibtex-2.obj: sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h utils.h
bibtex-2.obj: version.h
bibtex-3.obj: sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h utils.h
bibtex-3.obj: version.h
bibtex-4.obj: sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h utils.h
bibtex-4.obj: version.h
utils.obj: ..\lib/getopt.h sysdep.h bibtex.h datatype.h gblprocs.h gblvars.h
utils.obj: utils.h version.h
