Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
bd2df298
Commit
bd2df298
authored
14 years ago
by
Yuriy Vostrikov
Browse files
Options
Downloads
Patches
Plain Diff
[core] simplify CFLAGS handling for different build types
parent
83d35db9
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/config_def.mk
+2
-8
2 additions, 8 deletions
scripts/config_def.mk
scripts/rules.mk
+6
-3
6 additions, 3 deletions
scripts/rules.mk
with
8 additions
and
11 deletions
scripts/config_def.mk
+
2
−
8
View file @
bd2df298
...
...
@@ -26,7 +26,7 @@ endif
ifeq
($(OS), Linux)
CFLAGS
+=
-DLinux
-D_FILE_OFFSET_BITS
=
64
-DEV_USE_INOTIFY
-D_GNU_SOURCE
if
eq
($(DEBUG), 2)
if
def
DEBUG
CFLAGS
+=
-DHAVE_VALGRIND
endif
endif
...
...
@@ -35,14 +35,8 @@ ifeq (,$(filter -g%,$(CFLAGS)))
CFLAGS
+=
-g3
-ggdb
endif
ifdef
DEBUG
CFLAGS
+=
-DDEBUG
-fno-omit-frame-pointer
else
CFLAGS
+=
-DNDEBUG
endif
ifeq
(,$(filter -O%,$(CFLAGS)))
if
eq
($(DEBUG), 2)
if
def
DEBUG
CFLAGS
+=
-O0
else
CFLAGS
+=
-O2
...
...
This diff is collapsed.
Click to expand it.
scripts/rules.mk
+
6
−
3
View file @
bd2df298
...
...
@@ -14,11 +14,14 @@ endif
-include
$(SRCDIR)/config.mk $(SRCDIR)/scripts/config.mk
include
$(SRCDIR)/scripts/config_def.mk
ifneq
(,$(findstring _debug,$(OBJDIR)))
DEBUG
=
0
ifneq
(,$(findstring _release,$(OBJDIR)))
CFLAGS
+=
-DNDEBUG
else
ifneq
(,$(findstring _debug,$(OBJDIR)))
DEBUG
=
1
CFLAGS
+=
-DDEBUG
-fno-omit-frame-pointer
else
ifneq
(,$(findstring _test,$(OBJDIR)))
CFLAGS
+=
--coverage
-DCOVERAGE
-DNDEBUG
else
ifneq
(,$(findstring_coverage,$(OBJDIR)))
else
ifneq
(,$(findstring
_coverage,$(OBJDIR)))
CFLAGS
+=
--coverage
-DCOVERAGE
endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment