From: Mike D. Lowis Date: Fri, 5 Jun 2015 14:49:48 +0000 (-0400) Subject: Fixed a quirk with the user_main prototype X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=885f1c25b19731282fd527374b43443856e9d060;p=archive%2Fcarl.git Fixed a quirk with the user_main prototype --- diff --git a/.gitignore b/.gitignore index bbf313b..891ec23 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ # Debug files *.dSYM/ +.rsconscache diff --git a/build.rb b/build.rb index b0a131d..ab729b0 100755 --- a/build.rb +++ b/build.rb @@ -1,4 +1,25 @@ #!/usr/bin/env ruby - require './modules/build-system/setup' +#------------------------------------------------------------------------------ +# Environment Definitions +#------------------------------------------------------------------------------ +# Define the default compiler environment +main_env = BuildEnv.new do |env| + env["CFLAGS"] += ['-O3', '-Wall', '-Wextra', '--std=c99', '--pedantic'] + env["CPPPATH"] += Dir['source/'] +end + +#------------------------------------------------------------------------------ +# Release Build Targets +#------------------------------------------------------------------------------ +# Build the library +main_env.Library('libc.a', FileList['source/**/*.c']) + +#------------------------------------------------------------------------------ +# Test Build Targets +#------------------------------------------------------------------------------ +if Opts[:profile].include? "test" + # Do nothing for now +end + diff --git a/source/libc.h b/source/libc.h index 353df8f..330a5bf 100644 --- a/source/libc.h +++ b/source/libc.h @@ -206,7 +206,7 @@ void exits(char*); */ #ifndef NO_MAIN_WRAPPER #define main user_main - extern void user_main(int, char**); #endif +void user_main(int, char**); #endif /* LIBC_H */