summary refs log tree commit diff stats
path: root/tools/niminst/buildbat.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/niminst/buildbat.tmpl')
-rwxr-xr-xtools/niminst/buildbat.tmpl21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/niminst/buildbat.tmpl b/tools/niminst/buildbat.tmpl
new file mode 100755
index 000000000..49a004213
--- /dev/null
+++ b/tools/niminst/buildbat.tmpl
@@ -0,0 +1,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=?{c.ccompiler.flags}
+SET LINK_FLAGS=?{c.linker.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