-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.mk.ppc64
66 lines (60 loc) · 2.02 KB
/
common.mk.ppc64
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
###############################################################################
#
# File : common.mk
# Author : Alex Stivala (astivala)
# Created : July 2008
#
# $Id: Makefile 1690 2008-07-16 04:35:47Z astivala $
#
# Definitions of compilers and compile options for all Makefiles.
# Use GNU make.
#
# The _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED defines are set to 1 to
# to allow certain prototypes to be included properly and indicate
# that the program is to work with the X/Open XPG4v2 (SUS)
# standard. Specifically, this wasy getopt() will compile and work
# nicely with no warnings on Solaris, and also allow the use of
# strcasecmp() and strdup() with no warnings.
#
# set MODE=DEBUG to build with debugging and profiling on. Otherwise
# default is to build with optimizations on and no debug or profile.
#
#
###############################################################################
CC = gcc
CXX = g++
CPPFLAGS = -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
CPPFLAGS += -DUSE_INSTRUMENT
CDEBUG = -g -O0 -pg -DDEBUG
COPTIMIZE = -O3
OCFLAGS = -m64
CFLAGS = -Wall -m64
CXXFLAGS =
ifeq ($(MODE),DEBUG)
CFLAGS += $(CDEBUG)
CXXFLAGS += $(CDEBUG)
else
CFLAGS += $(COPTIMIZE)
CXXFLAGS += $(COPTIMIZE)
endif
# the following warnings are not implied by -Wall
CFLAGS += -Wextra -Wfloat-equal \
-Wdeclaration-after-statement -Wundef -Wshadow \
-Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align\
-Wwrite-strings -Wmissing-prototypes \
-Wmissing-declarations -Wunreachable-code
PTHREAD_CLFAGS = -pthread -DUSE_THREADING
LD = gcc
LDFLAGS = -m64
ifeq ($(MODE),DEBUG)
LDFLAGS += -g
LDFLAGS += -pg # for profiler gprof
endif
LDLIBPATH =
LDLIBS = -lm
STREAMFLOW_DIR=$(HOME)/phd/paralleldp/streamflow
PTHREAD_LDFLAGS = -pthread -L$(STREAMFLOW_DIR) -lstreamflow
MAKEDEPEND = gcc -MM $(CPPFLAGS)
DEPENDFILE = .depend
# Program to build TAGS file for EMACS
MAKETAGS = etags