Author: vedge
Date: 2008-11-01 22:25:20 -0300 (Sat, 01 Nov 2008)
New Revision: 773
Modified:
trunk/BSDBuild/Core.pm
trunk/BSDBuild/agar-core.pm
trunk/BSDBuild/agar-dev.pm
trunk/BSDBuild/agar-map.pm
trunk/BSDBuild/agar-math.pm
trunk/BSDBuild/agar-rg.pm
trunk/BSDBuild/agar-vg.pm
trunk/BSDBuild/agar.pm
trunk/BSDBuild/edacious.pm
trunk/BSDBuild/freesg.pm
trunk/BSDBuild/freesg_m.pm
trunk/BSDBuild/freetype.pm
trunk/BSDBuild/glu.pm
trunk/BSDBuild/jpeg.pm
trunk/BSDBuild/opengl.pm
trunk/BSDBuild/pthreads.pm
trunk/BSDBuild/sdl.pm
trunk/mkconfigure.pl
Log:
- when compiling project files for Code::Blocks, use its "global variables"
feature to define include and lib paths of libraries.
- clean up premake-related code.
Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/Core.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -42,38 +42,56 @@
#
sub PmComment {
my $com = shift;
- print {$LUA} "-- $com\n";
+ print "-- $com\n";
}
+sub PmIf {
+ my $cond = shift;
+ print "if ($cond) then\n";
+}
+sub PmIfHDefined {
+ my $def = shift;
+ print "if (hdefs[\"$def\"] ~= nil) then\n";
+}
+sub PmEndif {
+ my $cond = shift;
+ print "end\n";
+}
sub PmDefineBool {
my $def = shift;
- print {$LUA} << "EOF";
+ print << "EOF";
table.insert(package.defines,{"$def"})
EOF
}
sub PmDefineString {
my ($def, $val) = @_;
- print {$LUA} << "EOF";
+ print << "EOF";
table.insert(package.defines,{"$def=$val"})
EOF
}
sub PmIncludePath {
my $path = shift;
- print {$LUA} << "EOF";
+ print << "EOF";
table.insert(package.includepaths,{"$path"})
EOF
}
sub PmLibPath {
my $path = shift;
- print {$LUA} << "EOF";
+ print << "EOF";
table.insert(package.libpaths,{"$path"})
EOF
}
sub PmBuildFlag {
my $flag = shift;
- print {$LUA} << "EOF";
+ print << "EOF";
table.insert(package.buildflags,{"$flag"})
EOF
}
+sub PmLink {
+ my $link = shift;
+ print << "EOF";
+table.insert(package.links,{"$link"})
+EOF
+}
# Write the standard output of a program into variable "$define".
# Set an empty string and $MK_EXEC_FOUND="No" if the binary is not found.
@@ -740,7 +758,7 @@
$^W = 0;
@ISA = qw(Exporter);
- @EXPORT = qw($LUA $EmulOS $EmulOSRel $EmulEnv %TESTS %DESCR MkExecOutput
MkExecOutputUnique MkFileOutput Which MkFail MKSave TryCompile MkCompileC
MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC
TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK
MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmDefineBool PmDefineString
PmIncludePath PmLibPath PmBuildFlag DetectHeaderC BeginTestHeaders
EndTestHeaders);
+ @EXPORT = qw($LUA $EmulOS $EmulOSRel $EmulEnv %TESTS %DESCR MkExecOutput
MkExecOutputUnique MkFileOutput Which MkFail MKSave TryCompile MkCompileC
MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC
TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK
MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmIf PmEndif PmIfHDefined
PmDefineBool PmDefineString PmIncludePath PmLibPath PmBuildFlag PmLink
DetectHeaderC BeginTestHeaders EndTestHeaders);
}
;1
Modified: trunk/BSDBuild/agar-core.pm
===================================================================
--- trunk/BSDBuild/agar-core.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-core.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -104,13 +104,15 @@
{
my $var = shift;
- if ($var eq 'ag_core') {
- print << 'EOF';
-tinsert(package.links, { "ag_core" })
-EOF
- return (1);
+ if ($var ne 'ag_core') {
+ return (0);
}
- return (0);
+ PmLink('ag_core');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/agar-dev.pm
===================================================================
--- trunk/BSDBuild/agar-dev.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-dev.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -89,13 +89,15 @@
{
my $var = shift;
- if ($var eq 'ag_dev') {
- print << 'EOF';
-tinsert(package.links, { "ag_dev" })
-EOF
- return (1);
+ if ($var ne 'ag_dev') {
+ return (0);
}
- return (0);
+ PmLink('ag_dev');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/agar-map.pm
===================================================================
--- trunk/BSDBuild/agar-map.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-map.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -85,13 +85,17 @@
{
my $var = shift;
- if ($var eq 'ag_map') {
- print << 'EOF';
-tinsert(package.links, { "ag_map", "ag_rg", "ag_vg" })
-EOF
- return (1);
+ if ($var ne 'ag_map' && $var ne 'freesg_map') {
+ return (0);
}
- return (0);
+ PmLink('freesg_map');
+ PmLink('ag_rg');
+ PmLink('ag_vg');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/agar-math.pm
===================================================================
--- trunk/BSDBuild/agar-math.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-math.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -95,13 +95,15 @@
{
my $var = shift;
- if ($var eq 'ag_math') {
- print << 'EOF';
-tinsert(package.links, { "ag_math" })
-EOF
- return (1);
+ if ($var ne 'ag_math') {
+ return (0);
}
- return (0);
+ PmLink('ag_math');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/agar-rg.pm
===================================================================
--- trunk/BSDBuild/agar-rg.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-rg.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -87,19 +87,21 @@
{
my $var = shift;
- if ($var eq 'ag_rg') {
- print << 'EOF';
-tinsert(package.links, { "ag_rg", "ag_vg" })
-EOF
- return (1);
+ if ($var ne 'ag_rg') {
+ return (0);
}
- return (0);
+ PmLink('ag_rg');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
{
$DESCR{'agar-rg'} = 'agar-rg (http://hypertriton.com/agar-rg/)';
- $DEPS{'agar-rg'} = 'cc,agar,agar-vg';
+ $DEPS{'agar-rg'} = 'cc,agar';
$TESTS{'agar-rg'} = \&Test;
$LINK{'agar-rg'} = \&Link;
$EMUL{'agar-rg'} = \&Emul;
Modified: trunk/BSDBuild/agar-vg.pm
===================================================================
--- trunk/BSDBuild/agar-vg.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar-vg.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -84,13 +84,15 @@
{
my $var = shift;
- if ($var eq 'ag_vg') {
- print << 'EOF';
-tinsert(package.links, { "ag_vg" })
-EOF
- return (1);
+ if ($var ne 'ag_vg') {
+ return (0);
}
- return (0);
+ PmLink('ag_vg');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmLibPath('$(#agar.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/agar.pm
===================================================================
--- trunk/BSDBuild/agar.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/agar.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -96,17 +96,41 @@
my $var = shift;
if ($var eq 'ag_core') {
- print << 'EOF';
-tinsert(package.links, { "ag_core", "SDL" })
-EOF
+ PmLink('ag_core');
+ PmLink('SDL');
+
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmIncludePath('$(#sdl.include)');
+ PmLibPath('$(#agar.lib)');
+ PmLibPath('$(#sdl.lib)');
+ }
return (1);
}
+
if ($var eq 'ag_gui') {
- print << 'EOF';
-tinsert(package.links, { "ag_gui", "SDL", "opengl32", "freetype" })
-EOF
+ PmLink('ag_gui');
+ PmLink('SDL');
+ if ($EmulOS eq 'windows') {
+ PmLink('opengl32');
+ } else {
+ PmLink('GL');
+ }
+ PmLink('freetype');
+
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#agar.include)');
+ PmIncludePath('$(#sdl.include)');
+ PmIncludePath('$(#gl.include)');
+ PmIncludePath('$(#freetype.include)');
+ PmLibPath('$(#agar.lib)');
+ PmLibPath('$(#sdl.lib)');
+ PmLibPath('$(#gl.lib)');
+ PmLibPath('$(#freetype.lib)');
+ }
return (1);
}
+
return (0);
}
Modified: trunk/BSDBuild/edacious.pm
===================================================================
--- trunk/BSDBuild/edacious.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/edacious.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -102,13 +102,15 @@
{
my $var = shift;
- if ($var eq 'edacious' || $var eq 'es_core') {
- print << 'EOF';
-tinsert(package.links, { "es_core" })
-EOF
- return (1);
+ if ($var ne 'edacious' && $var ne 'es_core') {
+ return (0);
}
- return (0);
+ PmLink('es_core');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#edacious.include)');
+ PmLibPath('$(#edacious.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/freesg.pm
===================================================================
--- trunk/BSDBuild/freesg.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/freesg.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -96,11 +96,30 @@
my $var = shift;
if ($var eq 'freesg') {
- print << 'EOF';
-tinsert(package.links, { "freesg" })
-EOF
+ PmLink('freesg');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#freesg.include)');
+ PmLibPath('$(#freesg.lib)');
+ }
return (1);
}
+ if ($var eq 'freesg_sk') {
+ PmLink('freesg_sk');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#freesg.include)');
+ PmLibPath('$(#freesg.lib)');
+ }
+ return (1);
+ }
+ if ($var eq 'freesg_pe') {
+ PmLink('freesg_pe');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#freesg.include)');
+ PmLibPath('$(#freesg.lib)');
+ }
+ return (1);
+ }
+
return (0);
}
Modified: trunk/BSDBuild/freesg_m.pm
===================================================================
--- trunk/BSDBuild/freesg_m.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/freesg_m.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -95,13 +95,15 @@
{
my $var = shift;
- if ($var eq 'freesg_m') {
- print << 'EOF';
-tinsert(package.links, { "freesg_m" })
-EOF
- return (1);
+ if ($var ne 'freesg_m') {
+ return (0);
}
- return (0);
+ PmLink('freesg_m');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#freesg.include)');
+ PmLibPath('$(#freesg.lib)');
+ }
+ return (1);
}
BEGIN
Modified: trunk/BSDBuild/freetype.pm
===================================================================
--- trunk/BSDBuild/freetype.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/freetype.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -72,39 +72,18 @@
sub Link
{
my $lib = shift;
- my @inclpaths = ();
- my @libpaths = ();
- if ($lib eq 'freetype') {
- print 'if (hdefs["HAVE_FREETYPE"] ~= nil) then'."\n";
- print 'table.insert(package.links, { "freetype" })'."\n";
-
- if ($EmulEnv =~ /^cb-(gcc|ow)$/) {
- if ($EmulOS eq 'windows') {
- @inclpaths =
('C:\\\\MinGW\\\\include\\\\freetype',
- 'C:\\\\MinGW\\\\include',
- 'C:\\\\Program
Files\\\\freetype\\\\include');
- @libpaths = ('C:\\\\MinGW\\\\lib\\\\freetype',
- 'C:\\\\MinGW\\\\lib',
- 'C:\\\\Program
Files\\\\freetype\\\\lib');
- } else {
- @inclpaths = ('/usr/include/freetype',
- '/usr/local/include/freetype',
-
'/usr/X11R6/include/freetype');
- @libpaths = ('/usr/local/lib',
'/usr/X11R6/lib', '/usr/lib');
- }
- foreach my $path (@inclpaths) {
- print
"table.insert(package.includepaths,{\"$path\"})\n";
- }
- foreach my $path (@libpaths) {
- print
"table.insert(package.libpaths,{\"$path\"})\n";
- }
- }
-
- print "end\n";
- return (1);
+ if ($lib ne 'freetype') {
+ return (0);
}
- return (0);
+ PmIfHDefined('HAVE_FREETYPE');
+ PmLink('freetype');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#freetype.include)');
+ PmLibPath('$(#freetype.lib)');
+ }
+ PmEndif;
+ return (1);
}
sub Emul
Modified: trunk/BSDBuild/glu.pm
===================================================================
--- trunk/BSDBuild/glu.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/glu.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -85,15 +85,21 @@
{
my $lib = shift;
- if ($lib eq 'glu') {
- print << 'EOF';
-if (hdefs["HAVE_GLU"] ~= nil) then
- table.insert(package.links, { "glu32" })
-end
-EOF
- return (1);
+ if ($lib ne 'glu') {
+ return (0);
}
- return (0);
+ PmIfHDefined('HAVE_GLU');
+ if ($EmulOS eq 'windows') {
+ PmLink('glu32');
+ } else {
+ PmLink('GLU');
+ }
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#GLU.include)');
+ PmLibPath('$(#GLU.lib)');
+ }
+ PmEndif;
+ return (1);
}
sub Emul
Modified: trunk/BSDBuild/jpeg.pm
===================================================================
--- trunk/BSDBuild/jpeg.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/jpeg.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -93,15 +93,17 @@
{
my $lib = shift;
- if ($lib eq 'jpeg') {
- print << 'EOF';
-if (hdefs["HAVE_JPEG"] ~= nil) then
- table.insert(package.links, { "jpeg" })
-end
-EOF
- return (1);
+ if ($lib ne 'jpeg') {
+ return (0);
}
- return (0);
+ PmIfHDefined('HAVE_JPEG');
+ PmLink('jpeg');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#jpeg.include)');
+ PmLibPath('$(#jpeg.lib)');
+ }
+ PmEndif;
+ return (1);
}
sub Emul
Modified: trunk/BSDBuild/opengl.pm
===================================================================
--- trunk/BSDBuild/opengl.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/opengl.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -111,30 +111,21 @@
sub Link
{
my $lib = shift;
- my @paths = ();
if ($lib ne 'opengl') {
return (0);
}
-
- if ($EmulEnv =~ /^cb-(gcc|ow)$/) {
- @paths = ('C:\\\\MinGW\\\\include');
- } else {
- @paths = ('/usr/include',
- '/usr/local/include',
- '/usr/X11R6/include');
- }
-
- print 'if (hdefs["HAVE_OPENGL"] ~= nil) then'."\n";
- if ($EmulOS eq 'windows') {
- print 'table.insert(package.links, {"opengl32"})'."\n";
- } else {
- print 'table.insert(package.links, {"GL"})'."\n";
- }
- foreach my $path (@paths) {
- print "table.insert(package.includepaths,{\"$path\"})\n";
- }
- print "end\n";
+ PmIfHDefined('HAVE_OPENGL');
+ if ($EmulOS eq 'windows') {
+ PmLink('opengl32');
+ } else {
+ PmLink('GL');
+ }
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#gl.include)');
+ PmLibPath('$(#gl.lib)');
+ }
+ PmEndif;
return (1);
}
Modified: trunk/BSDBuild/pthreads.pm
===================================================================
--- trunk/BSDBuild/pthreads.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/pthreads.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -337,43 +337,21 @@
sub Link
{
my $lib = shift;
- my @inclpaths = ();
- my @libpaths = ();
if ($lib ne 'pthreads') {
return (0);
}
-
- if ($EmulEnv =~ /^cb-(gcc|ow)$/) {
+ PmIfHDefined('HAVE_PTHREADS');
if ($EmulOS eq 'windows') {
- @inclpaths = ('C:\\\\MinGW\\\\include\\\\Pthreads',
- 'C:\\\\MinGW\\\\include\\\\Pthread',
- 'C:\\\\MinGW\\\\include',
- 'C:\\\\Program
Files\\\\Pthreads\\\\include');
- @libpaths = ('C:\\\\MinGW\\\\lib\\\\Pthreads',
- 'C:\\\\MinGW\\\\lib',
- 'C:\\\\Program Files\\\\Pthreads\\\\lib');
+ PmLink('pthreadVC2');
} else {
- @inclpaths = ('/usr/local/include',
- '/usr/local/include/pthreads',
- '/usr/include');
- @libpaths = ('/usr/local/lib', '/usr/lib');
+ PmLink('pthread');
}
- }
-
- print 'if (hdefs["HAVE_PTHREADS"] ~= nil) then'."\n";
- if ($EmulOS eq 'windows') {
- print 'table.insert(package.links, { "pthreadVC2" })'."\n";
- } else {
- print 'table.insert(package.links, { "pthread" })'."\n";
- }
- foreach my $path (@inclpaths) {
- print "table.insert(package.includepaths,{\"$path\"})\n";
- }
- foreach my $path (@libpaths) {
- print "table.insert(package.libpaths,{\"$path\"})\n";
- }
- print "end\n";
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#pthreads.include)');
+ PmLibPath('$(#pthreads.lib)');
+ }
+ PmEndif;
return (1);
}
Modified: trunk/BSDBuild/sdl.pm
===================================================================
--- trunk/BSDBuild/sdl.pm 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/BSDBuild/sdl.pm 2008-11-02 01:25:20 UTC (rev 773)
@@ -94,39 +94,18 @@
sub Link
{
my $lib = shift;
- my @inclpaths = ();
- my @libpaths = ();
if ($lib ne 'SDL' && $lib ne 'SDLmain') {
return (0);
}
-
- if ($EmulEnv =~ /^cb-(gcc|ow)$/) {
- if ($EmulOS eq 'windows') {
- @inclpaths = ('C:\\\\MinGW\\\\include\\\\SDL',
- 'C:\\\\MinGW\\\\include',
- 'C:\\\\Program Files\\\\SDL\\\\include');
- @libpaths = ('C:\\\\MinGW\\\\lib\\\\SDL',
- 'C:\\\\MinGW\\\\lib',
- 'C:\\\\Program Files\\\\SDL\\\\lib');
- } else {
- @inclpaths = ('/usr/local/include/SDL',
- '/usr/include/SDL',
- '/usr/local/include',
- '/usr/include');
- @libpaths = ('/usr/local/lib', '/usr/lib');
+ PmIfHDefined('HAVE_SDL');
+ PmLink('SDL');
+ PmLink('SDLmain');
+ if ($EmulEnv =~ /^cb-/) {
+ PmIncludePath('$(#sdl.include)');
+ PmLibPath('$(#sdl.lib)');
}
- }
-
- print 'if (hdefs["HAVE_SDL"] ~= nil) then'."\n";
- print 'table.insert(package.links, { "SDL", "SDLmain" })'."\n";
- foreach my $path (@inclpaths) {
- print "table.insert(package.includepaths,{\"$path\"})\n";
- }
- foreach my $path (@libpaths) {
- print "table.insert(package.libpaths,{\"$path\"})\n";
- }
- print "end\n";
+ PmEndif;
return (1);
}
Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl 2008-11-01 17:10:33 UTC (rev 772)
+++ trunk/mkconfigure.pl 2008-11-02 01:25:20 UTC (rev 773)
@@ -58,7 +58,7 @@
MkDefine('CXXFLAGS', '$CXXFLAGS -D'.$def);
MkSaveMK('CFLAGS');
MkSaveMK('CXXFLAGS');
- PmDefineBool($def);
+ print {$LUA} "table.insert(package.defines,{\"$def\"})\n";
}
sub c_incdir
@@ -79,7 +79,7 @@
$dir =~ s/\$SRC/\.\./g;
$dir =~ s/\$BLD/\.\./g;
}
- PmIncludePath($dir);
+ print {$LUA} "table.insert(package.includepaths,{\"$dir\"})\n";
}
sub c_incprep
@@ -129,23 +129,27 @@
MkSaveMK('LIBS');
$dir =~ s/\$SRC/\./g;
- PmLibPath($dir);
+ print {$LUA} "table.insert(package.libpaths,{\"$dir\"})\n";
}
sub c_extra_warnings
{
- PmBuildFlag('extra-warnings');
+ print {$LUA} 'table.insert(package.buildflags,{"extra-warnings"})'."\n";
}
sub c_fatal_warnings
{
- PmBuildFlag('extra-warnings');
+ print {$LUA} 'table.insert(package.buildflags,{"extra-warnings"})'."\n";
}
sub c_no_secure_warnings
{
- PmDefineBool('_CRT_SECURE_NO_WARNINGS');
- PmDefineBool('_CRT_SECURE_NO_DEPRECATE');
+ print {$LUA} << "EOF";
+if (windows) then
+ table.insert(package.defines,{"_CRT_SECURE_NO_WARNINGS"})
+ table.insert(package.defines,{"_CRT_SECURE_NO_DEPRECATE"})
+end
+EOF
}
sub c_option
_______________________________________________
BSDBuild-Commits mailing list
[email protected]
http://mail231.csoft.net/mailman/listinfo/bsdbuild-commits