fix makefile to allow debugging
This commit is contained in:
parent
34e5a59196
commit
07262a1fe0
12
makefile
12
makefile
@ -1,5 +1,5 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
FLAGS = -g -Wall -lm
|
CFLAGS = -g -Wall -lm
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
include makefile_windows.variables
|
include makefile_windows.variables
|
||||||
@ -27,10 +27,10 @@ doble_initial:
|
|||||||
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
|
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
|
||||||
|
|
||||||
doble : main.o $(program_obj_files)
|
doble : main.o $(program_obj_files)
|
||||||
$(CC) $(FLAGS) $^ -o doble
|
$(CC) $(CFLAGS) $^ -o doble
|
||||||
|
|
||||||
$(program_obj_filesobj_files): %.o: %.c
|
$(program_obj_files): %.o: %.c
|
||||||
$(CC) -c $(FLAGS) $^ -o $@
|
$(CC) -c $(CFLAGS) $^ -o $@
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Unit Tests
|
# 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
|
TEST_BINTREE_SOURCES = bintree.c test_bintree.c stack.c $(unityfolder)/unity.c
|
||||||
|
|
||||||
stackTests: $(TEST_STACK_SOURCES) stack.h
|
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
|
./runStackTests
|
||||||
|
|
||||||
bintreeTests: $(TEST_BINTREE_SOURCES) stack.h bintree.h
|
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
|
./runBintreeTests
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user