diff options
author | Kiyoshi Aman <kiyoshi.aman@gmail.com> | 2019-09-22 04:47:33 +0000 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman@gmail.com> | 2019-09-22 04:47:33 +0000 |
commit | 445fda1b3984f3df7e6a724c406579e365c7b656 (patch) | |
tree | 27379636a859876c27be0506c60ab2eb58761b2f /template | |
parent | 8158ef186bf16307b6ed2c329cf008064c6ba868 (diff) | |
parent | ce0e576ac41ee22cf821b640e97e07f263ce44ce (diff) | |
download | userland-445fda1b3984f3df7e6a724c406579e365c7b656.tar.gz userland-445fda1b3984f3df7e6a724c406579e365c7b656.tar.bz2 userland-445fda1b3984f3df7e6a724c406579e365c7b656.tar.xz userland-445fda1b3984f3df7e6a724c406579e365c7b656.zip |
Merge branch 'bsdutil' into 'master'
lib/bsdutil: add library for common utility functions
See merge request Aerdan/userland!2
Diffstat (limited to 'template')
-rw-r--r-- | template/base.gpr | 24 | ||||
-rw-r--r-- | template/bin.gpr | 24 |
2 files changed, 29 insertions, 19 deletions
diff --git a/template/base.gpr b/template/base.gpr new file mode 100644 index 0000000..2516be4 --- /dev/null +++ b/template/base.gpr @@ -0,0 +1,24 @@ +abstract project base is + + CFLAGS := External_As_List ("CFLAGS", " "); + + for Languages use ("C"); + + package Compiler is + for Response_File_Format ("C") use "GCC_GNU"; + for Default_Switches ("C") use ("-I" & External ("PROJ_INCLUDE"), + "-std=c11", + "-Wall", + "-Wextra", + "-Wpedantic") & CFLAGS; + end Compiler; + + package Linker is + for Trailing_Switches ("C") use ("-lcurses", "-ltinfo", "-lbsd"); + end Linker; + + package Install is + for Install_Project use "false"; + end Install; + +end base; diff --git a/template/bin.gpr b/template/bin.gpr index db20fba..2948e1f 100644 --- a/template/bin.gpr +++ b/template/bin.gpr @@ -1,22 +1,8 @@ -abstract project bin is +with "lib/bsdutil/bsdutil.gpr"; +abstract project bin extends "template/base.gpr" is - CFLAGS := External_As_List ("CFLAGS", " "); - - for Languages use ("C"); - - package Compiler is - for Default_Switches ("C") use ("-std=c11", - "-Wall", - "-Wextra", - "-Wpedantic") & CFLAGS; - end Compiler; - - package Linker is - for Trailing_Switches ("C") use ("-lbsd"); - end Linker; - - package Install is - for Install_Project use "false"; - end Install; + package Linker renames base.Linker; + package Compiler renames base.Compiler; + package Install renames base.Install; end bin; |