# -*- Mode: Makefile -*-
#
# $Header: /home/gene/library/website/docsrc/wel/RCS/Makefile.w32,v 395.2 2008/07/25 05:07:22 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 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 General Public License for more details.
#
# You should have received a copy of the GNU 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 /W4
COMPILE_c=$(CC) $(CFLAGS) /c
LINK_c=$(CC) $(CFLAGS)

CXX=cl
CXXFLAGS=/nologo /W4 /EHsc
COMPILE_cxx=$(CXX) $(CXXFLAGS) /c
LINK_cxx=$(CXX) $(CXXFLAGS)

LIBS=lib/this.lib Advapi32.lib strsafe.lib User32.lib

all :	\
	bin/insert-log.exe \
	bin/print-log.exe \
	bin/test0000.exe

check : all
	bin\test0000

HEADERS=src\elog.h src\pl.h src\tab.h src\this.h src\xml.h

bin/insert-log.exe : src/insert-log.cxx lib/this.lib $(HEADERS)
	$(LINK_cxx) /Febin\insert-log.exe src\insert-log.cxx $(LIBS)

bin/print-log.exe : src/print-log.cxx lib/this.lib $(HEADERS)
	$(LINK_cxx) /Febin\print-log.exe src\print-log.cxx $(LIBS)

OBJS=tmp\elog.obj tmp\getopt.obj tmp\lisp.obj tmp\log.obj tmp\pl.obj tmp\tab.obj tmp\xml.obj

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

tmp/elog.obj : src/elog.cxx
	$(COMPILE_cxx) src\elog.cxx /Fotmp\elog.obj

tmp/getopt.obj : src/getopt.cxx
	$(COMPILE_cxx) src\getopt.cxx /Fotmp\getopt.obj

tmp/lisp.obj : src/lisp.cxx $(HEADERS)
	$(COMPILE_cxx) src\lisp.cxx /Fotmp\lisp.obj

tmp/log.obj : src/log.cxx
	$(COMPILE_cxx) src\log.cxx /Fotmp\log.obj

tmp/pl.obj : src/pl.cxx
	$(COMPILE_cxx) src\pl.cxx /Fotmp\pl.obj

tmp/tab.obj : src/tab.cxx $(HEADERS)
	$(COMPILE_cxx) src\tab.cxx /Fotmp\tab.obj

tmp/xml.obj : src/xml.cpp
	$(COMPILE_cxx) src\xml.cpp /Fotmp\xml.obj

bin/test0000.exe : src/test0000.c
	$(LINK_c) src\test0000.c /Febin\test0000.exe

# --- end of file ---
