+
Skip to content

Makefile: Use $CPPFLAGS and $LDFLAGS if they are set #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

jmarshall
Copy link
Contributor

Makefile convention is to use CC/CPPFLAGS/CFLAGS/LDFLAGS/LIBS variables in the compile and link rules. This adds $(CPPFLAGS) and $(LDFLAGS) to the appropriate rules, so that these two can also be used to customise the build in the expected conventional way — in addition to the already present $(CC), $(CFLAGS), and $(LIBS).

In particular, bioconda and Debian would take advantage of these variables in their packaging scripts. Supersedes and closes #247.

@mr-c
Copy link
Contributor

mr-c commented Nov 21, 2020

Thank you @jmarshall, the Debian packagers agree with this PR.

The bwa makefile doesn't set these two itself, but the environment
or make command line might set any of CC/CPPFLAGS/CFLAGS/LDFLAGS/LIBS.
Use $(CPPFLAGS) when compiling and $(LDFLAGS) when linking so they can
be used to customise the build. Remove $(DFLAGS) from link commands as
these preprocessor options are irrelevant for linking.
@jmarshall
Copy link
Contributor Author

@lh3 Please also consider applying this PR, which makes it easier for Debian/Bioconda/etc to adjust the build flags.

@lh3 lh3 merged commit 2d4272b into lh3:master Mar 7, 2022
@jmarshall jmarshall deleted the std-vars branch March 7, 2022 14:53
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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载