Refactor some gprbuild bits out

This commit is contained in:
R. Tyler Croy 2016-01-10 10:45:15 -08:00
parent 38f1d2031b
commit 86fcdc4fba
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
3 changed files with 22 additions and 10 deletions

View File

@ -6,7 +6,7 @@ EXECUTABLE=build/pipeline
all: $(EXECUTABLE)
clean:
$(GPRCLEAN)
$(GPRCLEAN) -Ppipeline
check: all build/c_pipeline
./t/bin/bats ./t/*.bats
@ -14,7 +14,7 @@ check: all build/c_pipeline
generated: build/generated/nanomsg_nn_h.ads
build/pipeline: generated
$(GPRBUILD)
$(GPRBUILD) -Ppipeline
build/c_pipeline: contrib/pipeline.c
$(CC) -lnanomsg -o build/c_pipeline contrib/pipeline.c

View File

@ -1,13 +1,12 @@
with "shared";
project Pipeline is
for Source_Dirs use (".", "build/generated");
for Main use ("pipeline.adb");
for Object_Dir use "build";
for Exec_Dir use "build";
for Main use ("pipeline.adb");
package Compiler is
for Default_Switches("ada") use
("-g", "-gnateS", "-ftest-coverage", "-gnatv", "-gnatf", "-gnatyabcefhiklmnprst", "-gnat12");
end Compiler;
for Source_Dirs use Shared'Source_Dirs;
for Object_Dir use Shared'Object_Dir;
for Exec_Dir use Shared'Exec_Dir;
package Compiler renames Shared.Compiler;
end Pipeline;

13
shared.gpr Normal file
View File

@ -0,0 +1,13 @@
abstract project Shared is
for Source_Files use (); -- no source files!
for Source_Dirs use (".", "build/generated");
for Object_Dir use "build";
for Exec_Dir use "build";
package Compiler is
for Default_Switches("ada") use
("-g", "-gnateS", "-ftest-coverage",
"-gnatv", "-gnatf", "-gnatyabcefhiklmnprst",
"-gnat12");
end Compiler;
end Shared;