# Makefile for libx2bc library - Microsoft Visual C
#
# Author: 
#   doubleshadow
#
# usage: 
#   nmake all
#   nmake library    (libx2bc.dll)
#   nmake clean      (deletes all files created during compilation)

CPP = cl
LD = link
RC = rc

CPPFLAGS = -nologo /MD /O2 /G7 /W3 /FD /TP /Wp64 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"
LDFLAGS = -nologo -release -opt:ref -opt:icf -opt:nowin98
RCFLAGS = /d_WIN32
OBJS = bob_dom.obj bob_dom_bob.obj bob_dom_cut.obj bod_parser_base.obj bod_bob_parser.obj bod_cut_parser.obj bod_parser.obj bod_text_parser.obj bob_dom_frame.obj indian.obj libx2bc.obj settings.obj strutils.obj version.obj

SHAREDLIB = libx2bc.dll
IMPLIB = libx2bc.lib

$(SHAREDLIB): libx2bc.def $(OBJS) libx2bc.res
	$(LD) $(LDFLAGS) -dll -def:libx2bc.def -out:$@ -implib:$(IMPLIB) $(OBJS) libx2bc.res version.lib

.cpp.obj::
	$(CPP) $(CPPFLAGS) /c $<

{../common}.cpp.obj::
	$(CPP) $(CPPFLAGS) /c $<

{../x2bc_common}.cpp.obj::
	$(CPP) $(CPPFLAGS) /c $<

libx2bc.res: libx2bc.rc
	$(RC) $(RCFLAGS) /fo$@ libx2bc.rc

bob_dom.obj: ../x2bc_common/bob_dom.cpp

bod_parser_base.obj: ../x2bc_common/bod_parser_base.cpp

bob_dom_bob.obj: ../x2bc_common/bob_dom_bob.cpp

bob_dom_cut.obj: ../x2bc_common/bob_dom_cut.cpp

bod_bob_parser.obj: ../x2bc_common/bod_bob_parser.cpp

bod_cut_parser.obj: ../x2bc_common/bod_cut_parser.cpp

bod_parser.obj: ../x2bc_common/bod_parser.cpp

bod_text_parser.obj: ../x2bc_common/bod_text_parser.cpp

bob_dom_frame.obj: ../x2bc_common/bob_dom_frame.h

settings.obj: ../x2bc_common/settings.cpp

version.obj: ../x2bc_common/version.cpp

strutils.obj: ../common/strutils.cpp

libx2bc.obj: libx2bc.cpp

indian.obj: ../common/indian.cpp

library: $(SHAREDLIB)

all: library

rebuild: clean all

clean:
	-del *.obj
	-del libx2bc.exp
	-del $(SHAREDLIB)
	-del $(IMPLIB)
	-del libx2bc.res
	-del vc70.idb