5.3-makefile-fixes.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. source/Makefile | 17 ++++++++++-------
  2. 1 files changed, 10 insertions(+), 7 deletions(-)
  3. diff --git a/source/Makefile b/source/Makefile
  4. index 46d89cc..aa751c7 100644
  5. --- a/source/Makefile
  6. +++ b/source/Makefile
  7. @@ -78,8 +78,10 @@ CFLAGS = -Wall -pipe -g3
  8. #CFLAGS = -Wall -pipe -marchi686 -pedantic -gdwarf-2 -g3
  9. #CFLAGS = -Wall -O3 -march=i686
  10. ifneq ($(FFTW),/usr/local)
  11. +ifneq ($(FFTW),/usr)
  12. CFLAGS += -I$(INC)
  13. endif
  14. +endif
  15. # NOTE:
  16. # DOUBLESWITCH = ON for double precision;
  17. @@ -91,15 +93,15 @@ endif
  18. DOUBLESWITCH = ON
  19. ifeq ($(DOUBLESWITCH),ON)
  20. -LDFLAGS = -L$(LIB) -ldfftw -lm
  21. +LIBS = -L$(LIB) -ldfftw -lm
  22. CFLAGS += -DDOUBLE
  23. TARGET = deden
  24. else
  25. -LDFLAGS = -L$(LIB) -lsfftw -lm
  26. +LIBS = -L$(LIB) -lsfftw -lm
  27. TARGET = seden
  28. endif
  29. -LDFLAGS += -g -lgsl -lgslcblas
  30. +LIBS += -lgsl -lgslcblas
  31. # GSL_PREFIX:= /sw/lib
  32. # LDFLAGS += -l$(GSL_PREFIX)/libgsl.a -l$(GSL_PREFIX)/libgslcblas.a
  33. @@ -120,17 +122,18 @@ OBJ = addmaps.o apodfc.o apodfo.o back.o cadhkl.o \
  34. all: eden fbyteswap
  35. eden: eden.o $(OBJ)
  36. - $(CC) $^ $(LDFLAGS) -o $@
  37. + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
  38. fbyteswap: fbyteswap.c
  39. - $(CC) -o $@ $^
  40. + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
  41. install: all
  42. + mkdir -p $(BIN)
  43. mv fbyteswap $(BIN)
  44. mv eden $(BIN)/$(TARGET)
  45. chmod 751 $(BIN)/$(TARGET)
  46. - chmod +x mkeden.csh
  47. - ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
  48. +# chmod +x mkeden.csh
  49. +# ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
  50. dist: clean
  51. cd ../..; tar -cvf eden_$(VERSION).tar --exclude CVS --exclude \#\*\# --exclude \*~ --exclude Misc --exclude .\* eden; gzip -f eden_$(VERSION).tar