-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52b6da9
commit 86045cc
Showing
85 changed files
with
104,489 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
TOP=$(shell pwd) | ||
CONFFILE= $(TOP)/config/Makefile.inc | ||
|
||
include $(CONFFILE) | ||
|
||
DIRMODS= OceanCurrents OceanWaves | ||
|
||
SOURCES = SimOcean.f90 | ||
OBJS=$(SOURCES:.f90=.o) | ||
|
||
.PHONY : all dist plugin dust clobber | ||
|
||
all: dist | ||
|
||
dist: | ||
@echo | ||
@echo "*************************************************" | ||
@echo "Ocean Plugin Makefile" | ||
@echo "*************************************************" | ||
@echo | ||
@mkdir -p $(BUILDDIR) | ||
@mkdir -p $(OBJDIR) | ||
@mkdir -p $(MODDIR) | ||
@mkdir -p $(LIBDIR) | ||
@mkdir -p bin | ||
for i in $(DIRMODS) ; do \ | ||
( cd $$i ; make dist) ; \ | ||
done | ||
@echo "*************************************************" | ||
@echo | ||
@echo "Build Ocean binary." | ||
@echo | ||
@echo "*************************************************" | ||
@$(if $(wildcard SimOcean.o),rm -f SimOcean.o,) | ||
make $(EXEC) | ||
|
||
plugin : | ||
cd $(DIRPLUG); make plugin; | ||
@echo "*************************************************" | ||
@echo | ||
@echo "Ocean shared library created." | ||
@echo | ||
@echo "*************************************************" | ||
|
||
$(EXEC) : $(OBJS) | ||
$(F90) $(FFLAGS) $(FOXFLAGS) $(H5FLAGS) -o $@ $^ $(LDFLAGS) -lOcean $(H5LDFLAGS) $(H5LIBS) $(LDFOXFLAGS) | ||
#rm *.o | ||
@echo "*************************************************" | ||
@echo | ||
@echo "Ocean updated in ./bin/." | ||
@echo | ||
@echo "*************************************************" | ||
|
||
%.o : %.f90 | ||
$(F90) $(FFLAGS) $(FOXFLAGS) $(H5FLAGS) -c $< -o $@ | ||
$(AR) $(LIBDIR)/libOcean.a $(OBJDIR)/*.o | ||
|
||
dust : | ||
for i in $(DIRMODS) ; do \ | ||
( cd $$i ; make dust) ; \ | ||
done | ||
$(foreach module,$(MODULES),cd $(module); cd - ; ) | ||
rm -fv *~ *.bak *.o *.mod *.original | ||
|
||
clobber : dust | ||
for i in $(DIRMODS) ; do \ | ||
( cd $$i ; make clobber) ; \ | ||
done | ||
rm -rfv $(BUILDDIR) |
Oops, something went wrong.