Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gqgmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
gqgmc
Commits
4613049d
Commit
4613049d
authored
8 years ago
by
Kevin Lyda
Browse files
Options
Downloads
Patches
Plain Diff
More make cleanout.
parent
5aa59f3f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Defines.mk
+8
-25
8 additions, 25 deletions
Defines.mk
Makefile
+2
-5
2 additions, 5 deletions
Makefile
Targets.mk
+0
-20
0 additions, 20 deletions
Targets.mk
with
10 additions
and
50 deletions
Defines.mk
+
8
−
25
View file @
4613049d
#############################################################################
#############################################################################
# Makefile macros
# Makefile macros
#############################################################################
#############################################################################
# project root directory
BASE
=
/home/kevin/src/gqgmc
# executables directory
# executables directory
BIN
=
$(
BASE
)
/
bin
BIN
=
bin
# object directory
# object directory
OBJ
=
$(
BASE
)
/
obj
OBJ
=
obj
# gq library directory
# gq library directory
LIBS
=
$(
BASE
)
/libs
LIBS
=
libs
# include search paths
GQ_INC
=
-I
$(
BASE
)
QT_INC
=
-I
/usr/include/qt4/QtCore
-I
/usr/include/qt4/QtGui
-I
/usr/include/qt4
X11_INC
=
-I
/usr/include/X11
INC_DIR
=
$(
GQ_INC
)
$(
QT_INC
)
$(
X11_INC
)
# libraries search paths
# libraries search paths
GQ_LIBS
=
-L
$(
BASE
)
/libs
GQ_LIBS
=
-Llibs
GUI_LIBS
=
-L
/usr/lib/x86_64-linux-gnu
LIBS_PTH
=
$(
GQ_LIBS
)
LIBS_PTH
=
$(
GQ_LIBS
)
$(
GUI_LIBS
)
#libraries linked
#libraries linked
GQ_LNK
=
-lGQGMC
GQ_LNK
=
-lGQGMC
QT_LNK
=
-lQtGui
-lQtCore
-lpthread
LIBS_LNK
=
$(
GQ_LNK
)
X11_LNK
=
-lXext
-lX11
LIBS_LNK
=
$(
GQ_LNK
)
$(
QT_LNK
)
$(
X11_LNK
)
# C Compiler
# C Compiler
CC
=
gcc
CC
=
gcc
...
@@ -37,20 +25,15 @@ LD = gcc
...
@@ -37,20 +25,15 @@ LD = gcc
CPP
=
g++
CPP
=
g++
LDCPP
=
g++
LDCPP
=
g++
DEFINES
=
-DQT_NO_DEBUG
-DQT_GUI_LIB
-DQT_CORE_LIB
-DQT_SHARED
# By default set to compile/link for 64-bit Linux.
# By default set to compile/link for 64-bit Linux.
# For 32-bit, change to -m32.
# For 32-bit, change to -m32.
CPUSIZE
=
-m64
CPUSIZE
=
-m64
#CFLAGS = $(CPUSIZE) -pipe -O2 -Wall -W -D_REENTRANT
$(DEFINES)
$(INC_DIR)
#CFLAGS = $(CPUSIZE) -pipe -O2 -Wall -W -D_REENTRANT $(INC_DIR)
CFLAGS
=
$(
CPUSIZE
)
-pipe
-Wall
-D_REENTRANT
$(
DEFINES
)
$(
INC_DIR
)
CFLAGS
=
$(
CPUSIZE
)
-pipe
-Wall
-D_REENTRANT
$(
INC_DIR
)
LDFLAGS
=
$(
CPUSIZE
)
-Wl
,-O1
$(
LIBS_PTH
)
LDFLAGS
=
$(
CPUSIZE
)
-Wl
,-O1
$(
LIBS_PTH
)
# MOC compiler
MOC
=
/usr/bin/moc-qt4
# Use ar & ranlib to build libgqgmc library
# Use ar & ranlib to build libgqgmc library
AR
=
ar
AR
=
ar
RANLIB
=
ranlib
RANLIB
=
ranlib
This diff is collapsed.
Click to expand it.
Makefile
+
2
−
5
View file @
4613049d
include
Defines.mk
include
Defines.mk
LIBRARIES
=
$(
LIBS
)
/libGQGMC.a
PROGRAMS
=
$(
BIN
)
/gqgmc
PROGRAMS
=
$(
BIN
)
/gqgmc
include
Targets.mk
gq_source
=
gqgmc.cc
gq_source
=
gqgmc.cc
# replace .cc with .o (object)
# replace .cc with .o (object)
gq_object
=
$(
gq_source:%.cc
=
$(
OBJ
)
/%.o
)
gq_object
=
$(
gq_source:%.cc
=
$(
OBJ
)
/%.o
)
$(BASE)/
libs/libGQGMC.a .LIBRARY
:
$(gq_object)
libs/libGQGMC.a .LIBRARY
:
$(gq_object)
ar ruv
$@
$?
ar ruv
$@
$?
ranlib
$@
ranlib
$@
$(BIN)/gqgmc
:
$(OBJ)/main.o $(LIB
RARIES)
$(BIN)/gqgmc
:
$(OBJ)/main.o $(LIB
S)/libGQGMC.a
$(
LDCPP
)
$(
LDFLAGS
)
-o
$@
$(
OBJ
)
/main.o
$(
LIBS_LNK
)
$(
LDCPP
)
$(
LDFLAGS
)
-o
$@
$(
OBJ
)
/main.o
$(
LIBS_LNK
)
.PHONY
:
all
.PHONY
:
all
...
...
This diff is collapsed.
Click to expand it.
Targets.mk
deleted
100644 → 0
+
0
−
20
View file @
5aa59f3f
#############################################################################
# make target definitions
default
:
$(LIBRARIES) $(PROGRAMS)
libs
:
$(LIBRARIES)
bin
:
$(PROGRAMS)
# Clean object
xobj
:
rm
-f
$(
OBJ
)
/
*
.o
# Clean MOC files
xmoc
:
rm
-f
$(
BASE
)
/moc
*
.cc
############################################################################
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