Skip to content

Commit

Permalink
Merge pull request #3 from iambaim/use_actions
Browse files Browse the repository at this point in the history
Fix link to static fortran
  • Loading branch information
iambaim authored Mar 14, 2021
2 parents 7d04908 + 433d047 commit 5dc073e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ DEBUG_CFLAGS =
ECA_CFLAGS = $(DEBUG_CFLAGS) -g -O3 $(INCLUDE)

LIB = -lpthread -lm
LFLAGS = $(LIBTAUCS) $(LIBMETIS) $(LIBBLAS)
LFLAGS = -static-libgcc \
$(LIBTAUCS) $(LIBMETIS) $(LIBBLAS) \
$(or $(wildcard $(shell gcc -print-file-name=libgfortran.a)) ,-lgfortran) \
$(or $(wildcard $(shell gcc -print-file-name=libquadmath.a)) ,-lquadmath)
BIN = .
CC = gcc
LD = $(CC)
FC = gfortran
LD = gfortran -static-libgfortran -static-libgcc

# F2C lib for OSX
F2C =
Expand Down Expand Up @@ -125,13 +127,13 @@ all: caa install
caa: caa_main_model1 caa_main_model2 caa_main_predict

caa_main_model1: $(OBJ1) $(OBJ) $(LIBTAUCS)
$(LD) $(ECA_CFLAGS) $(OBJ1) $(OBJ) -o $(BIN)/caa_main_model1 $(LFLAGS) $(LIB)
$(LD) $(OBJ1) $(OBJ) -o $(BIN)/caa_main_model1 $(LFLAGS) $(LIB)

caa_main_model2: $(OBJ2) $(OBJ) $(LIBTAUCS)
$(LD) $(ECA_CFLAGS) $(OBJ2) $(OBJ) -o $(BIN)/caa_main_model2 $(LFLAGS) $(LIB)
$(LD) $(OBJ2) $(OBJ) -o $(BIN)/caa_main_model2 $(LFLAGS) $(LIB)

caa_main_predict: $(OBJ3) $(OBJ) $(LIBTAUCS)
$(LD) $(ECA_CFLAGS) $(OBJ3) $(OBJ) -o $(BIN)/caa_main_predict $(LFLAGS) $(LIB)
$(LD) $(OBJ3) $(OBJ) -o $(BIN)/caa_main_predict $(LFLAGS) $(LIB)
# $(LD) $(ECA_CFLAGS) $(OBJ) -o $(BIN)/predict $(LFLAGS) $(LIB)

$(LIBBLAS):
Expand Down

0 comments on commit 5dc073e

Please sign in to comment.