# =========================================================================
#     This makefile was generated by
#     Bakefile 0.2.1 (http://bakefile.sourceforge.net)
#     Do not modify, all changes will be overwritten!
# =========================================================================

.autodepend

!ifndef BCCDIR
!ifndef MAKEDIR
!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4
!endif
BCCDIR = $(MAKEDIR)\..
!endif



# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------

# C++ compiler 
!ifndef CXX
CXX = bcc32
!endif

# Standard flags for C++ 
!ifndef CXXFLAGS
CXXFLAGS = 
!endif

# Standard preprocessor flags (common for CC and CXX) 
!ifndef CPPFLAGS
CPPFLAGS = -a8 -g0
!endif

# Standard linker flags 
!ifndef LDFLAGS
LDFLAGS = 
!endif

# Set to 1 to build debug version [0,1]
!ifndef DEBUG
DEBUG = 0
!endif

# Set to 1 to build shared (DLL) version [0,1]
!ifndef SHARED
SHARED = 0
!endif

# Set to 1 to compile samples [0,1]
!ifndef SAMPLES
SAMPLES = 1
!endif



# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------

### Variables: ###

MUPARSER_LIB_CXXFLAGS = -I$(BCCDIR)\include $(____DEBUG) $(____DEBUG_5) \
	$(____DEBUG_8) $(____SHARED) $(____SHARED_0) -D_WIN32 -I..\include \
	$(CPPFLAGS) $(CXXFLAGS)
MUPARSER_LIB_OBJECTS =  \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserBytecode.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserTest.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParser.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserDLL.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserInt.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserTokenReader.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserError.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserCallback.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserBase.obj
MUPARSER_DLL_CXXFLAGS = -I$(BCCDIR)\include $(____DEBUG) $(____DEBUG_5) \
	$(____DEBUG_8) $(____SHARED) $(____SHARED_0) -D_WIN32 -I..\include \
	$(CPPFLAGS) $(CXXFLAGS)
MUPARSER_DLL_OBJECTS =  \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserBytecode.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserTest.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParser.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserDLL.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserInt.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserTokenReader.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserError.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserCallback.obj \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserBase.obj
EXAMPLE1_CXXFLAGS = -I$(BCCDIR)\include $(____DEBUG) $(____DEBUG_5) \
	$(____DEBUG_8) -I..\include $(____SHARED_1) $(CPPFLAGS) $(CXXFLAGS)
EXAMPLE1_OBJECTS =  \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\example1_Example1.obj
EXAMPLE3_CXXFLAGS = -I$(BCCDIR)\include $(____DEBUG) $(____DEBUG_5) \
	$(____DEBUG_8) -I..\include $(____SHARED_1) $(CPPFLAGS) $(CXXFLAGS)
EXAMPLE3_OBJECTS =  \
	obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\example3_Example3.obj

### Conditionally set variables: ###

!if "$(DEBUG)" == "0"
DEBUGBUILDPOSTFIX = rel
!endif
!if "$(DEBUG)" == "1"
DEBUGBUILDPOSTFIX = dbg
!endif
!if "$(SHARED)" == "0"
SHAREDBUILDPOSTFIX = static
!endif
!if "$(SHARED)" == "1"
SHAREDBUILDPOSTFIX = shared
!endif
!if "$(DEBUG)" == "0"
DEBUG_BUILD_POSTFIX = 
!endif
!if "$(DEBUG)" == "1"
DEBUG_BUILD_POSTFIX = d
!endif
!if "$(SHARED)" == "0"
__muParser_lib___depname = ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib
!endif
!if "$(SHARED)" == "1"
__muParser_dll___depname = ..\lib\muparser$(DEBUG_BUILD_POSTFIX).dll
!endif
!if "$(SAMPLES)" == "1" && "$(SHARED)" == "0"
__example1___depname = ..\samples\example1\example1.exe
!endif
!if "$(SAMPLES)" == "1" && "$(SHARED)" == "1"
__example3___depname = ..\samples\example3\example3.exe
!endif
!if "$(SHARED)" == "0"
____SHARED = 
!endif
!if "$(SHARED)" == "1"
____SHARED = -DMUPARSER_DLL
!endif
!if "$(SHARED)" == "0"
____SHARED_0 = 
!endif
!if "$(SHARED)" == "1"
____SHARED_0 = -DMUPARSERLIB_EXPORTS
!endif
!if "$(DEBUG)" == "0"
____DEBUG = -DNDEBUG
!endif
!if "$(DEBUG)" == "1"
____DEBUG = 
!endif
!if "$(DEBUG)" == "0"
____DEBUG_5 = -O2
!endif
!if "$(DEBUG)" == "1"
____DEBUG_5 = -Od
!endif
!if "$(SHARED)" == "0"
____SHARED_1 = 
!endif
!if "$(SHARED)" == "1"
____SHARED_1 = -DUSINGDLL
!endif
!if "$(DEBUG)" == "0"
____DEBUG_8 = -v-
!endif
!if "$(DEBUG)" == "1"
____DEBUG_8 = -v
!endif


all: obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)
obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX):
	-if not exist obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX) mkdir obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)

### Targets: ###

all: $(__muParser_lib___depname) $(__muParser_dll___depname) $(__example1___depname) $(__example3___depname)

clean: 
	-if exist obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.obj del obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.obj
	-if exist obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.res del obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.res
	-if exist obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.csm del obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\*.csm
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).dll del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).dll
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).tds del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).tds
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ilc del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ilc
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ild del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ild
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ilf del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ilf
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ils del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).ils
	-if exist ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib del ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib
	-if exist ..\samples\example1\example1.exe del ..\samples\example1\example1.exe
	-if exist ..\samples\example1\example1.tds del ..\samples\example1\example1.tds
	-if exist ..\samples\example1\example1.ilc del ..\samples\example1\example1.ilc
	-if exist ..\samples\example1\example1.ild del ..\samples\example1\example1.ild
	-if exist ..\samples\example1\example1.ilf del ..\samples\example1\example1.ilf
	-if exist ..\samples\example1\example1.ils del ..\samples\example1\example1.ils
	-if exist ..\samples\example3\example3.exe del ..\samples\example3\example3.exe
	-if exist ..\samples\example3\example3.tds del ..\samples\example3\example3.tds
	-if exist ..\samples\example3\example3.ilc del ..\samples\example3\example3.ilc
	-if exist ..\samples\example3\example3.ild del ..\samples\example3\example3.ild
	-if exist ..\samples\example3\example3.ilf del ..\samples\example3\example3.ilf
	-if exist ..\samples\example3\example3.ils del ..\samples\example3\example3.ils

!if "$(SHARED)" == "0"
..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib: $(MUPARSER_LIB_OBJECTS)
	if exist $@ del $@
	tlib /a /p4096 $@ @&&|
	$(MUPARSER_LIB_OBJECTS)
|
!endif

!if "$(SHARED)" == "1"
..\lib\muparser$(DEBUG_BUILD_POSTFIX).dll: $(MUPARSER_DLL_OBJECTS)
	ilink32 -Tpd -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(____DEBUG_8) @&&|
	c0d32.obj $(MUPARSER_DLL_OBJECTS),$@,, import32.lib cw32.lib,,
|
	implib -f ..\lib\muparser$(DEBUG_BUILD_POSTFIX) $@
!endif

!if "$(SAMPLES)" == "1" && "$(SHARED)" == "0"
..\samples\example1\example1.exe: $(EXAMPLE1_OBJECTS) $(__muParser_lib___depname)
	ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(____DEBUG_8) -L..\lib @&&|
	c0x32.obj $(EXAMPLE1_OBJECTS),$@,, ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib import32.lib cw32.lib,,
|
!endif

!if "$(SAMPLES)" == "1" && "$(SHARED)" == "1"
..\samples\example3\example3.exe: $(EXAMPLE3_OBJECTS) $(__muParser_lib___depname)
	ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(____DEBUG_8) -L..\lib @&&|
	c0x32.obj $(EXAMPLE3_OBJECTS),$@,, ..\lib\muparser$(DEBUG_BUILD_POSTFIX).lib import32.lib cw32.lib,,
|
!endif

lib: $(__muParser_lib___depname) $(__muParser_dll___depname)

samples: $(__example1___depname) $(__example3___depname)

documentation: 
	( cd ..\docs && doxygen )

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserBytecode.obj: ..\src\muParserBytecode.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserTest.obj: ..\src\muParserTest.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParser.obj: ..\src\muParser.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserDLL.obj: ..\src\muParserDLL.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserInt.obj: ..\src\muParserInt.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserTokenReader.obj: ..\src\muParserTokenReader.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserError.obj: ..\src\muParserError.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserCallback.obj: ..\src\muParserCallback.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_lib_muParserBase.obj: ..\src\muParserBase.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_LIB_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserBytecode.obj: ..\src\muParserBytecode.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserTest.obj: ..\src\muParserTest.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParser.obj: ..\src\muParser.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserDLL.obj: ..\src\muParserDLL.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserInt.obj: ..\src\muParserInt.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserTokenReader.obj: ..\src\muParserTokenReader.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserError.obj: ..\src\muParserError.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserCallback.obj: ..\src\muParserCallback.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\muParser_dll_muParserBase.obj: ..\src\muParserBase.cpp
	$(CXX) -q -c -P -o$@ $(MUPARSER_DLL_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\example1_Example1.obj: ..\samples\example1\Example1.cpp
	$(CXX) -q -c -P -o$@ $(EXAMPLE1_CXXFLAGS) $**

obj\bcc_$(SHAREDBUILDPOSTFIX)_$(DEBUGBUILDPOSTFIX)\example3_Example3.obj: ..\samples\example3\Example3.cpp
	$(CXX) -q -c -P -o$@ $(EXAMPLE3_CXXFLAGS) $**

