-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
47 lines (40 loc) · 1.08 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
ALL = adcp_Linux-x86_64
OS = $(shell uname -s)
CFLAGS = -std=c99 -O2 # -D_GNU_SOURCE #-fgnu89-inline
CPP=g++
CPPFLAGS = -Wall -O2
OPENMPFLAGS = -fopenmp
LDFLAGS = -lm
LDFLAGS_DEBUG = -lm
ifeq ($(OS), Linux)
CFLAGS = -std=c99 -Wall -O2 #-Wno-unused-result
CFLAGS_DEBUG = -std=c99 -Wall -O0 -g -DDEBUG #-Wno-unused-result -g
ifneq ($(shell which mpicc),)
MPICC = mpicc
MPILDFLAGS = $(LDFLAGS)
ALL := $(ALL) peptmpi
endif
endif
ifeq ($(OS), Darwin)
CFLAGS = -std=c99 -Wall -O2
CFLAGS_DEBUG = -std=c99 -Wall -O0 -g -arch i386 -DDEBUG
ifneq ($(shell which mpicc),)
MPICC = mpicc
MPILDFLAGS = $(LDFLAGS)
ALL := $(ALL) peptmpi
endif
endif
ifeq ($(OS), SunOS)
CFLAGS = -xO2
ifneq ($(shell which mpcc),)
MPICC = mpcc
MPILDFLAGS = -lmpi $(LDFLAGS)
ALL := $(ALL) peptmpi
endif
endif
all : $(ALL)
#serial peptide program (MC, nested sampling)
adcp_Linux-x86_64 : nested.c aadict.c energy.c main.c metropolis.c flex.c peptide.c probe.c rotation.c vector.c params.c error.c checkpoint_io.c vdw.c canonicalAA.c
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ -g
clean :
$(RM) $(ALL) $(TOOLS)