-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes to Makefiles, update bin.block, update gitignore, update README…
… for dprep.
- Loading branch information
Showing
6 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#Makefile | ||
############################################################################### | ||
# Include definitions | ||
############################################################################### | ||
include ../include.mk | ||
############################################################################### | ||
# Compiler commands | ||
############################################################################### | ||
INCLUDES = $(UTILS_INCS) $(PAR_INCS) $(HDF5_INCS) | ||
F_CD1 = $(F_COMP) -c $(F_OPTS1) $(INCLUDES) | ||
F_CD2 = $(F_COMP) -c $(F_OPTS2) $(INCLUDES) | ||
C_CD = $(C_COMP) -c $(C_OPTS) $(INCLUDES) $(PAR_DEFS) $(HDF5_DEFS) | ||
|
||
C_CM =$(C_CD) -D$(CMACH) $< && $(ARCH) $@ $(<F:.c=.o) && rm -f $(<F:.c=.o) | ||
F_CM1=$(F_CD1) $< && $(ARCH) $@ $(<F:.f90=.o) && rm -f $(<F:.f90=.o) | ||
F_CM2=$(F_CD2) $< && $(ARCH) $@ $(<F:.f90=.o) && rm -f $(<F:.f90=.o) | ||
F_CM3=$(F_CD2) -D$(CMACH) $< && $(ARCH) $@ $(<F:.F90=.o) && rm -f $(<F:.F90=.o) | ||
|
||
################################################################################ | ||
## File extension rules | ||
################################################################################ | ||
$(ARC)(%.o): %.f90; $(F_CM2) | ||
|
||
$(ARC)(%.o): %.F90; $(F_CM3) | ||
|
||
$(ARC)(%.o): %.c; $(C_CM) | ||
|
||
################################################################################ | ||
# Define objects | ||
################################################################################ | ||
OBJ = $(ARC)($(MODEL)/block/hdf5_f2c.o) \ | ||
$(ARC)($(MODEL)/block/hdf5_utils.o) \ | ||
$(ARC)($(MODEL)/lib/rget.o) | ||
|
||
############################################################################### | ||
# Define archive and executable names | ||
############################################################################### | ||
BASE=mk-blkfiles | ||
EXE=$(BASE)-$(RAMS_VERSION) | ||
ARC=$(BASE)-$(RAMS_VERSION).a | ||
|
||
# Define main source. | ||
MAIN_OBJ = ./mk_main.o | ||
MAIN = $(MODEL)/block/mk_main.f90 | ||
|
||
# Define targets. | ||
all: $(EXE) | ||
|
||
$(EXE): $(ARC) $(MAIN) FORCE | ||
@echo "" | ||
$(F_COMP) -o $(EXE) $(MAIN_OBJ) $(LOADER_OPTS) $(ARC) \ | ||
$(HDF5_LIBS) $(LIBS) $(PAR_LIBS) | ||
rm -f *.o | ||
@echo "" | ||
@echo Finished building === $(EXE) | ||
@echo "" | ||
|
||
$(MAIN): FORCE | ||
@echo "" | ||
$(F_CD2) $@ | ||
|
||
$(ARC): $(OBJ) | ||
|
||
FORCE: | ||
|
||
check: FORCE | ||
@echo "" | ||
check | ||
|
||
clean: | ||
@echo "" | ||
rm -f $(ARC) $(EXE) $(BASE) *.o *.mod *.f | ||
@echo "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters