# -*- Mode: Makefile -*-
#
# $Header: /home/gene/library/website/docsrc/vwu/RCS/Makefile.w32,v 395.1 2008/04/20 17:25:48 gene Exp $
#
# Copyright (c) 2006 Gene Michael Stover.  All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
# USA
#

#
# Makefile for Microsloth Winders.
# Instead of running "nmake -fMakefile.w32", it's probably better
# to run ".\build".
#

CC=cl
CFLAGS=/nologo
COMPILE_c=$(CC) $(CFLAGS) /c
LINK_c=$(CC) $(CFLAGS)

LIBS=lib\this.lib Vfw32.lib User32.lib Gdi32.lib Comdlg32.lib

HEADERS=src/bzero.h src/cfg.h src/frame.h src/gwp.h src/log.h src/msgmap.h src/this.h src/types.h src/vidf.h src/xmalloc.h

all :	\
	bin/avi-ar.exe \
	bin/bitmap.exe \
	bin/choose-compressor.exe\
	bin/enum-icinfo.exe \
	bin/test0000.exe

check : all
	bin\test0000

bin/avi-ar.exe : tmp/avi-ar.obj lib/this.lib
	link /NOLOGO /OUT:bin\avi-ar.exe tmp\avi-ar.obj $(LIBS)

tmp/avi-ar.obj : src/avi-ar.c $(HEADERS)
	$(COMPILE_c) src\avi-ar.c /Fotmp\avi-ar.obj

bin/bitmap.exe : tmp/bitmap.obj lib/this.lib
	link /NOLOGO /OUT:bin\bitmap.exe tmp\bitmap.obj $(LIBS)

tmp/bitmap.obj : src/bitmap.c $(HEADERS)
	$(COMPILE_c) src\bitmap.c /Fotmp\bitmap.obj

bin/choose-compressor.exe : tmp/choose-compressor.obj
	link /NOLOGO /OUT:bin\choose-compressor.exe tmp\choose-compressor.obj $(LIBS)

tmp/choose-compressor.obj : src/choose-compressor.c $(HEADERS)
	$(COMPILE_c) src\choose-compressor.c /Fotmp\choose-compressor.obj

bin/enum-icinfo.exe : tmp/enum-icinfo.obj
	link /NOLOGO /OUT:bin\enum-icinfo.exe tmp\enum-icinfo.obj $(LIBS)

tmp/enum-icinfo.obj : src/enum-icinfo.c $(HEADERS)
	$(COMPILE_c) src\enum-icinfo.c /Fotmp\enum-icinfo.obj

OBJS=tmp\bzero.obj tmp\cfg.obj tmp\frame.obj tmp\getopt.obj tmp/gwp.obj tmp\log.obj tmp\msgmap.obj tmp\vidf.obj tmp\xmalloc.obj

lib/this.lib : $(OBJS)
	lib /OUT:lib\this.lib $(OBJS)

tmp/bzero.obj : src/bzero.c $(HEADERS)
	$(COMPILE_c) src\bzero.c /Fotmp\bzero.obj

tmp/cfg.obj : src/cfg.c $(HEADERS)
	$(COMPILE_c) src\cfg.c /Fotmp\cfg.obj

tmp/frame.obj : src/frame.c $(HEADERS)
	$(COMPILE_c) src\frame.c /Fotmp\frame.obj

tmp/getopt.obj : src/getopt.c $(HEADERS)
	$(COMPILE_c) src\getopt.c /Fotmp\getopt.obj

tmp/gwp.obj : src/gwp.c $(HEADERS)
	$(COMPILE_c) src\gwp.c /Fotmp\gwp.obj

tmp/log.obj : src/log.c $(HEADERS)
	$(COMPILE_c) src\log.c /Fotmp\log.obj

tmp/msgmap.obj : src/msgmap.c $(HEADERS)
	$(COMPILE_c) src\msgmap.c /Fotmp\msgmap.obj

tmp/vidf.obj : src/vidf.c $(HEADERS)
	$(COMPILE_c) src\vidf.c /Fotmp\vidf.obj

tmp/xmalloc.obj : src/xmalloc.c $(HEADERS)
	$(COMPILE_c) src\xmalloc.c /Fotmp\xmalloc.obj

bin/test0000.exe : tmp/test0000.obj
	link /NOLOGO /OUT:bin\test0000.exe tmp\test0000.obj

tmp/test0000.obj : src/test0000.c
	$(COMPILE_c) src\test0000.c /Fotmp\test0000.obj

# --- end of file ---
