diff --git a/src/C_libraries/BASE/Makefile b/src/C_libraries/BASE/Makefile index 158403cb..b1b2150d 100644 --- a/src/C_libraries/BASE/Makefile +++ b/src/C_libraries/BASE/Makefile @@ -3,6 +3,8 @@ # C_BASE_DIR = $$(C_SRCDIR)/BASE + +CURRENTDIR = $(shell pwd) SRC_BASE_C = $(shell ls *.c) INC_BASE_C = $(addsuffix .h,$(basename $(SRC_BASE_C)) ) OBJ_BASE_C = $(addsuffix .o,$(basename $(SRC_BASE_C)) ) @@ -37,11 +39,11 @@ depends: @for sources in $(SRC_BASE_C) ; do \ ( \ cd $(MAKEDIR); \ - $(CC) $(DEPFLAGS) $(OPTFLAGS_GL) $(C_INCLUDE) $(MHDDIR)/C_libraries/BASE/$$sources >> $(MAKENAME).tmp; \ + $(CC) $(DEPFLAGS) $(OPTFLAGS_GL) $(C_INCLUDE) $(CURRENTDIR)/$$sources >> $(MAKENAME).tmp; \ echo ' ''$$(CC)' -c '$$(OPTFLAGS) $$(C_INCLUDE) $$<' >> $(MAKENAME).tmp \ ) \ done - @sed -e 's@'$(MHDDIR)/C_libraries'@'$$\(C_SRCDIR\)'@g' $(MAKENAME).tmp > $(MHDDIR)/C_libraries/BASE/Makefile.depends + @sed -e 's@'$(MHDDIR)/C_libraries'@'$$\(C_SRCDIR\)'@g' $(CURRENTDIR)/Makefile.depends @rm $(MAKENAME).tmp clean: diff --git a/src/programs/TESTS/Compare/Makefile b/src/programs/TESTS/Compare/Makefile index 52a296a9..c3343997 100644 --- a/src/programs/TESTS/Compare/Makefile +++ b/src/programs/TESTS/Compare/Makefile @@ -4,7 +4,7 @@ COMPARISON_DIR = $$(TESTS_DIR)/Compare -TARGET_COMPARE_PSF = tests/compare_psf +TARGET_COMPARE_PSF = compare_psf SOURCES = $(shell ls *.f90) @@ -22,7 +22,7 @@ dir_list: @echo 'COMPARISON_DIR = $(COMPARISON_DIR)' >> $(MAKENAME) target_list: - @echo 'TARGET_COMPARE_PSF = $$(BUILDDIR)/$(TARGET_COMPARE_PSF)' \ + @echo 'TARGET_COMPARE_PSF = $$(TEST_BUILD_DIR)/$(TARGET_COMPARE_PSF)' \ >> $(MAKENAME) @echo >> $(MAKENAME) diff --git a/src/programs/TESTS/FFT_test/Makefile b/src/programs/TESTS/FFT_test/Makefile index e81918bb..320a14a0 100644 --- a/src/programs/TESTS/FFT_test/Makefile +++ b/src/programs/TESTS/FFT_test/Makefile @@ -6,11 +6,11 @@ FFT_TEST_DIR = $$(TESTS_DIR)/FFT_test -TARGET_FFTPACK_TEST = tests/test_FFTPACK -TARGET_FFW3_F_TEST = tests/test_FFTW3_f -TARGET_SGL_FFW3_TEST = tests/test_single_FFTW3 +TARGET_FFTPACK_TEST = test_FFTPACK +TARGET_FFW3_F_TEST = test_FFTW3_f +TARGET_SGL_FFW3_TEST = test_single_FFTW3 -TARGET_CMPR_FFT_TEST = tests/compare_fft_test +TARGET_CMPR_FFT_TEST = compare_fft_test TARGETS_FFT_TEST = \ '$$(TARGET_FFTPACK_TEST)' \ @@ -89,10 +89,10 @@ dir_list: @echo 'FFT_TEST_DIR = $(FFT_TEST_DIR)' >> $(MAKENAME) target_list: - @echo 'TARGET_FFTPACK_TEST = $$(BUILDDIR)/$(TARGET_FFTPACK_TEST)' >> $(MAKENAME) - @echo 'TARGET_FFW3_F_TEST = $$(BUILDDIR)/$(TARGET_FFW3_F_TEST)' >> $(MAKENAME) - @echo 'TARGET_SGL_FFW3_TEST = $$(BUILDDIR)/$(TARGET_SGL_FFW3_TEST)' >> $(MAKENAME) - @echo 'TARGET_CMPR_FFT_TEST = $$(BUILDDIR)/$(TARGET_CMPR_FFT_TEST)' >> $(MAKENAME) + @echo 'TARGET_FFTPACK_TEST = $$(TEST_BUILD_DIR)/$(TARGET_FFTPACK_TEST)' >> $(MAKENAME) + @echo 'TARGET_FFW3_F_TEST = $$(TEST_BUILD_DIR)/$(TARGET_FFW3_F_TEST)' >> $(MAKENAME) + @echo 'TARGET_SGL_FFW3_TEST = $$(TEST_BUILD_DIR)/$(TARGET_SGL_FFW3_TEST)' >> $(MAKENAME) + @echo 'TARGET_CMPR_FFT_TEST = $$(TEST_BUILD_DIR)/$(TARGET_CMPR_FFT_TEST)' >> $(MAKENAME) target_task: @echo fft_test: $(TARGETS_FFT_TEST) >> $(MAKENAME) diff --git a/src/programs/TESTS/Gauss_point_test/Makefile b/src/programs/TESTS/Gauss_point_test/Makefile index 60e526fb..123eab86 100644 --- a/src/programs/TESTS/Gauss_point_test/Makefile +++ b/src/programs/TESTS/Gauss_point_test/Makefile @@ -4,8 +4,8 @@ GAUSS_TEST_DIR = $$(TESTS_DIR)/Gauss_point_test -TARGET_GAUSS_TEST = tests/gauss_points -TARGET_CMP_GAUSS_TEST = tests/compare_gauss_points +TARGET_GAUSS_TEST = gauss_points +TARGET_CMP_GAUSS_TEST = compare_gauss_points SOURCES = $(shell ls *.f90) @@ -26,9 +26,9 @@ dir_list: @echo 'GAUSS_TEST_DIR = $(GAUSS_TEST_DIR)' >> $(MAKENAME) target_list: - @echo 'TARGET_GAUSS_TEST = $$(BUILDDIR)/$(TARGET_GAUSS_TEST)' \ + @echo 'TARGET_GAUSS_TEST = $$(TEST_BUILD_DIR)/$(TARGET_GAUSS_TEST)' \ >> $(MAKENAME) - @echo 'TARGET_CMP_GAUSS_TEST = $$(BUILDDIR)/$(TARGET_CMP_GAUSS_TEST)' \ + @echo 'TARGET_CMP_GAUSS_TEST = $$(TEST_BUILD_DIR)/$(TARGET_CMP_GAUSS_TEST)' \ >> $(MAKENAME) @echo >> $(MAKENAME) diff --git a/src/programs/TESTS/Legendre_test/Makefile b/src/programs/TESTS/Legendre_test/Makefile index 2298ee89..6f10fa55 100644 --- a/src/programs/TESTS/Legendre_test/Makefile +++ b/src/programs/TESTS/Legendre_test/Makefile @@ -4,7 +4,7 @@ SMDT_POLY_TEST_DIR = $$(TESTS_DIR)/Legendre_test -TARGET_SMDT_POLY = tests/test_schmidt_Legendre +TARGET_SMDT_POLY = test_schmidt_Legendre SOURCES = $(shell ls *.f90) @@ -21,7 +21,7 @@ dir_list: @echo 'SMDT_POLY_TEST_DIR = $(SMDT_POLY_TEST_DIR)' >> $(MAKENAME) target_list: - @echo 'TARGET_SMDT_POLY = $$(BUILDDIR)/$(TARGET_SMDT_POLY)' >> $(MAKENAME) + @echo 'TARGET_SMDT_POLY = $$(TEST_BUILD_DIR)/$(TARGET_SMDT_POLY)' >> $(MAKENAME) @echo >> $(MAKENAME) target_task: diff --git a/src/programs/TESTS/Makefile b/src/programs/TESTS/Makefile index c59018e9..43db6d54 100644 --- a/src/programs/TESTS/Makefile +++ b/src/programs/TESTS/Makefile @@ -1,7 +1,8 @@ # # # -TESTS_DIR = $$(PROG_DIR)/TESTS +TESTS_DIR = $$(PROG_DIR)/TESTS +TEST_BUILD_DIR = $$(BUILDDIR)/tests SUBDIRS = \ Gauss_point_test \ @@ -14,7 +15,8 @@ Compare # dir_list: - @echo 'TESTS_DIR = $(TESTS_DIR)' >> $(MAKENAME) + @echo 'TESTS_DIR = $(TESTS_DIR)' >> $(MAKENAME) + @echo 'TEST_BUILD_DIR = $(TEST_BUILD_DIR)' >> $(MAKENAME) @echo '#' >> $(MAKENAME) @for dir in $(SUBDIRS); do \ ( \