///////
/////// wxWorkshop's default makefile-maintanance scripts
/////// =================================================
///////
/////// 2001 (C) Aleksandras Gluchovas (email: alex@soften.ktu.lt)
///////
/////// $Id: config_build.txt,v 1.8 2001/04/04 12:42:36 aleksandras Exp $
/////// 

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

script = {

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

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.\..\..\include

!if "$(FINAL)" == "1"
EXTRALIBS = .\..\..\lib\wspp.lib .\..\..\lib\wxxml.lib
!else
EXTRALIBS = .\..\..\lib\wsppd.lib .\..\..\lib\wxxmld.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_filter   = { __FILE__ "(" __LINE__ ") : " __MESSAGE__ "\n" }
	warning_filter = { __FILE__ "(" __LINE__ ") : " __MESSAGE__ "\n" }

}

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_filter   = { __FILE__ "(" __LINE__ ") : error " __MESSAGE__ "\n" }
	warning_filter = { __FILE__ "(" __LINE__ ") : warning " __MESSAGE__ "\n" }

}

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_filter   = { __FILE__ "(" __LINE__ ") : " __MESSAGE__ "\n" }
	warning_filter = { __FILE__ "(" __LINE__ ") : " __MESSAGE__ "\n" }
}