summary refs log tree commit diff stats
path: root/tools/buildbat.tmpl
blob: a20559a90fdd4e5979453f601099db35d0957b52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! stdtmpl(subsChar='?') | standard
#proc GenerateBuildBatchScript(c: TConfigData): string = 
#  result = "@echo off\nREM Generated by niminst\n"
SET CC=gcc
SET LINKER=gcc
SET COMP_FLAGS=-w -O3 -fno-strict-aliasing
SET LINK_FLAGS=

REM call the compiler:

#  var linkCmd = ""
#  for f in items(c.cfiles[1][1]):
ECHO %CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
%CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
#    linkCmd.add(" " & changeFileExt(f, "o"))
#  end for

ECHO %LINKER% %LINK_FLAGS% -o ?{c.binPaths[0]}\?{toLower(c.name)}.exe ?linkCmd
%LINKER% %LINK_FLAGS% -o ?{c.binPaths[0]}\?{toLower(c.name)}.exe ?linkCmd

ECHO SUCCESS