Skip to content

Commit

Permalink
Refs #133. Users can set COMMON_OPT flag to control CFLAGS and FFLAGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyi committed Aug 10, 2012
1 parent d007cca commit 068861a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Makefile.rule
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,16 @@ VERSION = 0.2.2
# The installation directory.
# PREFIX = /opt/OpenBLAS

# Common Optimization Flag; -O2 is enough.
# DEBUG = 1

ifeq ($(DEBUG), 1)
COMMON_OPT += -g
# -DDEBUG
else
COMMON_OPT += -O2
endif
# Common Optimization Flag;
# The default -O2 is enough.
# COMMON_OPT = -O2

# Profiling flags
COMMON_PROF = -pg

# Build Debug version
# DEBUG = 1

#
# End of user configuration
#
9 changes: 9 additions & 0 deletions Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,15 @@ AWK = awk
REVISION = -r$(VERSION)
MAJOR_VERSION = $(word 1,$(subst ., ,$(VERSION)))

ifeq ($(DEBUG), 1)
COMMON_OPT += -g
endif

ifndef COMMON_OPT
COMMON_OPT = -O2
endif


CFLAGS = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
PFLAGS = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF)

Expand Down

0 comments on commit 068861a

Please sign in to comment.