-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
65 lines (53 loc) · 1.52 KB
/
Makefile.in
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
# Makefile.in for sep-library
# Macros
CC = @CC@
CFLAGS = @CFLAGS@ @INLINE@ @C99@ -fPIC #@OMPFLAG@
RANLIB = @RANLIB@
AR = @AR@
COMPLEX = @COMPLEX@
OMP = @OMP@
PREFIX = /usr/local/
OBJECTS = sepmisc.o seputil.o separray.o sepinit.o sepprfrc.o sepintgr.o \
sepret.o sepmol.o sepcoulomb.o sepsampler.o sepomp.o
PRGS = test/prg0 test/prg1 test/prg2 test/prg3 test/prg4 test/prg5 \
test/prg6 test/prg7 test/prg8 test/prg9
TOOLS = tools/sep_sfg tools/sep_lattice
MARCH =
# all
all: libsep.a test tools doc
# Buildning library
libsep.a: $(OBJECTS)
$(AR) r libsep.a $(OBJECTS)
$(RANLIB) libsep.a
cp libsep.a *.o lib/
%.o:source/%.c
$(CC) $(COMPLEX) $(OMP) -c $(CFLAGS) -W -Wall -Iinclude/ $<
# Install (root only)
install: libsep.a
cp include/*.h $(PREFIX)include/
cp lib/libsep.a $(PREFIX)lib/
# Cleaning up
clean:
rm -f libsep.a *.o
rm -f lib/*.o lib/*.a
rm -f $(PRGS)
rm -f source/*~
rm -f include/*~
rm -f mpi/*~
rm -f doc/*~
rm -f prgs/*~
rm -f mydoc/*~
rm -f *~
rm -f $(TOOLS)
# Compiling programmes
test: $(PRGS)
test/%:prgs/%.c
$(CC) $(CFLAGS) $(OMP) -o $@ -Llib/ -Iinclude $^ -lsep -lm
# Compiling tools
# Compiling tools
tools: $(TOOLS)
tools/%:tools/%.c
$(CC) $(CFLAGS) $(OMP) -Iinclude -c tools/_sep_lattice.c
$(CC) $(CFLAGS) $(OMP) -Iinclude -c tools/_sep_sfg.c
$(CC) $(CFLAGS) $(OMP) _sep_lattice.o -o tools/sep_lattice tools/sep_lattice.c -lm
$(CC) $(CFLAGS) $(OMP) _sep_sfg.o -o tools/sep_sfg tools/sep_sfg.c -lm