Skip to content

Use makefile variables in a more standard manner#35

Open
0mp wants to merge 1 commit intodeadpixi:masterfrom
0mp:makefile
Open

Use makefile variables in a more standard manner#35
0mp wants to merge 1 commit intodeadpixi:masterfrom
0mp:makefile

Conversation

@0mp
Copy link

@0mp 0mp commented Aug 6, 2019

In order to make mtm easier to compile on a variety of operating
systems, let's use more standard makefile flags:

  • Use CFLAGS for compiler flags.
  • Use CPPFLAGS for preprocessor flags.
  • Use LDFLAGS for linker flags.
  • Deprecate LIBS in favor of LIBRARIES. It is better to avoid the use of
    LIBS for custom values as it is often used to store information for
    the linker.
  • Deprecate LIBPATH. Use LDFLAGS to specify directories to search for
    libraries.

This way, for example, mtm can be compiled on FreeBSD with the following
command:

env CFLAGS="-I/usr/local/include -I/usr/local/include/ncurses" \
        LDFLAGS=-L/usr/local/lib \
        make clean all

Also, I did not touch the HEADERS variable as I do not understand its
purpose.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants