-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
52 lines (39 loc) · 901 Bytes
/
makefile
File metadata and controls
52 lines (39 loc) · 901 Bytes
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
# Makefile to build lbstime.a library and driver routines
#
# Andrew J. Pounds, Ph.D.
# Departments of Chemistry and Computer Science
# Mercer University
# Spring 2007 (last edit Spring 2022)
#
F77 = gfortran
CC = g++
CFLAGS = -O3
FFLAGS =
TIMINGLIBS = -L./ -llbstime
CLIBS = -lm
OBJS = cputime.o walltime.o
all: dusty lib
cputime.o : cputime.cc
$(CC) $(CFLAGS) -c cputime.cc
walltime.o : walltime.cc
$(CC) $(CFLAGS) -c walltime.cc
dusty.o : dusty.f
$(F77) $(FFLAGS) -c dusty.f
# Don't forget the -lstdc++
dusty : dusty.o lib $(OBJS)
$(F77) -o dusty dusty.o $(TIMINGLIBS) -lstdc++
# Default Targets for Cleaning up the Environment
clean :
rm *.o
rm *.a
pristine :
rm *.o
rm *.a
touch *.cc *.f
test -f dusty && rm dusty
ctags :
ctags *.cc *.f
# Target for making the library
lib: $(OBJS)
ar -rc liblbstime.a $(OBJS)
ranlib liblbstime.a