From 885f1c25b19731282fd527374b43443856e9d060 Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Fri, 5 Jun 2015 10:49:48 -0400 Subject: [PATCH] Fixed a quirk with the user_main prototype --- .gitignore | 1 + build.rb | 23 ++++++++++++++++++++++- source/libc.h | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) 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 */ -- 2.54.0