-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeTestGnu
95 lines (63 loc) · 2.6 KB
/
makeTestGnu
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
92
93
94
95
# ------------------------------------------------------------------
#
# makefile pour intel
#
# Auteur : Christophe Peyret christophe.peyret@onera.fr
# Copyright (c) 2010 ONERA/DSNA. All rights reserved.
#
# ------------------------------------------------------------------
TARGET = interopGnu
# Compilers and linker
LD = gfortran
FC = gfortran
CC = gcc
CX = g++
# Paths
SRCDIR = ./src
OBJDIR = ./obj
MODDIR = ./mod
EXEDIR = ./
LIBDIR = /usr/local/lib
# INCL and MODS
INCL = -I $(MODDIR) -I ./src
MODS = -J $(MODDIR)
# Compiler Flags
FCFLAGS = -c -O3 -m64 $(MODS) $(INCL) -openmp
CCFLAGS = -c -O3 -m64
CXFLAGS = -c -O3 -m64
# Linkage
LDFLAGS = -m64 -l stdc++
LIBS =
# List of Objects
OBJS = \
\
$(OBJDIR)/moduleMesh.o \
$(OBJDIR)/test.o
# Building Rules
$(TARGET) : $(OBJS)
$(LD) $(LDFLAGS) $(LIBS) $(OBJS) -o $(EXEDIR)$(TARGET)
@echo ----------- ${TARGET} created -----------
compil_date :
touch src/mesh_dg.f90
\rm -f compil_date.h
echo "write(*,'(/a )')'------------------------------------------------------------------------'" > compil_date.h
echo "write(*,'( a )')' '" >> compil_date.h
echo "write(*,'( a )')' spaceMesh64 2011 - 64 bits version - Mesh Treatments '" >> compil_date.h
echo "write(*,'( a )')' Copyright (c) ONERA, 1995-2011. All rights reserved '" >> compil_date.h
echo "write(*,'( a )')' Developped by Christophe Peyret tel: 0146734778 mail: peyret@onera.fr '" >> compil_date.h
echo "write(*,'( a )')' '" >> compil_date.h
echo "write(*,'( a )')' Compiled on" `date` "with" `uname -n` " '" >> compil_date.h
echo "write(*,'( a )')' " `svn info | grep "Changed Date"` " '" >> compil_date.h
echo "write(*,'( a )')' " `svn info | grep Revision` " '" >> compil_date.h
echo "write(*,'( a/)')'------------------------------------------------------------------------'" >> compil_date.h
clean :
\rm -f $(OBJS) $(DIREXE)/$(TARGET) $(MODDIR)/*.mod
# Compilation Rules
$(OBJDIR)/%.o : $(SRCDIR)/%.cpp
$(CX) $(CXFLAGS) -o $@ $<
$(OBJDIR)/%.o : $(SRCDIR)/%.c
$(CC) $(CCFLAGS) -o $@ $<
$(OBJDIR)/%.o : $(SRCDIR)/%.f90
$(FC) $(FCFLAGS) -o $@ $<
$(OBJDIR)/mesh_dg.o : $(SRCDIR)/mesh_dg.f90 compil_date
$(FC) $(FCFLAGS) -o $(OBJDIR)/mesh_dg.o $(SRCDIR)/mesh_dg.f90