## Makefile for BibTeX (Win32 version)		-*- Makefile -*-
## Time-stamp: "97/08/04 00:09:06 mik"

!include ..\miktex.inc

srcdir = .
bibtex_web = bibtex.web

.c.obj:
	$(CC) -c -I$(srcdir) -I$(libdir) -DMIKTEX_DLL $(release_info) \
			-MD -O2 $(cflags) $(CFLAGS) $<

all: bibtex.exe

bibtex.exe: bibtex.obj $(libdir)\miktex.lib bibtex.res
	link $(LDFLAGS) -out:$@ $**

bibtex.res: bibtex.rc $(libdir)\miktex.version $(libdir)\version.h
	rc -I$(libdir) bibtex.rc

bibtex.c bibtex.h: bibtex.p bibtex.ext
	$(C4P) $(C4PFLAGS) --rename link --rename index \
		--include-filename=miktex.h --one=bibtex bibtex.p
	type bibtex.ext >> bibtex.c

bibtex.p: $(bibtex_web) bibtex.win32-changes
	$(TANGLE) $(bibtex_web) $(srcdir)\bibtex.win32-changes \
				bibtex.p nul

install: bibtex.exe
	$(INSTALL_PROGRAM) bibtex.exe $(bindir)\bibtex.exe

uninstall:

mostlyclean:
	-del *.obj
	-del *.c
	-del *.h
	-del *.p
	-del *.res

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

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

realclean: distclean

depend: bibtex.c
	makedepend -f makefile.win32 -I. -I..\lib $**

# DO NOT DELETE

bibtex.obj: ..\lib\miktex.h ..\lib\c4plib.h bibtex.h
