Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
f3bab3e4
Commit
f3bab3e4
authored
May 19, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Makefile as suggested by Mark Jarvin.
parent
1e34a38b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
Makefile
+27
-7
No files found.
Makefile
View file @
f3bab3e4
CC
:=
g
cc
CC
:=
g
++
CXX
:=
g++
LD
:=
g++
LD
:=
$(CXX)
$(info
Using
CC
=
$(CC)
)
$(info
Using
CXX
=
$(CXX)
)
$(info
Using
LD
=
$(LD)
)
PROG
:=
abc
...
...
@@ -36,12 +40,27 @@ arch_flags : arch_flags.c
ARCHFLAGS
:=
$(
shell
$(CC)
arch_flags.c
-o
arch_flags
&&
./arch_flags
)
OPTFLAGS
:=
-g
-O
#-DABC_NAMESPACE=xxx
CFLAGS
+=
-Wall
-Wno-unused-function
$(OPTFLAGS)
$(ARCHFLAGS)
-I
$(PWD)
/src
CFLAGS
+=
-Wall
-Wno-unused-function
-Wno-write-strings
-Wno-sign-compare
$(OPTFLAGS)
$(ARCHFLAGS)
-I
$(PWD)
/src
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
ifneq
($(or
$(findstring
gcc,$(CC)),$(findstring
g++,$(CC))),)
empty
:=
space
:=
$(empty)
$(empty)
#ifeq ($(shell $(CC) -dumpversion | awk '{FS="."; print ($$1>=4 && $$2>=6)}'),1)
# Set -Wno-unused-but-set-variable for GCC 4.6.0 and greater only
GCC_VERSION
=
$(
shell
$(CC)
-dumpversion
)
GCC_MAJOR
=
$
(
word 1,
$
(
subst .,
$(space)
,
$(GCC_VERSION)
))
GCC_MINOR
=
$
(
word 2,
$
(
subst .,
$(space)
,
$(GCC_VERSION)
))
$(info
Found
GCC_VERSION
$(GCC_VERSION))
ifeq
($(findstring
$(GCC_MAJOR),0
1
2
3),)
$(info
Found
GCC_MAJOR>=4)
ifeq
($(findstring
$(GCC_MINOR),0
1
2
3
4
5),)
$(info
Found
GCC_MINOR>=6)
CFLAGS
+=
-Wno-unused-but-set-variable
#endif
endif
endif
endif
LIBS
:=
-ldl
...
...
@@ -55,12 +74,13 @@ CFLAGS += -DABC_USE_PTHREADS
LIBS
+=
-lpthread
endif
$(info
Using
CFLAGS
=
$(CFLAGS)
)
CXXFLAGS
+=
$(CFLAGS)
SRC
:=
GARBAGE
:=
core core.
*
*
.stackdump ./tags
$(PROG)
arch_flags
.PHONY
:
tags clean docs
.PHONY
:
all default
tags clean docs
include
$(patsubst
%,
%/module.make,
$(MODULES))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment