diff --git a/colors/Makefile b/colors/Makefile new file mode 100644 index 000000000..262364146 --- /dev/null +++ b/colors/Makefile @@ -0,0 +1,27 @@ +include ../make/defaults-module.mk + +# Build + +MODULE_NAME := colors +SRCS := public/colors_def.f90 \ + public/colors_lib.f90 \ + private/mod_colors.f90 +SRCS_CHECK := test/src/test_colors.f90 +INTERNAL_DEPENDS_ON := const utils math +EXTERNAL_DEPENDS_ON := +BINTYPE := static-lib + +# Testing + +CHECK_RESULTS_GOLDEN := test/test_output + +# Install + +MODULES := colors_def.mod colors_lib.mod +INSTALL_INCLUDES := +INSTALL_COMMANDS += install-colors-data + +include $(MAKE_DIR)/Makefile + +install-colors-data: + mkdir -p ../data/colors_data && cp data/lcb98cor.dat data/blackbody_johnson.dat ../data/colors_data diff --git a/colors/build_and_test b/colors/build_and_test deleted file mode 100755 index e02a156fe..000000000 --- a/colors/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/colors/build_and_test_parallel b/colors/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/colors/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test_parallel diff --git a/colors/build_data_and_export b/colors/build_data_and_export deleted file mode 100755 index b8f88026e..000000000 --- a/colors/build_data_and_export +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -function check_okay { - if [ $? -ne 0 ] - then - exit 1 - fi -} - - -mkdir -p data -cd data -check_okay -cd .. - -rm -rf ../data/colors_data -check_okay -mkdir ../data/colors_data -check_okay -cp data/lcb98cor.dat ../data/colors_data -cp data/blackbody_johnson.dat ../data/colors_data -check_okay -echo "done" - -cd .. diff --git a/colors/clean b/colors/clean deleted file mode 100755 index 6957bce5c..000000000 --- a/colors/clean +++ /dev/null @@ -1,2 +0,0 @@ -cd make; make clean -cd ../test/make; make clean \ No newline at end of file diff --git a/colors/export b/colors/export deleted file mode 100755 index db3250885..000000000 --- a/colors/export +++ /dev/null @@ -1,2 +0,0 @@ - -../utils/e1 diff --git a/colors/i1 b/colors/i1 deleted file mode 100755 index 8c377979b..000000000 --- a/colors/i1 +++ /dev/null @@ -1 +0,0 @@ -../utils/i1 diff --git a/colors/i1p b/colors/i1p deleted file mode 100755 index 75f0da679..000000000 --- a/colors/i1p +++ /dev/null @@ -1 +0,0 @@ -../utils/i1p diff --git a/colors/make/makefile b/colors/make/makefile deleted file mode 100644 index 2a4718cad..000000000 --- a/colors/make/makefile +++ /dev/null @@ -1,8 +0,0 @@ -# QUIET makes the output from the compilation process much less verbose -- basically, -# show which files are being compiled with which generic compilation command. The -# goal of QUIET is to make it easier to spot warnings and/or circular dependency -# errors. - -QUIET = yes - -include makefile_base diff --git a/colors/make/makefile_base b/colors/make/makefile_base deleted file mode 100644 index 80ae1cdc5..000000000 --- a/colors/make/makefile_base +++ /dev/null @@ -1,109 +0,0 @@ -# This is the makefile for the mesa colors package - -MESA_DIR = ../.. - -################################################################# -# -# PREAMBLE - -include $(MESA_DIR)/utils/makefile_header - -################################################################# -# -# SOURCES - -SRCS = \ - colors_def.f90 \ - mod_colors.f90 \ - colors_lib.f90 - -################################################################# -# -# LIBRARIES - -ifeq ($(USE_SHARED), YES) - LIBS_OTHER = $(LIBS_MATRIX) - DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER)) - LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX) -endif - -################################################################# -# -# TARGETS - -LIB = libcolors.$(LIB_SUFFIX) - -OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS))) - -$(LIB) : $(OBJS) $(DEPS_OTHER) -ifneq ($(QUIET),) - @echo LIB_TOOL $(LIB) - @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER) -else - $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER) -endif - -clean: - -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod - -install: - @$(CP_IF_NEWER) colors_lib.mod $(MESA_DIR)/include - @$(CP_IF_NEWER) colors_def.mod $(MESA_DIR)/include - @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib - -nodeps : $(.DEFAULT_GOAL) - -################################################################# -# -# COMPILATION RULES - -COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) - -COMPILE_CMD = $(COMPILE) - -%.o : %.mod - -%.o : %.f -ifneq ($(QUIET),) - @echo COMPILE_CMD $< - @$(COMPILE_CMD) $< -else - $(COMPILE_CMD) $< -endif - -%.o : %.f90 -ifneq ($(QUIET),) - @echo COMPILE_CMD $< - @$(COMPILE_CMD) $< -else - $(COMPILE_CMD) $< -endif - -%.mod : %.o - @true - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR) - -vpath %.f90 $(SRC_PATH) - -vpath %.mod $(MESA_DIR)/include - -NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS))) - -ifeq ($(NODEPS),) - - .depend : - ifneq ($(QUIET),) - @echo MAKEDEPF90 - @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - else - $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - endif - - -include .depend - -endif diff --git a/colors/mk b/colors/mk deleted file mode 100755 index f2ac277d6..000000000 --- a/colors/mk +++ /dev/null @@ -1 +0,0 @@ -cd make; make \ No newline at end of file diff --git a/colors/test/ck b/colors/test/ck deleted file mode 100755 index c429ea480..000000000 --- a/colors/test/ck +++ /dev/null @@ -1 +0,0 @@ -./../../utils/test/ck \ No newline at end of file diff --git a/colors/test/clean b/colors/test/clean deleted file mode 100755 index fe8d63c0c..000000000 --- a/colors/test/clean +++ /dev/null @@ -1,2 +0,0 @@ -cd make -make clean diff --git a/colors/test/cleanup b/colors/test/cleanup deleted file mode 100755 index e383ea3f7..000000000 --- a/colors/test/cleanup +++ /dev/null @@ -1,4 +0,0 @@ -cd make -make clean -cd ../../make -make clean diff --git a/colors/test/export b/colors/test/export deleted file mode 100755 index 0f6ebc965..000000000 --- a/colors/test/export +++ /dev/null @@ -1,2 +0,0 @@ -cd .. -./export diff --git a/colors/test/make/makefile b/colors/test/make/makefile deleted file mode 100644 index 2a4718cad..000000000 --- a/colors/test/make/makefile +++ /dev/null @@ -1,8 +0,0 @@ -# QUIET makes the output from the compilation process much less verbose -- basically, -# show which files are being compiled with which generic compilation command. The -# goal of QUIET is to make it easier to spot warnings and/or circular dependency -# errors. - -QUIET = yes - -include makefile_base diff --git a/colors/test/make/makefile_base b/colors/test/make/makefile_base deleted file mode 100644 index c8a5b0cb2..000000000 --- a/colors/test/make/makefile_base +++ /dev/null @@ -1,87 +0,0 @@ -# This is the makefile for testing the mesa colors package - -MESA_DIR = ../../.. - -################################################################# -# -# PREAMBLE - -include $(MESA_DIR)/utils/makefile_header - -################################################################# -# -# SOURCES - -SRCS = test_colors.f90 - -################################################################# -# -# LIBRARIES - -LIBS_LOCAL = colors -DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL)) -LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL)) - -LIBS_OTHER = $(LIBS_MATRIX) -DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER)) -LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX) - -################################################################# -# -# TARGETS - -TEST = $(TEST_DIR)/tester - -OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS))) - -$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER) -ifneq ($(QUIET),) - @echo LOADER $@ - @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS) -else - $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS) -endif - -clean: - -@rm -f *.o *.mod .depend $(TEST) - -nodeps : $(.DEFAULT_GOAL) - -################################################################# -# -# COMPILATION RULES - -%.o: %.f90 -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(FC_free_preprocess) $< -else - $(TEST_COMPILE) $(FC_free_preprocess) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f90 $(SRC_PATH) - -vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include - -NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS))) - -ifeq ($(NODEPS),) - - .depend : - ifneq ($(QUIET),) - @echo MAKEDEPF90 - @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - else - $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - endif - - -include .depend - -endif - diff --git a/colors/test/mk b/colors/test/mk deleted file mode 100755 index 78c91b0e9..000000000 --- a/colors/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -function check_okay { - if [ $? -ne 0 ] - then - echo - echo "FAILED" - echo - exit 1 - fi -} - -cd ../make; make; check_okay -cd ../test/make; make diff --git a/colors/test/mkx b/colors/test/mkx deleted file mode 100755 index 25826f7f3..000000000 --- a/colors/test/mkx +++ /dev/null @@ -1 +0,0 @@ -./mk; ./export diff --git a/colors/test/rn b/colors/test/rn deleted file mode 100755 index e5d7960ab..000000000 --- a/colors/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/install b/install index 9dfa0fe94..22a892213 100755 --- a/install +++ b/install @@ -335,12 +335,6 @@ function do_input_data { cd .. } -if [ ! -r data/colors_data ] -then - do_input_data colors -fi -do_one_parallel colors - if [ ! -r data/kap_data ] then do_input_data kap diff --git a/make/subdirs.mk b/make/subdirs.mk index f7ebaad1c..b2f4d4006 100644 --- a/make/subdirs.mk +++ b/make/subdirs.mk @@ -1 +1 @@ -SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos forum +SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos forum colors diff --git a/touch b/touch index f29d596aa..29b5def38 100755 --- a/touch +++ b/touch @@ -23,7 +23,6 @@ do_one adipls do_one astero do_one atm do_one binary -do_one colors do_one gyre do_one ionization do_one kap