From: Michael D. Lowis Date: Fri, 27 Nov 2015 02:38:56 +0000 (-0500) Subject: Switched to makefile build script X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bff953630d428d5af9852ae7cc34148bca03a613;p=proto%2Fgir.git Switched to makefile build script --- diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 894906d..0000000 --- a/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source 'https://rubygems.org' -gem 'rake', '>= 0' -gem 'rscons', '>= 0' -gem 'rspec', '>= 0' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 88f9e23..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - diff-lcs (1.2.5) - json (1.8.2) - rake (10.4.2) - rscons (1.9.0) - json (~> 1.0) - rspec (3.2.0) - rspec-core (~> 3.2.0) - rspec-expectations (~> 3.2.0) - rspec-mocks (~> 3.2.0) - rspec-core (3.2.2) - rspec-support (~> 3.2.0) - rspec-expectations (3.2.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.2.0) - rspec-mocks (3.2.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.2.0) - rspec-support (3.2.2) - -PLATFORMS - ruby - -DEPENDENCIES - rake - rscons - rspec diff --git a/build.ninja b/build.ninja deleted file mode 100644 index 24c6c19..0000000 --- a/build.ninja +++ /dev/null @@ -1,76 +0,0 @@ -# Construction Variables -builddir = build -cc = gcc -ar = ar -ld = gcc -cflags = -g -O3 -Wall -Wextra --std=c99 --pedantic -incdirs = -Isource/ -Imodules/atf/source/ - -# Construction Rules -rule cc - command = $cc -MMD -MF $out.d $cflags $incdirs -o $out -c $in - description = CC $out - depfile = $out.d - -rule ld - command = $ld -o $out $in - description = LD $out - -rule ar - command = $ar rcs $out $in - description = AR $out - -rule runtest - command = $in > $out && cat $out - description = TEST $out - -# Build the static library -build $builddir/source/gir.o: cc source/gir.c -build $builddir/source/hamt.o: cc source/hamt.c -build $builddir/source/parser.o: cc source/parser.c -build $builddir/source/slist.o: cc source/slist.c -build $builddir/libgir.a: ar $builddir/source/gir.o $builddir/source/hamt.o $builddir/source/parser.o $builddir/source/slist.o - -# Build the interpreter -build $builddir/source/main.o: cc source/main.c -build $builddir/gir: ld $builddir/source/main.o $builddir/libgir.a - -# Build the test suite -build $builddir/modules/atf/source/atf.o: cc modules/atf/source/atf.c -build $builddir/tests/test_block.o: cc tests/test_block.c -build $builddir/tests/test_false.o: cc tests/test_false.c -build $builddir/tests/test_list.o: cc tests/test_list.c -build $builddir/tests/test_map.o: cc tests/test_map.c -build $builddir/tests/test_num.o: cc tests/test_num.c -build $builddir/tests/test_string.o: cc tests/test_string.c -build $builddir/tests/test_true.o: cc tests/test_true.c -build $builddir/tests/test_array.o: cc tests/test_array.c -build $builddir/tests/test_bool.o: cc tests/test_bool.c -build $builddir/tests/test_gir.o: cc tests/test_gir.c -build $builddir/tests/test_lobby.o: cc tests/test_lobby.c -build $builddir/tests/test_nil.o: cc tests/test_nil.c -build $builddir/tests/test_set.o: cc tests/test_set.c -build $builddir/tests/test_symbol.o: cc tests/test_symbol.c -build $builddir/tests/main.o: cc tests/main.c -build $builddir/test_gir: ld $ - $builddir/modules/atf/source/atf.o $ - $builddir/tests/test_block.o $ - $builddir/tests/test_false.o $ - $builddir/tests/test_list.o $ - $builddir/tests/test_map.o $ - $builddir/tests/test_num.o $ - $builddir/tests/test_string.o $ - $builddir/tests/test_true.o $ - $builddir/tests/test_array.o $ - $builddir/tests/test_bool.o $ - $builddir/tests/test_gir.o $ - $builddir/tests/test_lobby.o $ - $builddir/tests/test_nil.o $ - $builddir/tests/test_set.o $ - $builddir/tests/test_symbol.o $ - $builddir/tests/main.o $ - $builddir/libgir.a - -# Run the test suite -build $builddir/tests.log: runtest $builddir/test_gir - diff --git a/build.rb b/build.rb deleted file mode 100755 index ef02517..0000000 --- a/build.rb +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env ruby -require './modules/build-system/setup' - -#------------------------------------------------------------------------------ -# Environment Definitions -#------------------------------------------------------------------------------ -# Define the default compiler environment -main_env = BuildEnv.new do |env| - env["CFLAGS"] += ['-g', '-O3', '-Wall', '-Wextra', '--std=c99', '--pedantic'] - env["CPPPATH"] += ['source/'] + Dir['modules/atf/source/**/'] -end - -sources = Dir['source/**/*.c'] - ['source/main.c'] -test_sources = Dir['tests/**/*.c'] + ['modules/atf/source/atf.c'] - -#------------------------------------------------------------------------------ -# Release Build Targets -#------------------------------------------------------------------------------ -# Build the language library -main_env.Library('libgir.a', sources) - -# Build the interpreter -main_env.Program('gir', ['source/main.c', 'libgir.a']) - -#------------------------------------------------------------------------------ -# Test Build Targets -#------------------------------------------------------------------------------ -if Opts[:profile].include? "test" - # Do nothing for now - main_env.Program('test_gir', test_sources + ['libgir.a']) - main_env.Command('Unit Tests', 'test_gir', "CMD" => ['./test_gir']) -end