fix: apply build FLAGS correctly #4

Open
wiesendsi102436 wants to merge 1 commits from wiesendsi102436/info2Praktikum-DobleSpiel:bugfix/makefile into main
First-time contributor

A typo in the dependency variable program_obj_files caused make to fall back to implicit/default rules.
Without fix:

$ make doble
gcc    -c -o main.o main.c
gcc    -c -o stack.o stack.c
gcc    -c -o bintree.o bintree.c
gcc    -c -o numbers.o numbers.c
gcc    -c -o timer.o timer.c
gcc    -c -o highscore.o highscore.c
gcc -g -Wall -lm main.o stack.o bintree.o numbers.o timer.o highscore.o -o doble

With fix:

$ make doble
gcc    -c -o main.o main.c
gcc -c -g -Wall -lm stack.c -o stack.o
gcc -c -g -Wall -lm bintree.c -o bintree.o
gcc -c -g -Wall -lm numbers.c -o numbers.o
gcc -c -g -Wall -lm timer.c -o timer.o
gcc -c -g -Wall -lm highscore.c -o highscore.o
gcc -g -Wall -lm main.o stack.o bintree.o numbers.o timer.o highscore.o -o doble
A typo in the dependency variable program_obj_files caused make to fall back to implicit/default rules. Without fix: ``` $ make doble gcc -c -o main.o main.c gcc -c -o stack.o stack.c gcc -c -o bintree.o bintree.c gcc -c -o numbers.o numbers.c gcc -c -o timer.o timer.c gcc -c -o highscore.o highscore.c gcc -g -Wall -lm main.o stack.o bintree.o numbers.o timer.o highscore.o -o doble ``` With fix: ``` $ make doble gcc -c -o main.o main.c gcc -c -g -Wall -lm stack.c -o stack.o gcc -c -g -Wall -lm bintree.c -o bintree.o gcc -c -g -Wall -lm numbers.c -o numbers.o gcc -c -g -Wall -lm timer.c -o timer.o gcc -c -g -Wall -lm highscore.c -o highscore.o gcc -g -Wall -lm main.o stack.o bintree.o numbers.o timer.o highscore.o -o doble ```
wiesendsi102436 added 1 commit 2025-11-30 10:20:31 +00:00
A typo in the dependency variable program_obj_files caused make to fall back to implicit/default rules. FLAGS was ignored because the default behavior is to use CFLAGS.
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u bugfix/makefile:wiesendsi102436-bugfix/makefile
git checkout wiesendsi102436-bugfix/makefile
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: freudenreichan/info2Praktikum-DobleSpiel#4
No description provided.