Skip to content

Commit

Permalink
#3: Split out the shared stuff into a separate file, since we will ne…
Browse files Browse the repository at this point in the history
…ed it for compiling the startup.c file also.
  • Loading branch information
Per Lundberg committed Jun 14, 2013
1 parent bfc065e commit 6e97332
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
12 changes: 12 additions & 0 deletions libraries/constants.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DEFINES = (ENV['DEFINES'] || '') + " -DPACKAGE=\\\"storm\\\" -DVERSION=\\\"git\\\""

COMMON_CFLAGS =
"-Wall -Wextra -Wshadow -Wpointer-arith -Waggregate-return -Wredundant-decls \
-Winline -Werror -Wcast-align -Wsign-compare -Wmissing-declarations \
-Wmissing-noreturn -pipe -O3 -fno-builtin -funsigned-char \
-g -m32 -fomit-frame-pointer -ffreestanding #{ENV['EXTRA_CFLAGS']} #{DEFINES} "

CFLAGS = COMMON_CFLAGS +
"--std=gnu99 -Wbad-function-cast -Wmissing-prototypes -Wnested-externs \
-Wstrict-prototypes"
CCFLAGS = COMMON_CFLAGS + "--std=gnu++11 " #-Wno-c++0x-compat"
19 changes: 4 additions & 15 deletions libraries/libraries.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,18 @@

Rake.application.options.rakelib = "#{File.dirname(__FILE__)}/../rakelib" if Rake.application.options.rakelib.first == 'rakelib'

DEFINES = (ENV['DEFINES'] || '') + " -DPACKAGE=\\\"storm\\\" -DVERSION=\\\"git\\\""

COMMON_CFLAGS =
"-Wall -Wextra -Wshadow -Wpointer-arith -Waggregate-return -Wredundant-decls \
-Winline -Werror -Wcast-align -Wsign-compare -Wmissing-declarations \
-Wmissing-noreturn -pipe -O3 -fno-builtin -funsigned-char \
-g -m32 -fomit-frame-pointer -ffreestanding #{ENV['EXTRA_CFLAGS']} #{DEFINES} "

CFLAGS = COMMON_CFLAGS +
"--std=gnu99 -Wbad-function-cast -Wmissing-prototypes -Wnested-externs \
-Wstrict-prototypes"
CCFLAGS = COMMON_CFLAGS + "--std=gnu++11 " #-Wno-c++0x-compat"
load "#{File.dirname(__FILE__)}/constants.rake"

task :default => [ :banner, OUTPUT ] do
puts
end

task :banner do
print "Compiling ".bold
print 'Compiling '.bold
print OUTPUT.sub('.a', '').cyan.bold
puts "..."
puts '...'

print " "
print ' '
end

file OUTPUT => OBJECTS do |t|
Expand Down

0 comments on commit 6e97332

Please sign in to comment.