forked from sanjayg0/feappv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
executable file
·44 lines (33 loc) · 1.13 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
include $(FEAPPVHOME5_1)/makefile.in
SOURCES = $(wildcard $(FSOURCE)*.$(FEXT)) $(wildcard $(CSOURCE)*.$(CEXT)) $(wildcard $(F90SOURCE)*.$(F90EXT))
GENMODS = $(wildcard *genmod.$(F90EXT))
SOURCEST = $(filter-out $(GENMODS),$(SOURCES))
OBJSF = $(patsubst %.f,%.o,$(SOURCEST))
OBJSF90 = $(patsubst %.f90,%.o,$(OBJSF))
OBJS = $(patsubst %.c,%.o,$(OBJSF90))
FL = built_objs
.SILENT:
archive:
@rm -f $(FL); \
$(MAKE) $(ARFEAPPV); \
MKRET=$$?; \
if [ -f $(FL) ]; then \
$(AR) $(ARFEAPPV) `cat $(FL)`; \
rm `cat $(FL)`; \
echo "--->`pwd` objects now up-to-date<---"; \
fi; \
if [ $$MKRET -ne 0 ]; then false; fi;
$(ARFEAPPV): $(ARFEAPPV)($(OBJS))
clean:
rm -f *.o
rm -f *genmod.mod
rm -f *genmod.f90
(%.o): %.f
@if $(FF) -c -I$(FINCLUDE) $(FFOPTFLAG) $(PMODULEDIR) $< -o $*.o; then echo $*.o >> $(FL); else false; fi;
@echo "Building $*.o"
(%.o): %.f90
@if $(FF) -c -I$(FINCLUDE) $(FFOPTFLAG) $(PMODULEDIR) $< -o $*.o; then echo $*.o >> $(FL); else false; fi;
@echo "Building $*.o"
(%.o): %.c
@if $(CC) -c -I$(CINCLUDE) $(CCOPTFLAG) $< -o $*.o; then echo $*.o >> $(FL); else false; fi;
@echo "Building $*.o"