Commit afe6f6d4 authored by François Trigaux's avatar François Trigaux 🤠
Browse files

compilation as library enabled

parent eef47698
obj/*
!obj/.gitkeep
bin/*
!bin/.gitkeep
run/gebt*
run/output*
test.sh
.DS_Store
lib/*.
!lib/.gitkeep
run/
include/*
!include/.gitkeep
\ No newline at end of file
......@@ -2,18 +2,19 @@ CC=gcc
CF=gfortran
LD=gcc
LIBS=-lgfortran -lreadinifile
CFLAGS=-g
F90FLAGS=-g -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
FFLAGS=-g -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
CFLAGS=-g -fPIC
F90FLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
FFLAGS=-g -fPIC -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
# List of directories
DIRC=src/interface
DIRF90=src/fortran90
DIRF=src/fortran
OBJDIR=obj
BINDIR=bin
LIBDIR=bin
# List of objects
OBJC=c_analysis.o beam.o main.o
OBJC=c_analysis.o beam.o
OBJF90= CPUtime.o GlobalDataFun.o TimeFunction.o PrescribedCondition.o InternalData.o Preprocess.o Element.o Member.o System.o Solve.o EigenSolve.o Analysis.o Wrappers.o
OBJF=ddep.o ma28.o mc19.o blas.o lapack.o arpack.o
......@@ -22,7 +23,15 @@ OBJC := $(OBJC:%.o=$(OBJDIR)/%.o)
OBJF90 := $(OBJF90:%.o=$(OBJDIR)/%.o)
OBJF := $(OBJF:%.o=$(OBJDIR)/%.o)
default: $(OBJC) $(OBJF90) $(OBJF)
default: lib
# This default rule is to compile the gebt as an independent library
lib: $(OBJC) $(OBJF90) $(OBJF)
$(LD) $(CFLAGS) -o libgebt.so -shared $^ $(LIBS)
cp src/interface/*.h ./include/
# Create an executable. Requires a main.c file in the OBJDIR directory
exe: $(OBJC) $(OBJF90) $(OBJF) $(OBJDIR)/main.o
$(LD) $(CFLAGS) -o $(BINDIR)/gebt $^ $(LIBS)
cp $(BINDIR)/gebt run/
......@@ -36,6 +45,7 @@ $(OBJF): $(OBJDIR)/%.o: $(DIRF)/%.f
$(CF) $(FFLAGS) -fallow-argument-mismatch -c -o $@ $< -J$(OBJDIR)
clean:
rm $(OBJDIR)/*.o
rm $(OBJDIR)/*.mod
rm $(BINDIR)/gebt
\ No newline at end of file
rm -vf $(OBJDIR)/*.o
rm -vf $(OBJDIR)/*.mod
rm -vf $(BINDIR)/gebt
rm -vf $(BINDIR)/libgebt.so
File added
#ifndef _BEAM_H_
#define _BEAM_H_
#define NSTRN 6
#define NDIM 3
#define MEMB_CONST 7
......@@ -120,3 +125,7 @@ void initBeam(Beam *bm);
void beam_setLoads(Beam *bm, double *loads, int load_no);
void beam_writeSolToFile(Beam *bm);
void freeBeam(Beam *bm);
#endif
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment