///////
/////// wxWorkshop's default makefile-maintanance scripts
/////// =================================================
///////
/////// 2001 (C) Aleksandras Gluchovas (email: alex@soften.ktu.lt)
///////
/////// $Id: config_build.txt,v 1.11 2001/11/15 06:12:59 aleksandras Exp $
/////// 

//////////////////// subordinate scripts /////////////////////

script = {

	name = "obj_files"

	content = [[	$D\%(FILE_NO_EXT).obj \
]]
}

script = {

	name = "vc_error_filters"

	content = [[ __FILE__ '(' __LINE__ ') : error ' __MESSAGE__ '\n' |
                     __FILE__ '(' __LINE__ ') : fatal error' __MESSAGE__ '\n'
]]
}

script = {

	name = "vc_warning_filters"
	content = [[ __FILE__ '(' __LINE__ ') : warning ' __MESSAGE__ '\n']]
}

script = {

	name = "vc_makefile_script"
	content = [[#
# File:		%(OUTPUT_FILE) (auto-generated using template %(TEMPLATE))
# Author:	
# Created:	%(DATE)
# Updated:	
# Copyright:
#
# Makefile : Builds %(PROGRAM) application
# Use FINAL=1 argument to nmake to build final version with no debug info.

# Set WXDIR for your system
WXDIR = $(WXWIN)

!include $(WXDIR)/src/makevc.env

PROGRAM = %(PROJECT_NAME)

OBJECTS = %(@file_list["*.cpp",obj_files])

EXTRAINC = -I$(WXWORKSHOPDIR)/include -I$(WXWORKSHOPDIR)/wx_contrib_mods/include

!if "$(FINAL)" == "1"
EXTRALIBS = $(WXWORKSHOPDIR)/lib/wspp.lib $(WXWORKSHOPDIR)/lib/wxxrc.lib
!else
EXTRALIBS = $(WXWORKSHOPDIR)/lib/wsppd.lib $(WXWORKSHOPDIR)/lib/wxxrcd.lib
!endif

$D:
    mkdir .\$D

all: $(D) $(OBJECTS)

!include $(WXDIR)/src/makeprog.vc
]]
}

//////////////////// templates /////////////////////

template = {

	name = "VC++ Library makefile"
	args = { { "Target" { "all" } }
			 { "FINAL" { "0" "1" } }
			 { "MAKINGDLL" { "0" "1" } }
		   }

	content = "%(@script[vc_makefile_script])"

	output_file   = "makefile.vc"
	
	build_cmdline = "nmake -f %(OUTPUT_FILE) FINAL = %(FINAL) %(Target)"
	clean_cmdline = "nmake -f %(OUTPUT_FILE) clean"
	exec_cmdline  = "%(PROJECT_NAME).exe"

	error_filters   = "%(@script[vc_error_filters])"
	warning_filter  = "%(@script[vc_warning_filters])"
}

template = {

	name = "VC++ Application makefile"
	
	args = { { "Target" { "all" } }
			 { "FINAL" { "0" "1" } }
		   }

	content = "%(@script[vc_makefile_script])"

	output_file   = "makefile.vc"

	build_cmdline = "nmake -f %(OUTPUT_FILE) %(Target)"
	clean_cmdline = "nmake -f %(OUTPUT_FILE) clean"
	
//	build_cmdline = "nmake"
	
	exec_cmdline  = "%(PROJECT_NAME).exe"

	error_filters   = "%(@script[vc_error_filters])"
	warning_filter  = "%(@script[vc_warning_filters])"

}

template = {

	name = "Existing makefile VC"
	args = { { "Target" { "all" } }
		     { "Makefile" { "makefile.vc"  } }
			 { "FileToExecute" { "" } }
		   }
			 
	args = { { "Makefile" { "makefile.vc" } }
			 { "FileToExecute" { "" } }
		   }

	content = "%(@script[vc_makefile_script])"

	output_file   = ""

	build_cmdline = "nmake -f %(Makefile) %(Target)"
	
	clean_cmdline = "nmake -f %(Makefile) clean"
	
	exec_cmdline  = "%(FileToExecute)"

	error_filters   = "%(@script[vc_error_filters])"
	warning_filter  = "%(@script[vc_warning_filters])"
}