Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
goroyeh
Mobilebot
Commits
c70be89d
Commit
c70be89d
authored
Sep 24, 2020
by
stanlew
Browse files
Merge branch 'quick_makefile_fix' into 'master'
Quick makefile fix See merge request rob550-f20/mobilebot!4
parents
6797fe0b
2db6f0c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
measure_motor_params/Makefile
View file @
c70be89d
...
...
@@ -3,14 +3,16 @@ TARGET = ../bin/measure_motor_params
CC
:=
gcc
LINKER
:=
gcc
-o
CFLAGS
:=
-c
-Wall
-g
LFLAGS
:=
-lm
-lrt
-lpthread
-l
:librobotcontrol.so.1
CFLAGS
:=
-c
-Wall
-g
`
pkg-config
--cflags
lcm
`
LFLAGS
:=
-lm
-lrt
-lpthread
-l
:librobotcontrol.so.1
-L
`
pkg-config
--libs
lcm
`
SOURCES
:=
$(
wildcard
*
.c
)
SOURCES
:=
$(SOURCES)
$(
wildcard
../common/
*
.c
)
INCLUDES
:=
$(
wildcard
*
.h
)
INCLUDES
:=
$(INCLUDES)
$(
wildcard
../common/
*
.h
)
OBJECTS
:=
$
(
SOURCES:
$%
.c
=
$%
.o
)
LCMTYPES
:=
$(
shell
find ../lcmtypes/
-name
'*.lcm'
)
LCMOBJS
:=
$
(
LCMTYPES:
$%
.lcm
=
$%
.o
)
prefix
:=
/usr/local
RM
:=
rm
-f
...
...
@@ -24,7 +26,7 @@ LINKNAME := link_to_startup_program
# linking Objects
$(TARGET)
:
$(OBJECTS)
@
$(LINKER)
$@
$(OBJECTS)
$(LFLAGS)
@
$(LINKER)
$@
$(OBJECTS)
$(LCMOBJS)
$(LFLAGS)
# compiling command
...
...
@@ -49,6 +51,7 @@ install:
clean
:
@
$(RM)
$(OBJECTS)
@
$(RM)
$(LCMOBJS)
@
$(RM)
$(IGNORE)
@
$(RM)
$(IGNORE:=.o)
@
$(RM)
$(TARGET)
...
...
test_motors/Makefile
View file @
c70be89d
...
...
@@ -3,14 +3,16 @@ TARGET = ../bin/test_motors
CC
:=
gcc
LINKER
:=
gcc
-o
CFLAGS
:=
-c
-Wall
-g
LFLAGS
:=
-lm
-lrt
-lpthread
-l
:librobotcontrol.so.1
CFLAGS
:=
-c
-Wall
-g
`
pkg-config
--cflags
lcm
`
LFLAGS
:=
-lm
-lrt
-lpthread
-l
:librobotcontrol.so.1
-L
`
pkg-config
--libs
lcm
`
SOURCES
:=
$(
wildcard
*
.c
)
SOURCES
:=
$(SOURCES)
$(
wildcard
../common/
*
.c
)
INCLUDES
:=
$(
wildcard
*
.h
)
INCLUDES
:=
$(INCLUDES)
$(
wildcard
../common/
*
.h
)
OBJECTS
:=
$
(
SOURCES:
$%
.c
=
$%
.o
)
LCMTYPES
:=
$(
shell
find ../lcmtypes/
-name
'*.lcm'
)
LCMOBJS
:=
$
(
LCMTYPES:
$%
.lcm
=
$%
.o
)
prefix
:=
/usr/local
RM
:=
rm
-f
...
...
@@ -24,7 +26,7 @@ LINKNAME := link_to_startup_program
# linking Objects
$(TARGET)
:
$(OBJECTS)
@
$(LINKER)
$@
$(OBJECTS)
$(LFLAGS)
@
$(LINKER)
$@
$(OBJECTS)
$(LCMOBJS)
$(LFLAGS)
# compiling command
...
...
@@ -49,6 +51,7 @@ install:
clean
:
@
$(RM)
$(OBJECTS)
@
$(RM)
$(LCMOBJS)
@
$(RM)
$(IGNORE)
@
$(RM)
$(IGNORE:=.o)
@
$(RM)
$(TARGET)
...
...
Write
Preview
Supports
Markdown
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