Update buildsystem for better downstream packaging#6
Open
jlec wants to merge 1 commit intoGregoryFaust:masterfrom
Open
Update buildsystem for better downstream packaging#6jlec wants to merge 1 commit intoGregoryFaust:masterfrom
jlec wants to merge 1 commit intoGregoryFaust:masterfrom
Conversation
SoapGentoo
reviewed
Feb 20, 2017
SoapGentoo
left a comment
There was a problem hiding this comment.
@GregoryFaust would you consider a pull request to autotool/CMake-ise the build system? Using autotools or CMake is much easier for distributions and users, as everyone knows how to use these.
Makefile
Outdated
|
|
||
| $(ODIR)/%.o: $(SDIR)/%.cpp | ||
| $(CPP) $(CPPFLAGS) -c $< -o $@ | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ |
There was a problem hiding this comment.
should preferably also pass CPPFLAGS as a user flag
Makefile
Outdated
| # Link the program | ||
| $(BDIR)/$(PROG): $(OBJS) | ||
| $(CPP) $(LDFLAGS) -o $@ $(OBJS) | ||
| $(CXX) $(LDFLAGS) -o $@ $(OBJS) |
Makefile
Outdated
| PROG := yaha | ||
| CCFLAGS := -Wall -O3 -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) | ||
| CFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) | ||
| CXXFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) |
There was a problem hiding this comment.
- these should be added to a flag called
yaha_CPPFLAGS(as they're preprocessor flags) and passed separately - preprocessor flags should never be split: use
-DCOMPILE_USER_MODEover-D COMPILE_USER_MODE
Properly use CXXFLAGS, CFLAGS, CPPFLAGS and CC. Signed-off-by: Justin Lecher <jlec@gentoo.org>
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.
No description provided.