Skip to content

Conversation

@jlec
Copy link

@jlec jlec commented Feb 19, 2017

No description provided.

Copy link

@SoapGentoo SoapGentoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 $@

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also include CXXFLAGS

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. these should be added to a flag called yaha_CPPFLAGS (as they're preprocessor flags) and passed separately
  2. preprocessor flags should never be split: use -DCOMPILE_USER_MODE over -D COMPILE_USER_MODE

Properly use CXXFLAGS, CFLAGS, CPPFLAGS and CC.

Signed-off-by: Justin Lecher <jlec@gentoo.org>
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.

2 participants