dssp-2.1.0-gentoo.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. makefile | 21 +++++++++++----------
  2. 1 file changed, 11 insertions(+), 10 deletions(-)
  3. diff --git a/makefile b/makefile
  4. index d6f335e..68736c6 100644
  5. --- a/makefile
  6. +++ b/makefile
  7. @@ -25,22 +25,23 @@ BOOST_LIBS = thread filesystem program_options iostreams system
  8. LIBS = $(BOOST_LIBS:%=boost_%$(BOOST_LIB_SUFFIX)) z bz2
  9. DEFINES = USE_COMPRESSION LINUX VERSION='"$(VERSION)"'
  10. -CXX = g++
  11. +CXX ?= g++
  12. -CFLAGS += $(INC_DIR:%=-I%) -iquote src -g -Wall -Wno-multichar -pthread
  13. -LDOPTS += $(LIB_DIR:%=-L%) $(LIBS:%=-l%) -g -pthread
  14. +CPPFLAGS += $(INC_DIR:%=-I%) -iquote src
  15. +CXXFLAGS += -Wall -Wno-multichar -pthread
  16. +LDOPTS += $(LIB_DIR:%=-L%) $(LIBS:%=-l%) -pthread
  17. OBJ_DIR = obj
  18. ifeq ($(DEBUG),1)
  19. OBJ_DIR := $(OBJ_DIR).dbg
  20. -CFLAGS += -g3
  21. +CFLAGS +=
  22. else
  23. DEFINES += NDEBUG
  24. -CFLAGS += -O3
  25. +CFLAGS +=
  26. endif
  27. -CFLAGS += $(DEFINES:%=-D%)
  28. +CPPFLAGS += $(DEFINES:%=-D%)
  29. DIST_NAME = dssp-$(VERSION)
  30. @@ -50,18 +51,18 @@ OBJECTS = $(OBJ_DIR)/mkdssp.o $(OBJ_DIR)/dssp.o $(OBJ_DIR)/primitives-3d.o $(OBJ
  31. mkdssp: $(OBJECTS)
  32. @ echo linking $@
  33. - @ $(CXX) -static -o $@ $^ $(LDOPTS)
  34. + $(CXX) $(LDFLAGS) -o $@ $^ $(LDOPTS)
  35. include $(OBJECTS:%.o=%.d)
  36. $(OBJECTS:.o=.d):
  37. -$(OBJ_DIR):
  38. +OBJ_DIR:
  39. @ mkdir -p $(OBJ_DIR)
  40. -$(OBJ_DIR)/%.o: %.cpp | $(OBJ_DIR)
  41. +$(OBJ_DIR)/%.o: %.cpp OBJ_DIR
  42. @ echo compiling $@
  43. - @ $(CXX) -MD -c -o $@ $< $(CFLAGS)
  44. + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c -o $@ $<
  45. clean:
  46. install -d $(BIN_DIR) $(MAN_DIR)