forked from chengchen1987/simple_ed_cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (33 loc) · 886 Bytes
/
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
# Intel compiler
ICC_c = icc
ICC_cpp = icpc
ICC_CCFLAGS = -O3 -qopenmp -mkl
ICC_LDFLAGS = -fopenmp
#ICC_CCFLAGS = -O3
#ICC_LDFLAGS =
# Set compile environment
##########################################################################
# Programming language {c/cpp}
PLANG=cpp
# Set compiler {ICC/GNU}
COM=ICC
# The name of executable file
EXECNAME = ed_test_0
########################################################################
# CPU compiler
CC = ${${COM}_${PLANG}}
# CPU compiling options
CCFLAGS = ${${COM}_CCFLAGS}
# CPU linking options
LDFLAGS = ${${COM}_LDFLAGS}
# The language of sources
CCOBJS := $(patsubst %.${PLANG},%.o,$(wildcard *.${PLANG}))
$(EXECNAME):${CCOBJS}
${CC} -o $(EXECNAME) ${CCFLAGS} ${CCOBJS} ${LDFLAGS}
include depend
.${PLANG}.o:
${CC} -c $< $(CCFLAGS) -o $@
depend:
${CC} -MM ${CCOBJS:.o=.${PLANG}} ${CCFLAGS}> depend
clean:
rm *.o depend