
#   ************************************************************************
#   *		  SOURCES Inclusion For Building SHIMDBDC.EXE		   *
#   ************************************************************************

#   SHIMDBDC is a Shim Database De-Compiler.

#   ************************************************************************
#   General Description of Target

#   The program is a Windows console application that uses the Unicode form
#   of C-language entry point.

TARGETNAME = shimdbdc
TARGETPATH = obj
TARGETTYPE = PROGRAM
UMENTRY    = wmain
UMTYPE	   = console

#   ************************************************************************
#   Source files

#   Initial execution: parses the command line and sets the de-compiler to
#   work

SOURCES = main.cpp

#   For SDB tags that can have child tags - best start by reading TAG.H and
#   LISTTAG.H

SOURCES = $(SOURCES) listtag.cpp

#	Derivations for particular SDB tags - here listed alphabetically,
#	but remember that the tag that everything starts with is
#	TAG_DATABASE, implemented in DATABASE.CPP

SOURCES = $(SOURCES) apphelp.cpp    # <APPHELP>
SOURCES = $(SOURCES) app.cpp	    # <APP> or <DRIVER> or <KENGINE>
SOURCES = $(SOURCES) data.cpp	    # <DATA> or <DRIVER_POLICY>
SOURCES = $(SOURCES) database.cpp   # <DATABASE>
SOURCES = $(SOURCES) exe.cpp	    # <EXE> or <SYS>
SOURCES = $(SOURCES) kdevice.cpp    # <KDEVICE>
SOURCES = $(SOURCES) kdriver.cpp    # <KDRIVER>
SOURCES = $(SOURCES) kflag.cpp	    # <KFLAG> in <LIBRARY>
SOURCES = $(SOURCES) kflagref.cpp   # <KFLAG> in <KDEVICE>
SOURCES = $(SOURCES) kshim.cpp	    # <KSHIM> in <LIBRARY>
SOURCES = $(SOURCES) kshimref.cpp   # <KSHIM> in <KDRIVER>
SOURCES = $(SOURCES) library.cpp    # <LIBRARY>
SOURCES = $(SOURCES) lookup.cpp     # <LOOKUP>
SOURCES = $(SOURCES) matching.cpp   # <MATCHING_FILE>

#	A little extra for list tags whose XML falls under <APP>

SOURCES = $(SOURCES) apptag.cpp

#   For SDB tags that can't have child tags - comments mostly in ATTRTAG.H

SOURCES = $(SOURCES) attrtag.cpp

#   For lists of list tags and lists of attribute tags

SOURCES = $(SOURCES) taglist.cpp

#   For interpreting tag data

SOURCES = $(SOURCES) tagdata.cpp

#   Helpers for converting various data to strings, typically for
#   representation as the value of an XML attribute

SOURCES = $(SOURCES) ftstr.cpp	    # FILETIME from TAG_TIME
SOURCES = $(SOURCES) guidstr.cpp    # GUID, e.g., from TAG_DATABASE_ID
SOURCES = $(SOURCES) langstr.cpp    # language from TAG_VER_LANGUAGE
SOURCES = $(SOURCES) ltstr.cpp	    # link time, e.g., from TAG_LINK_DATE
SOURCES = $(SOURCES) verstr.cpp     # version, e.g., from TAG_BIN_FILE_VERSION

#   Helpers for buffered writing of XML output in Unicode

SOURCES = $(SOURCES) output.cpp outstr.cpp outxml.cpp

#   ========================================================================
#   Include Files

INCLUDES = $(PATH_INC)

#   General inclusions for console applications - most specific to least

INCLUDES = $(INCLUDES);$(PATH_COMMON_CONSOLE_INC)
INCLUDES = $(INCLUDES);$(PATH_COMMON_USER_INC)
INCLUDES = $(INCLUDES);$(PATH_COMMON_INC)

#   ========================================================================
#   Version Resources

SOURCES = $(SOURCES) shimdbdc.rc

INCLUDES = $(INCLUDES);$(PATH_PRODUCT_VERSION_INC)

#   ========================================================================
#   Libraries

#   Fake import library for using APPHELP.DLL

TARGETLIBS = $(TARGETLIBS) $(PATH_LIB)\*\apphelp.lib

#   Common libraries for console applications - most specific to least

TARGETLIBS = $(TARGETLIBS) $(COMMON_CONSOLE_LIB)
TARGETLIBS = $(TARGETLIBS) $(COMMON_USER_LIB)

#   Import C Run-Time (CRT) Library functions from a DLL for space and
#   simplicity - including such things as having an operator new that
#   returns NULL on failure.

USE_MSVCRT = 1

#   ************************************************************************
#   Preferences

!include $(PATH_COMMON_INC)\warnmk.inc

#   ========================================================================
#   Optimisation

!include $(PATH_COMMON_INC)\optsmk.inc

#   ========================================================================
#   Convenience

#   Via a separate MAKEFILE.INC inclusion, provide a "clean" pseudo-target
#   that strips all the build products.

USE_MAKEFILE_INC = 1

#   ************************************************************************

