Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pickomino
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
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
Maxence Le Grand
pickomino
Commits
fe409ad8
Commit
fe409ad8
authored
2 years ago
by
Jaque.Bardaghji
Browse files
Options
Downloads
Patches
Plain Diff
Mettre à jour le Makefile
parent
97183f3b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+12
-6
12 additions, 6 deletions
Makefile
with
12 additions
and
6 deletions
Makefile
+
12
−
6
View file @
fe409ad8
CC
=
gcc
CC
=
gcc
CFLAGS
=
-Wall
CFLAGS
=
-Wall
LDFLAGS
=
LDFLAGS
=
LIB
=
../Image
LIB
=
...
@@ -10,28 +10,34 @@ ifeq ($(DEBUG),yes)
...
@@ -10,28 +10,34 @@ ifeq ($(DEBUG),yes)
CFLAGS
+=
-g
CFLAGS
+=
-g
endif
endif
all
:
UTest_secondary
SDL
-config
all
:
UTest_secondary
Pickomino Pickomino
-config
MYTEST
=
no
MYTEST
=
no
ifeq
($(MYTEST),yes)
ifeq
($(MYTEST),yes)
all
:
UTest_secondary run_test
all
:
UTest_secondary run_test
endif
endif
SDL-config
:
LDFLAGS+= -lSDL2 -lSDL2_image `sdl2-config --libs`
Pickomino-config
:
LDFLAGS+= `sdl2-config --libs` -lSDL2_image
SDL-config
:
main.o window.o init.o input.o SecondaryFunctions.o IA.o
Pickomino-config
:
main.o IA.o window.o init.o input.o SecondaryFunctions.o
$(
CC
)
$^
$(
LDFLAGS
)
-o
$@
$(
CC
)
$^
$(
LDFLAGS
)
-o
$@
Pickomino
:
LDFLAGS+= -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf
Pickomino
:
main.o IA.o window.o init.o input.o SecondaryFunctions.o
$(
CC
)
$^
$(
LDFLAGS
)
-o
$@
UTest_secondary
:
LDFLAGS+= -lcmocka -coverage
UTest_secondary
:
LDFLAGS+= -lcmocka -coverage
UTest_secondary
:
CFLAGS+= -coverage
UTest_secondary
:
CFLAGS+= -coverage
UTest_secondary
:
UTest_secondary.o secondary_gcov.o
UTest_secondary
:
UTest_secondary.o secondary_gcov.o
$(
CC
)
$^
$(
LDFLAGS
)
-o
$@
$(
CC
)
$^
$(
LDFLAGS
)
-o
$@
# running Utest with Valgrind and lcov gcov
run_test
:
UTest_secondary
run_test
:
UTest_secondary
./UTest_secondary
;
\
./UTest_secondary
;
\
lcov
--capture
--directory
.
--output-file
coverage.info
;
\
lcov
--capture
--directory
.
--output-file
coverage.info
;
\
genhtml coverage.info
--output-directory
out
;
\
genhtml coverage.info
--output-directory
out
;
\
valgrind ./
$<
valgrind ./
$<
./UTest_secondary 1> log_TU.log 2>&1
;
lcov
--capture
--directory
.
--output-file
coverage.info
>
log_lcov.log
;
genhtml coverage.info
--output-directory
out
>
log_genhtml.log
;
valgrind ./
$<
2> log_valgrind.log
# gcov counter_gcov.o
./UTest_secondary 1> log_TU.log 2>&1
;
lcov
--capture
--directory
.
--output-file
coverage.info
>
log_lcov.log
;
genhtml coverage.info
--output-directory
out
>
log_genhtml.log
;
valgrind ./
$<
2> log_valgrind.log
secondary_gcov.o
:
SecondaryFunctions.c
secondary_gcov.o
:
SecondaryFunctions.c
...
...
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