implementation for stack and some tests #1

Merged
wiesendsi102436 merged 12 commits from simon into main 2025-12-05 07:40:45 +00:00
Showing only changes of commit 07262a1fe0 - Show all commits

View File

@ -1,5 +1,5 @@
CC = gcc
FLAGS = -g -Wall -lm
CFLAGS = -g -Wall -lm
ifeq ($(OS),Windows_NT)
include makefile_windows.variables
@ -27,10 +27,10 @@ doble_initial:
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
doble : main.o $(program_obj_files)
$(CC) $(FLAGS) $^ -o doble
$(CC) $(CFLAGS) $^ -o doble
$(program_obj_filesobj_files): %.o: %.c
$(CC) -c $(FLAGS) $^ -o $@
$(program_obj_files): %.o: %.c
$(CC) -c $(CFLAGS) $^ -o $@
# --------------------------
# Unit Tests
@ -39,11 +39,11 @@ TEST_STACK_SOURCES = stack.c test_stack.c $(unityfolder)/unity.c
TEST_BINTREE_SOURCES = bintree.c test_bintree.c stack.c $(unityfolder)/unity.c
stackTests: $(TEST_STACK_SOURCES) stack.h
$(CC) $(FLAGS) -I$(unityfolder) $(TEST_STACK_SOURCES) -o runStackTests
$(CC) $(CFLAGS) -I$(unityfolder) $(TEST_STACK_SOURCES) -o runStackTests
./runStackTests
bintreeTests: $(TEST_BINTREE_SOURCES) stack.h bintree.h
$(CC) $(FLAGS) -I$(unityfolder) $(TEST_BINTREE_SOURCES) -o runBintreeTests
$(CC) $(CFLAGS) -I$(unityfolder) $(TEST_BINTREE_SOURCES) -o runBintreeTests
./runBintreeTests
# --------------------------