镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Makefile: clean up CFLAGS and LDFLAGS #254

Open

Description

@rosenhouse

The way the Makefile treads CFLAGS and LDFLAGS is confusing.

Currently DEFAULT_CFLAGS and DEFAULT_LDFLAGS apply to both debug and release builds, but CFLAGS and LDFLAGS apply only to release builds. Also the DEFAULT_ flavor may be prepended-to via environment variables, but the non-default ones cannot.

Let's try to simplify it and make it more comprehensible.

One idea:

  • remove the DEFAULT_ flavored ones
  • CFLAGS and LDFLAGS can be initialized from the environment
  • the difference between debug and release builds appears only in the relevant make targets

This could also be a place to simplify the sanitizer settings, e.g. by having a single SANITIZE environment variable, e.g. SANITIZE=memory which gets rendered via make to both CFLAGS and LDFLAGS -fsanitize=memory etc.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions