libaco icon indicating copy to clipboard operation
libaco copied to clipboard

Addition of a build system generator

Open elfring opened this issue 7 years ago β€’ 12 comments

I suggest to reuse a higher level build system so that powerful checks for software features will become easier.

elfring avatar Jul 07 '18 14:07 elfring

Thanks Markus for your nice proposal :D

The reason why I choosed to write a simple bash script make.sh is because:

  • The libaco is very simple to build and also has very minimal dependencies on the POSIX.
gcc -g -O2 acosw.S aco.c app_of_libaco.c -o app_of_libaco
  • Using bash scripts could make the C flags matrix build process easier and clearer.

But still, adding the higher level build system support could even better.

I would like to add it to the ToDo list and it would be released in the future v1.3.0 since it is not so urgent.


Edit:

The reason why there is no such static or shared library makefile for libaco is because:

  • There are several C macro config choices in libaco's build;
  • The binary of libaco self is so tiny (15k~).

So, I think the best option for the developer is to configure the C macros and compile libaco himself. It would be clearer and is more impossible to make a mistake.

hnes avatar Jul 08 '18 02:07 hnes

elfring avatar Jul 08 '18 05:07 elfring

Maybe I'll choose to use CMake, but the priority of this issue is not so high.

hnes avatar Jul 08 '18 14:07 hnes

I have just committed a simple Makefile demo for test_aco_synopsis.c. A full functional makefile (also including the test suites) will come with the release of v1.3.0.

hnes avatar Jul 12 '18 12:07 hnes

I propose to invest development resources more in better build scripts than in a questionable make file.

elfring avatar Jul 13 '18 07:07 elfring

Of course, we will. That Makefile is just temporary and will be substituted in the future with our formal build system generator. I should have commented on it clearly.

hnes avatar Jul 13 '18 09:07 hnes

How do you think about to avoid intermediate work if you became convinced that other development approaches will provide better functionality?

elfring avatar Jul 13 '18 12:07 elfring

Sometimes, such intermediate work is unavoidable, but I'll try to reduce it. Yes, if there are better approaches and also cost little, absolutely I'll follow it.

On Fri, Jul 13, 2018 at 8:36 PM, Markus Elfring [email protected] wrote:

How do you think about to avoid intermediate work if you became convinced that other development approaches will provide better functionality?

β€” You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/hnes/libaco/issues/5#issuecomment-404821072, or mute the thread https://github.com/notifications/unsubscribe-auth/AHMtkyVk8ZApr7UDe8qjo8VaVlnlIt7_ks5uGJRZgaJpZM4VGYYB .

hnes avatar Jul 14 '18 00:07 hnes

Don't agree with using an overly-complex build system. A simple makefile should be more than enough.

Check out this code philosophy; I think your code is so tiny it fits right in. https://github.com/nothings/single_file_libs

ddengster avatar Jul 14 '18 07:07 ddengster

Thank you very much for your kindly advice, @ddengster.

In the future, even we decide to add some build system generator, that would be only limited to the build of the test suites. There would be no such static or shared library makefile for libaco (the reason is described in the 2nd comment of this thread) unless there are some very strong benefits.

hnes avatar Jul 16 '18 04:07 hnes

Is a build approach like β€œGNU Libtool” another incentive for further evolution in this software area?

elfring avatar Jul 16 '18 06:07 elfring

Any updates on this @hnes ? :slightly_smiling_face:

techbech avatar Jan 09 '21 12:01 techbech