Skip to content

Commit

Permalink
Fix Makefile: Correct order and naming of variables
Browse files Browse the repository at this point in the history
- Corrected the CURSES_LIBS variable name in info print output.
- Adjusted the order of library linking in $(TEST_TARGET) rule.

These changes ensure the Makefile outputs the correct variable information,
which aids debugging, and resolves a potential linking order issue.
  • Loading branch information
horta committed Nov 7, 2024
1 parent 5ae06fa commit 74438a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CFLAGS += -DATHR_OS=$(ATHR_OS)
$(info OS = $(OS))
$(info PKG_CONFIG_FOUND = $(PKG_CONFIG_FOUND))
$(info CURSES_FOUND = $(CURSES_FOUND))
$(info CURSES_LIBS = $(CURSES_LIBSCURSES_FOUND))
$(info CURSES_LIBS = $(CURSES_LIBS))
$(info ATHR_TERMINAL = $(ATHR_TERMINAL))
$(info ATHR_OS = $(ATHR_OS))
$(info CFLAGS = $(CFLAGS))
Expand All @@ -76,7 +76,7 @@ $(LIB): $(OBJ)
$(CC) $(CFLAGS) -c $< -o $@

$(TEST_TARGET): %: %.o $(LIB)
$(CC) $(CFLAGS) $< -L. $(CURSES_LIBS) -lathr -lm -o $@
$(CC) $(CFLAGS) $< -L. -lathr $(CURSES_LIBS) -lm -o $@

check: $(TEST_TARGET)
for test in $(TEST_TARGET); do ./$$test || exit 1; done
Expand Down

0 comments on commit 74438a8

Please sign in to comment.