aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-27 18:28:03 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-27 18:28:53 -0500
commit34a7c0ca08683eb83d6b6b3d5a6a8fb2f7d5b918 (patch)
tree1efa4c1b7c206e06817ea3bd6e171647c67b3602 /Makefile
parent61344915dfdd01101d086b79b56109a9942cbf1a (diff)
Add skeleton tests for receiving and sending ISO-TP messages.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0dd93599..847196ab 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC = gcc
INCLUDES = -Isrc -Ideps/canutil/src
-CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb
+CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb -std=c99
LDFLAGS =
LDLIBS = -lcheck
@@ -16,11 +16,13 @@ ifneq ($(OSTYPE),Darwin)
endif
SRC = $(wildcard src/**/*.c)
-SRC = $(wildcard deps/**/*.c)
+SRC += $(wildcard deps/**/*.c)
OBJS = $(SRC:.c=.o)
-TEST_SRC = $(wildcard $(TEST_DIR)/*.c)
+TEST_SRC = $(wildcard $(TEST_DIR)/test_*.c)
TEST_OBJS = $(TEST_SRC:.c=.o)
TESTS=$(patsubst %.c,%.bin,$(TEST_SRC))
+TEST_SUPPORT_SRC = $(TEST_DIR)/common.c
+TEST_SUPPORT_OBJS = $(TEST_SUPPORT_SRC:.c=.o)
all: $(OBJS)
@@ -29,7 +31,7 @@ test: $(TESTS)
@export SHELLOPTS
@sh runtests.sh $(TEST_DIR)
-$(TEST_DIR)/%.bin: $(TEST_DIR)/%.o $(OBJS)
+$(TEST_DIR)/%.bin: $(TEST_DIR)/%.o $(OBJS) $(TEST_SUPPORT_OBJS)
@mkdir -p $(dir $@)
$(CC) $(LDFLAGS) $(CC_SYMBOLS) $(INCLUDES) -o $@ $^ $(LDLIBS)