Makefile-alt with CURSESCFLAGS and CURSESLIBS options#45
Open
Hibou57 wants to merge 2 commits intodeadpixi:masterfrom
Open
Makefile-alt with CURSESCFLAGS and CURSESLIBS options#45Hibou57 wants to merge 2 commits intodeadpixi:masterfrom
Hibou57 wants to merge 2 commits intodeadpixi:masterfrom
Conversation
An alternate Makefile better suited to people using `pkg-config` for their ncurses library (the one on my Ubuntu 16.04 32bits is obsolete, it is still v5 while MTM expects v6). I could have added an invocation to `pkg-config`, but it makes it more general if it just use two `CURSESCFLAGS` and `CURSESLIBS`. Not `CURSESLIBS` is not always just a matter of paths, it may be a matter of linker options. Ex for me, `pkg-config` says:
$ pkg-config --cflags ncursesw
> -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/home/yannick/apps/ncurses/include/ncursesw -I/home/yannick/apps/ncurses/include
$ pkg-config --libs ncursesw
> -L/home/yannick/apps/ncurses/lib -Wl,-rpath,/home/yannick/apps/ncurses/lib -lncursesw
Note the `-Wl,-rpath …` part, which is why a library path is not always enough. For a custom ncurses library, an `-I…` option is also required for the C compilation.
This is why I’m proposing alternate Makefile addition, with `CURSESCFLAGS` and `CURSESLIBS` options.
|
I’d squash the second into the first commit, but besides that, that’s also what I need for my environment. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An additional and alternate Makefile, better suited to people using
pkg-configfor theirncurseswlibrary (the one on my Ubuntu 16.04 32bits is obsolete, it is still v5 while MTM expects v6). I could have added an invocation topkg-configdirectly in the Makefile, but it makes it more general if it just uses twoCURSESCFLAGSandCURSESLIBSoptions which can freely be set on invocation.Example usage:
Note
CURSESLIBSis not always just a matter of paths, it may be a matter of linker options. Ex for me, whatpkg-configsays aboutncursesw, is:Note the
-Wl,-rpath …part, which is why a library path is not always enough. For a custom ncurses library, an-I…option is also required for the C compilation.This is why I’m proposing an additional and alternate Makefile, with
CURSESCFLAGSandCURSESLIBSoptions.