-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make so many libraries as modules in the SFML library
The problem with this approach is that the list of sources has to be specified and that the documentation is not generated by gnatdoc, so it is left in this experimental branch, until a solution is found. See issue #6
- Loading branch information
Showing
11 changed files
with
357 additions
and
33 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ all: | |
gprbuild -j0 -P asfml.gpr | ||
|
||
doc: | ||
gnatdoc -P asfml.gpr | ||
gnatdoc -P asfml_doc.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
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,60 @@ | ||
with "asfml_system.gpr"; | ||
|
||
library project ASFML_Audio is | ||
|
||
type T_OS is ("Windows_NT", "Linux"); | ||
V_OS : T_OS := external ("OS", "Linux"); | ||
|
||
for Languages use ("Ada"); | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("include"); | ||
for Source_Files use | ||
("sf-audio.ads", | ||
"sf-audio-listener.ads", | ||
"sf-audio-music.adb", | ||
"sf-audio-music.ads", | ||
"sf-audio-sound.ads", | ||
"sf-audio-soundbuffer.adb", | ||
"sf-audio-soundbuffer.ads", | ||
"sf-audio-soundbufferrecorder.adb", | ||
"sf-audio-soundbufferrecorder.ads", | ||
"sf-audio-soundrecorder.adb", | ||
"sf-audio-soundrecorder.ads", | ||
"sf-audio-soundstatus.ads", | ||
"sf-audio-soundstream.ads", | ||
"sf-audio-types.ads"); | ||
for Object_Dir use "obj"; | ||
|
||
for Library_Name use "asfml-audio"; | ||
|
||
for Library_Dir use "lib/audio"; | ||
for Library_ALI_Dir use "lib/audio"; | ||
for Library_Kind use "static"; | ||
|
||
|
||
package Linker is | ||
case V_OS is | ||
when "Windows_NT" => | ||
for Linker_Options use | ||
("-LD:\Libraries\CSFML-2.5\lib\gcc", | ||
"-lcsfml-audio", | ||
"-lasfml-audio"); | ||
when others => | ||
for Linker_Options use | ||
("-lcsfml-audio", | ||
"-lasfml-audio"); | ||
end case; | ||
end Linker; | ||
|
||
|
||
package Documentation is | ||
for Documentation_Dir use "doc"; | ||
for Doc_Pattern use "^/ |^/< "; | ||
-- This considers comments beginning with "--/ " to be documentation | ||
for Custom_Tags_Definition use "tools/sfml-doc-tags.py"; | ||
-- GNATdoc loads provided file on startup to process custom tags | ||
end Documentation; | ||
|
||
end ASFML_Audio; |
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,27 @@ | ||
-- This project is only for generating documentation, not for building. | ||
-- When using gnatdoc (Ubuntu 18.04) with asfml.gpr there are errors. | ||
|
||
library project ASFML_doc is | ||
|
||
for Languages use ("Ada"); | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("include"); | ||
for Object_Dir use "obj"; | ||
|
||
for Library_Name use "asfml"; | ||
|
||
for Library_Dir use "lib"; | ||
for Library_ALI_Dir use "lib"; | ||
for Library_Kind use "static"; | ||
|
||
package Documentation is | ||
for Documentation_Dir use "doc"; | ||
for Doc_Pattern use "^/ |^/< "; | ||
-- This considers comments beginning with "--/ " to be documentation | ||
for Custom_Tags_Definition use "tools/sfml-doc-tags.py"; | ||
-- GNATdoc loads provided file on startup to process custom tags | ||
end Documentation; | ||
|
||
end ASFML_doc; |
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,79 @@ | ||
with "asfml_system.gpr"; | ||
with "asfml_window.gpr"; | ||
|
||
library project ASFML_Graphics is | ||
|
||
type T_OS is ("Windows_NT", "Linux"); | ||
V_OS : T_OS := external ("OS", "Linux"); | ||
|
||
for Languages use ("Ada"); | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("include"); | ||
for Source_Files use | ||
("sf-graphics.ads", | ||
"sf-graphics-blendmode.ads", | ||
"sf-graphics-circleshape.ads", | ||
"sf-graphics-color.ads", | ||
"sf-graphics-convexshape.ads", | ||
"sf-graphics-font.adb", | ||
"sf-graphics-font.ads", | ||
"sf-graphics-fontinfo.ads", | ||
"sf-graphics-glsl.ads", | ||
"sf-graphics-glyph.ads", | ||
"sf-graphics-image.adb", | ||
"sf-graphics-image.ads", | ||
"sf-graphics-primitivetype.ads", | ||
"sf-graphics-rect.ads", | ||
"sf-graphics-rectangleshape.ads", | ||
"sf-graphics-renderstates.ads", | ||
"sf-graphics-rendertexture.ads", | ||
"sf-graphics-renderwindow.adb", | ||
"sf-graphics-renderwindow.ads", | ||
"sf-graphics-shader.ads", | ||
"sf-graphics-shape.ads", | ||
"sf-graphics-sprite.ads", | ||
"sf-graphics-text.adb", | ||
"sf-graphics-text.ads", | ||
"sf-graphics-texture.adb", | ||
"sf-graphics-texture.ads", | ||
"sf-graphics-transformable.ads", | ||
"sf-graphics-transform.ads", | ||
"sf-graphics-types.ads", | ||
"sf-graphics-vertex.ads", | ||
"sf-graphics-vertexarray.ads", | ||
"sf-graphics-view.ads"); | ||
for Object_Dir use "obj"; | ||
|
||
for Library_Name use "asfml-graphics"; | ||
|
||
for Library_Dir use "lib/graphics"; | ||
for Library_ALI_Dir use "lib/graphics"; | ||
for Library_Kind use "static"; | ||
|
||
|
||
package Linker is | ||
case V_OS is | ||
when "Windows_NT" => | ||
for Linker_Options use | ||
("-LD:\Libraries\CSFML-2.5\lib\gcc", | ||
"-lcsfml-graphics", | ||
"-lasfml-graphics"); | ||
when others => | ||
for Linker_Options use | ||
("-lcsfml-graphics", | ||
"-lasfml-graphics"); | ||
end case; | ||
end Linker; | ||
|
||
|
||
package Documentation is | ||
for Documentation_Dir use "doc"; | ||
for Doc_Pattern use "^/ |^/< "; | ||
-- This considers comments beginning with "--/ " to be documentation | ||
for Custom_Tags_Definition use "tools/sfml-doc-tags.py"; | ||
-- GNATdoc loads provided file on startup to process custom tags | ||
end Documentation; | ||
|
||
end ASFML_Graphics; |
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,61 @@ | ||
with "asfml_system.gpr"; | ||
|
||
library project ASFML_Network is | ||
|
||
type T_OS is ("Windows_NT", "Linux"); | ||
V_OS : T_OS := external ("OS", "Linux"); | ||
|
||
for Languages use ("Ada"); | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("include"); | ||
for Source_Files use | ||
("sf-network.ads", | ||
"sf-network-ftp.adb", | ||
"sf-network-ftp.ads", | ||
"sf-network-http.adb", | ||
"sf-network-http.ads", | ||
"sf-network-ipaddress.adb", | ||
"sf-network-ipaddress.ads", | ||
"sf-network-packet.adb", | ||
"sf-network-packet.ads", | ||
"sf-network-socketselector.ads", | ||
"sf-network-socketstatus.ads", | ||
"sf-network-tcplistener.ads", | ||
"sf-network-tcpsocket.ads", | ||
"sf-network-types.ads", | ||
"sf-network-udpsocket.ads"); | ||
for Object_Dir use "obj"; | ||
|
||
for Library_Name use "asfml-network"; | ||
|
||
for Library_Dir use "lib"; | ||
for Library_ALI_Dir use "lib"; | ||
for Library_Kind use "static"; | ||
|
||
|
||
package Linker is | ||
case V_OS is | ||
when "Windows_NT" => | ||
for Linker_Options use | ||
("-LD:\Libraries\CSFML-2.5\lib\gcc", | ||
"-lcsfml-network", | ||
"-lasfml-network"); | ||
when others => | ||
for Linker_Options use | ||
("-lcsfml-network", | ||
"-lasfml-network"); | ||
end case; | ||
end Linker; | ||
|
||
|
||
package Documentation is | ||
for Documentation_Dir use "doc"; | ||
for Doc_Pattern use "^/ |^/< "; | ||
-- This considers comments beginning with "--/ " to be documentation | ||
for Custom_Tags_Definition use "tools/sfml-doc-tags.py"; | ||
-- GNATdoc loads provided file on startup to process custom tags | ||
end Documentation; | ||
|
||
end ASFML_Network; |
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,58 @@ | ||
|
||
library project ASFML_System is | ||
|
||
type T_OS is ("Windows_NT", "Linux"); | ||
V_OS : T_OS := external ("OS", "Linux"); | ||
|
||
for Languages use ("Ada"); | ||
|
||
for Create_Missing_Dirs use "True"; | ||
|
||
for Source_Dirs use ("include"); | ||
for Source_Files use | ||
("sf.ads", | ||
"sf-config.ads", | ||
"sf-system.ads", | ||
"sf-system-clock.ads", | ||
"sf-system-inputstream.ads", | ||
"sf-system-mutex.ads", | ||
"sf-system-sleep.adb", | ||
"sf-system-sleep.ads", | ||
"sf-system-thread.ads", | ||
"sf-system-time.ads", | ||
"sf-system-types.ads", | ||
"sf-system-vector2.ads", | ||
"sf-system-vector3.ads"); | ||
for Object_Dir use "obj"; | ||
|
||
for Library_Name use "asfml-system"; | ||
|
||
for Library_Dir use "lib/system"; | ||
for Library_ALI_Dir use "lib/system"; | ||
for Library_Kind use "static"; | ||
|
||
|
||
package Linker is | ||
case V_OS is | ||
when "Windows_NT" => | ||
for Linker_Options use | ||
("-LD:\Libraries\CSFML-2.5\lib\gcc", | ||
"-lcsfml-system", | ||
"-lasfml-system"); | ||
when others => | ||
for Linker_Options use | ||
("-lcsfml-system", | ||
"-lasfml-system"); | ||
end case; | ||
end Linker; | ||
|
||
|
||
package Documentation is | ||
for Documentation_Dir use "doc"; | ||
for Doc_Pattern use "^/ |^/< "; | ||
-- This considers comments beginning with "--/ " to be documentation | ||
for Custom_Tags_Definition use "tools/sfml-doc-tags.py"; | ||
-- GNATdoc loads provided file on startup to process custom tags | ||
end Documentation; | ||
|
||
end ASFML_System; |
Oops, something went wrong.