forked from ecor/boussinesq_code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
97 lines (73 loc) · 2.97 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
################################################################################
# Draft Makefile for THe Boussinesq Equation Model
#################################################################################
# Author: Emanuele Cordano
# Date: 24 jun 2013
# Comment: The binary executable file will be created as ./bin/boussinesq
SHELL = /bin/sh
CC=gcc
CFLAGS=-g -Wall
HM = .
BINPATH = $(HM)/bin
NAME = boussinesq
EXECUTABLE = $(BINPATH)/$(NAME)
SOURCEDIR = $(HM)/source
SOURCES= $(SOURCEDIR)/FLUIDTURTLES/alloc.c \
$(SOURCEDIR)/FLUIDTURTLES/datamanipulation.c \
$(SOURCEDIR)/FLUIDTURTLES/error.c \
$(SOURCEDIR)/FLUIDTURTLES/linearalgebra.c \
$(SOURCEDIR)/FLUIDTURTLES/list.c \
$(SOURCEDIR)/FLUIDTURTLES/probability.c \
$(SOURCEDIR)/FLUIDTURTLES/random.c \
$(SOURCEDIR)/FLUIDTURTLES/statistics.c \
$(SOURCEDIR)/FLUIDTURTLES/string.c \
$(SOURCEDIR)/FLUIDTURTLES/t_io.c \
$(SOURCEDIR)/FLUIDTURTLES/tensors3D.c \
$(SOURCEDIR)/FLUIDTURTLES/utilities.c \
$(SOURCEDIR)/FLUIDTURTLES/write_dem.c \
$(SOURCEDIR)/ASCII/rw_maps.c \
$(SOURCEDIR)/ASCII/import_ascii.c \
$(SOURCEDIR)/ASCII/tabs.c \
$(SOURCEDIR)/ASCII/write_ascii.c \
$(SOURCEDIR)/BGEOMETRY/bigcells2.c \
$(SOURCEDIR)/BGEOMETRY/g_raster2plvector.c \
$(SOURCEDIR)/BGEOMETRY/geometry.c \
$(SOURCEDIR)/BGEOMETRY/geometry2.c \
$(SOURCEDIR)/BGEOMETRY/geometry_attribute.c \
$(SOURCEDIR)/BGEOMETRY/geometry_freememory.c \
$(SOURCEDIR)/BGEOMETRY/geometry_io.c \
$(SOURCEDIR)/BGEOMETRY/geometry_utilities.c \
$(SOURCEDIR)/BGEOMETRY/sorting.c \
$(SOURCEDIR)/KeyPalette/additional_read_functions.c \
$(SOURCEDIR)/KeyPalette/get_filenames.c \
$(SOURCEDIR)/KeyPalette/key.palette.c \
$(SOURCEDIR)/KeyPalette/read_command_line.c \
$(SOURCEDIR)/MATH2/boussinesq_matrix.c \
$(SOURCEDIR)/MATH2/doublevector_utilities.c \
$(SOURCEDIR)/MATH2/geo_statistic.09375.c \
$(SOURCEDIR)/MATH2/linear_span.c \
$(SOURCEDIR)/MATH2/preconditioned_conjugate_gradient.c \
$(SOURCEDIR)/MATH2/util_math.c \
$(SOURCEDIR)/Boussinesq/b_readgrid.c \
$(SOURCEDIR)/Boussinesq/b_solver.c \
$(SOURCEDIR)/Boussinesq/b_sources.c \
$(SOURCEDIR)/Boussinesq/b_utilities.c \
$(SOURCEDIR)/Boussinesq/b_v_advection.c \
$(SOURCEDIR)/Boussinesq/b_volumes.c \
$(SOURCEDIR)/Boussinesq/main.c
INCLUDE= -I$(SOURCEDIR)/FLUIDTURTLES \
-I$(SOURCEDIR)/ASCII \
-I$(SOURCEDIR)/BGEOMETRY \
-I$(SOURCEDIR)/KeyPalette \
-I$(SOURCEDIR)/MATH2 \
-I$(SOURCEDIR)/Boussinesq
OBJ=$(SOURCES:.c=.o)
.c.o.: $*.c $*.o
$(CC) $(HEADERS) $($(SOURCEDIR)S) $(CFLAGS) -c $(OBJ) $< -o $@
.c.o: $*.c $*.h
$(CC) $(CFLAGS) -c $< $(INCLUDE) -o $@
all: $(NAME)
$(NAME): $(OBJ)
$(CC) -o $(EXECUTABLE) $(OBJ) -lm
clean:
rm -rf *.o *~ $(OBJ)