Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 37 additions & 20 deletions Grand_Potential_Serial/Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
FDIR=functions
SDIR=solverloop
CC=gcc
CFLAGS=-I.

_FUNCTION_DEPS = global_vars.h functions.h matrix.h utility_functions.h functionH.h functionF_01.h functionQ.h \
functionW_01.h functionW_02.h function_A_00.h function_A_01.h anisotropy_01.h functionTau.h \
functionD.h filling.h reading_input_parameters.h read_boundary_conditions.h initialize_variables.h \
FDIR ?= functions
SDIR ?= solverloop

CC ?= cc
CFLAGS ?=
CPPFLAGS?=
LDFLAGS ?=
LIBS ?=

CPPFLAGS += -I.

_FUNCTION_DEPS = global_vars.h functions.h matrix.h utility_functions.h functionH.h \
functionF_01.h functionQ.h functionW_01.h functionW_02.h \
function_A_00.h function_A_01.h anisotropy_01.h functionTau.h \
functionD.h filling.h reading_input_parameters.h \
read_boundary_conditions.h initialize_variables.h \
free_variables.h fill_domain.h shift.h Temperature_gradient.h

DEPS = $(patsubst %,$(FDIR)/%,$(_FUNCTION_DEPS))

_SOLVERLOOP_DEPS = serialinfo_xy.h gradients.h simplex_projection.h calculate_gradients.h \
calculate_fluxes_concentration.h calculate_divergence_phasefield.h calculate_divergence_concentration.h \
initialize_functions_solverloop.h solverloop.h boundary_serial.h \
file_writer.h
_SOLVERLOOP_DEPS = serialinfo_xy.h gradients.h simplex_projection.h \
calculate_gradients.h calculate_fluxes_concentration.h \
calculate_divergence_phasefield.h \
calculate_divergence_concentration.h \
initialize_functions_solverloop.h solverloop.h \
boundary_serial.h file_writer.h

DEPS += $(patsubst %,$(SDIR)/%,$(_SOLVERLOOP_DEPS))

LIBS += -lm

LIBS =-lm
TARGET = microsim_gp

microsim_gp : microsim_gp.o
$(CC) -o microsim_gp microsim_gp.o $(CFLAGS) $(LIBS)
all: $(TARGET)

microsim_gp.o : $(DEPS)
$(TARGET): microsim_gp.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

.PHONY : clean
microsim_gp.o: $(DEPS)

clean :
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin

rm microsim_gp.o microsim_gp
install: $(TARGET)
mkdir -p $(DESTDIR)$(BINDIR)
cp $(TARGET) $(DESTDIR)$(BINDIR)/

clean:
rm -f microsim_gp.o $(TARGET)

.PHONY: all clean install