Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (22 sloc) 0.642 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
require 'spec/rake/spectask'
require "rake/clean"
CLEAN.include("**/*.o")

SRC = FileList['**/*.c']
HEADERS = FileList['*.h'];
OBJ = SRC.ext('o')

CC_OPTS="-Iutil -Wall -Werror -Wextra -Wwrite-strings #{if ENV["PROFILE"] then "-pg -fprofile-arcs -ftest-coverage" else "-O3" end }"

rule '.o' => '.c' do |t|
  sh "cc #{CC_OPTS} -c -o #{t.name} #{t.source}"
end

task "compile" => OBJ do
  sh "cc -lm -opearsons #{OBJ.join(" ")}"
end

task "cutils" do
  sh "cd cutils && rake && cd .."
end

Spec::Rake::SpecTask.new do |t|
  t.rcov = false
  t.spec_files = FileList["test/**/*_spec.rb"]
  t.libs << "./lib"
end

task :default => "compile"
Something went wrong with that request. Please try again.