cococry/ragnar

Suggestion to improve the Makefile portability

Closed this issue · 0 comments

Hi, I am the maintainer of ragnarwm on nixpkgs.

I would like to suggest some improvement to facilitate the build by adding a few changes to the current Makefile:

  • Automatically Build the api/lib/ragnar.a lib from the main Makefile by calling make -C:
RAGNAR_API = api/lib/ragnar.a

all: $(RAGNAR_API)
    ...

$(RAGNAR_API):
    $(MAKE) -C api
  • Add -isystem api/include to CFLAGS allow the resolution of #include <ragnar/api.h> without having to have it system-wide

  • Remove the use of sudo to make the installation rule more portable. It should be invoked with (sudo-cmd) make install outside the Makefile.

  • Add a PREFIX variable that point to the installation directory:

PREFIX = /usr

so it can be easily changed for another directory