-
Notifications
You must be signed in to change notification settings - Fork 160
/
Makefile_params
39 lines (37 loc) · 985 Bytes
/
Makefile_params
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
# Input variables.
ALL_DEPEND =
CC = gcc
CC_EXT = .c
CC_STD = c11
CFLAGS = $(COMMON_FLAGS) -pthread -std=$(CC_STD) $(PEDANTIC) $(CFLAGS_EXTRA)
COMMON_FLAGS = -g$(G) $(I) -O$(O) -Wall -Wextra
CXX = g++
CXXFLAGS = $(COMMON_FLAGS) -pthread -std=$(CXX_STD) $(PEDANTIC) $(CXXFLAGS_EXTRA)
CXX_EXT = .cpp
CXX_STD = c++17
FF = gfortran
FF_EXT = .f
FFLAGS = $(COMMON_FLAGS) $(I) -std=$(FORTRAN_STD) $(PEDANTIC) $(FFLAGS_EXTRA)
FFLIBS =
G = gdb3
I =
IN_DIR = ./
LIBS = -lm -lrt $(LIBS_EXTRA)
O = 0
OBJ_EXT = .o
OUT_DIR = ./
OUT_EXT = .out
PEDANTIC = -pedantic-errors
FORTRAN_STD = f2003
TEST ?= test
TMP_EXT = .tmp
TMP_PREF = tmp.
# Calculated variables.
CC_INS = $(wildcard $(IN_DIR)*$(CC_EXT))
CXX_INS = $(wildcard $(IN_DIR)*$(CXX_EXT))
FF_INS = $(wildcard $(IN_DIR)*$(FF_EXT))
INS = $(CC_INS) $(CXX_INS) $(FF_INS)
INS_NODIR = $(notdir $(INS))
OBJS_NOEXT = $(addprefix $(OUT_DIR), $(basename $(INS_NODIR)))
OBJS = $(addsuffix $(OBJ_EXT), $(OBJS_NOEXT))
.PHONY: all clean mkdir test $(PHONY)