-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for Alire 1.2 and separate demo crate (#4)
* Update for Alire 1.2 and separate demo crate * Rename ANSI -> AnsiAda and bump major version * Add release configuration for standalone use Co-authored-by: Alejandro R. Mosteo <[email protected]>
- Loading branch information
1 parent
c2b5b0c
commit dc770a5
Showing
12 changed files
with
146 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
name = "ansiada" | ||
description = "ANSI escape sequences" | ||
version = "0.1.1" | ||
version = "1.0.0" | ||
|
||
licenses = "MIT" | ||
authors = ["Alejandro R. Mosteo"] | ||
maintainers = ["Alejandro R. Mosteo <[email protected]>"] | ||
maintainers-logins = ["mosteo"] | ||
|
||
tags = ["ansi", "terminal"] | ||
|
||
project-files = ["ansi.gpr"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
with "config/ansiada_config.gpr"; | ||
project Ansiada is | ||
|
||
for Library_Name use "Ansiada"; | ||
for Library_Version use Project'Library_Name & ".so." & Ansiada_Config.Crate_Version; | ||
|
||
for Source_Dirs use ("src/", "config/"); | ||
for Object_Dir use "obj/" & Ansiada_Config.Build_Profile; | ||
for Create_Missing_Dirs use "True"; | ||
for Library_Dir use "lib"; | ||
|
||
type Library_Type_Type is ("relocatable", "static", "static-pic"); | ||
Library_Type : Library_Type_Type := | ||
external ("ANSIADA_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static")); | ||
for Library_Kind use Library_Type; | ||
|
||
package Compiler is | ||
for Default_Switches ("Ada") use Ansiada_Config.Ada_Compiler_Switches; | ||
end Compiler; | ||
|
||
package Binder is | ||
for Switches ("Ada") use ("-Es"); -- Symbolic traceback | ||
end Binder; | ||
|
||
package Install is | ||
for Artifacts (".") use ("share"); | ||
end Install; | ||
|
||
end Ansiada; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Configuration for ansiada generated by Alire | ||
pragma Restrictions (No_Elaboration_Code); | ||
|
||
package Ansiada_Config is | ||
pragma Pure; | ||
|
||
Crate_Version : constant String := "1.0.0"; | ||
Crate_Name : constant String := "ansiada"; | ||
|
||
Alire_Host_OS : constant String := "linux"; | ||
|
||
Alire_Host_Arch : constant String := "x86_64"; | ||
|
||
Alire_Host_Distro : constant String := "ubuntu"; | ||
|
||
type Build_Profile_Kind is (release, validation, development); | ||
Build_Profile : constant Build_Profile_Kind := release; | ||
|
||
end Ansiada_Config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Configuration for ansiada generated by Alire | ||
abstract project Ansiada_Config is | ||
Crate_Version := "1.0.0"; | ||
Crate_Name := "ansiada"; | ||
|
||
Alire_Host_OS := "linux"; | ||
|
||
Alire_Host_Arch := "x86_64"; | ||
|
||
Alire_Host_Distro := "ubuntu"; | ||
Ada_Compiler_Switches := External_As_List ("ADAFLAGS", " ") & | ||
( | ||
"-O3" -- Optimize for performance | ||
,"-gnatn" -- Enable inlining | ||
,"-ffunction-sections" -- Separate ELF section for each function | ||
,"-fdata-sections" -- Separate ELF section for each variable | ||
); | ||
|
||
type Build_Profile_Kind is ("release", "validation", "development"); | ||
Build_Profile : Build_Profile_Kind := "release"; | ||
|
||
end Ansiada_Config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Configuration for ansiada generated by Alire */ | ||
#ifndef ANSIADA_CONFIG_H | ||
#define ANSIADA_CONFIG_H | ||
|
||
#define CRATE_VERSION "1.0.0" | ||
#define CRATE_NAME "ansiada" | ||
|
||
#define ALIRE_HOST_OS "linux" | ||
|
||
#define ALIRE_HOST_ARCH "x86_64" | ||
|
||
#define ALIRE_HOST_DISTRO "ubuntu" | ||
|
||
#define BUILD_PROFILE_RELEASE 1 | ||
#define BUILD_PROFILE_VALIDATION 2 | ||
#define BUILD_PROFILE_DEVELOPMENT 3 | ||
|
||
#define BUILD_PROFILE 1 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/obj/ | ||
/bin/ | ||
/alire/ | ||
/config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name = "demo" | ||
description = "Ansiada demo" | ||
version = "0.1.0-dev" | ||
|
||
executables = ["demo"] | ||
|
||
[[depends-on]] | ||
ansiada = "*" | ||
|
||
[[pins]] | ||
ansiada = { path='..' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
with "config/demo_config.gpr"; | ||
project Demo is | ||
|
||
for Source_Dirs use ("src/", "config/"); | ||
for Object_Dir use "obj/" & Demo_Config.Build_Profile; | ||
for Create_Missing_Dirs use "True"; | ||
for Exec_Dir use "bin"; | ||
for Main use ("demo.adb"); | ||
|
||
package Compiler is | ||
for Default_Switches ("Ada") use Demo_Config.Ada_Compiler_Switches; | ||
end Compiler; | ||
|
||
package Binder is | ||
for Switches ("Ada") use ("-Es"); -- Symbolic traceback | ||
end Binder; | ||
|
||
package Install is | ||
for Artifacts (".") use ("share"); | ||
end Install; | ||
|
||
end Demo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters