1.2-gentoo.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. diff --git a/src/Makefile b/src/Makefile
  2. index a58462c..616f51a 100644
  3. --- a/src/Makefile
  4. +++ b/src/Makefile
  5. @@ -1,7 +1,7 @@
  6. -CC = g++
  7. -EXT=$(shell ./cpuflags.pl --opt )
  8. -FLAGS = -Wall $(EXT)
  9. -#FLAGS = -O3 -Wall -ffast-math
  10. +CXX ?= g++
  11. +#EXT=$(shell ./cpuCXXFLAGS.pl --opt )
  12. +#CXXFLAGS = -Wall $(EXT)
  13. +#CXXFLAGS = -O3 -Wall -ffast-math
  14. OBJS = utils-main.o utils-output.o utils-mrc.o
  15. all: cav chan fsv sol tun vdw vol
  16. @@ -17,54 +17,65 @@ volume: vol
  17. objects: utils-main.o utils-output.o utils-mrc.o
  18. cav: objects cavities.cpp
  19. - $(CC) $(FLAGS) -o Cavities.exe $(OBJS) cavities.cpp
  20. - chmod 777 Cavities.exe
  21. - mv Cavities.exe ../bin
  22. + $(CXX) $(CXXFLAGS) -c -o cavities.o cavities.cpp
  23. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o Cavities $(OBJS) cavities.o
  24. + chmod 755 Cavities
  25. + mv Cavities ../bin
  26. chan: objects channel.cpp
  27. - $(CC) $(FLAGS) -o Channel.exe $(OBJS) channel.cpp
  28. - chmod 777 Channel.exe
  29. - mv Channel.exe ../bin
  30. + $(CXX) $(CXXFLAGS) -c -o channel.o channel.cpp
  31. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o Channel $(OBJS) channel.o
  32. + chmod 755 Channel
  33. + mv Channel ../bin
  34. fsv: objects fsv_calc.cpp
  35. - $(CC) $(FLAGS) -o FsvCalc.exe $(OBJS) fsv_calc.cpp
  36. - chmod 777 FsvCalc.exe
  37. - mv FsvCalc.exe ../bin
  38. + $(CXX) $(CXXFLAGS) -c -o fsv_calc.o fsv_calc.cpp
  39. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o FsvCalc $(OBJS) fsv_calc.o
  40. + chmod 755 FsvCalc
  41. + mv FsvCalc ../bin
  42. sol: objects solvent.cpp
  43. - $(CC) $(FLAGS) -o Solvent.exe $(OBJS) solvent.cpp
  44. - chmod 777 Solvent.exe
  45. - mv Solvent.exe ../bin
  46. + $(CXX) $(CXXFLAGS) -c -o solvent.o solvent.cpp
  47. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o Solvent $(OBJS) solvent.o
  48. + chmod 755 Solvent
  49. + mv Solvent ../bin
  50. tun: objects tunnel.cpp
  51. - $(CC) $(FLAGS) -o Tunnel.exe $(OBJS) tunnel.cpp
  52. - chmod 777 Tunnel.exe
  53. - mv Tunnel.exe ../bin
  54. + $(CXX) $(CXXFLAGS) -c -o tunnel.o tunnel.cpp
  55. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o Tunnel $(OBJS) tunnel.o
  56. + chmod 755 Tunnel
  57. + mv Tunnel ../bin
  58. vdw: objects vdw.cpp
  59. - $(CC) $(FLAGS) -o VDW.exe $(OBJS) vdw.cpp
  60. - chmod 777 VDW.exe
  61. - mv VDW.exe ../bin
  62. + $(CXX) $(CXXFLAGS) -c -o vdw.o vdw.cpp
  63. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o VDW $(OBJS) vdw.o
  64. + chmod 755 VDW
  65. + mv VDW ../bin
  66. vol: objects volume.cpp
  67. - $(CC) $(FLAGS) -o Volume.exe $(OBJS) volume.cpp
  68. - chmod 777 Volume.exe
  69. - mv Volume.exe ../bin
  70. + $(CXX) $(CXXFLAGS) -c -o volume.o volume.cpp
  71. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o Volume $(OBJS) volume.o
  72. + chmod 755 Volume
  73. + mv Volume ../bin
  74. utils-main.o: utils-main.cpp
  75. - $(CC) $(FLAGS) -c -o utils-main.o utils-main.cpp
  76. + $(CXX) $(CXXFLAGS) -c -o utils-main.o utils-main.cpp
  77. utils-output.o: utils-main.o utils-output.cpp
  78. - $(CC) $(FLAGS) -c -o utils-output.o utils-output.cpp
  79. + $(CXX) $(CXXFLAGS) -c -o utils-output.o utils-output.cpp
  80. utils-mrc.o: utils-mrc.cpp
  81. - $(CC) $(FLAGS) -c -o utils-mrc.o utils-mrc.cpp
  82. + $(CXX) $(CXXFLAGS) -c -o utils-mrc.o utils-mrc.cpp
  83. +
  84. +install:
  85. + install -d $(DESTDIR)/usr/bin
  86. + install ../bin/* $(DESTDIR)/usr/bin/
  87. clean:
  88. rm -fv *.o *~
  89. distclean:
  90. - rm -fv *.o ../bin/*.exe *~
  91. + rm -fv *.o ../bin/* *~
  92. none:
  93. echo "Please type make xxx, where xxx = cav, cha, fsv, sol, tun, vdw, or vol"