1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-24 17:01:35 +01:00
Files
Unity/extras/fixture/test/Makefile
jsalling 955b221218 Add configuration option UNITY_EXCLUDE_STDLIB_MALLOC to Fixture
This feature removes the dependency on malloc/free for constrained
  embedded systems without a heap. It uses a static heap inside
  Unity Fixture. Setting UNITY_INTERNAL_HEAP_SIZE_BYTES sizes the heap.
 Add tests for new option, add targets to makefile for running tests.
 UNITY_FIXTURE_MALLOC for Fixture use only, remove from unity_output_Spy.c.
2016-02-01 23:54:06 -06:00

36 lines
929 B
Makefile

CC = gcc
CFLAGS += -Werror
CFLAGS += -std=c99
CFLAGS += -pedantic
CFLAGS += -Wundef
DEFINES = -D UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar
SRC = ../src/unity_fixture.c \
../../../src/unity.c \
unity_fixture_Test.c \
unity_fixture_TestRunner.c \
unity_output_Spy.c \
main/AllTests.c
INC_DIR = -I../src -I../../../src/
TARGET = fixture_tests.exe
all: default noStdlibMalloc 32bits
default:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET)
@ echo "default build"
./$(TARGET)
32bits:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m32
@ echo "32bits build"
./$(TARGET)
noStdlibMalloc:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -D UNITY_EXCLUDE_STDLIB_MALLOC
@ echo "build with noStdlibMalloc"
./$(TARGET)
clangEverything:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m64 -Weverything # || true #prevents make from failing