From c9e402dc018b531cc7eb05a27c0b8c0994f5f976 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 30 Nov 2012 14:43:57 +0100 Subject: [PATCH] Added a test for the graphing backend --- tests/Makefile | 10 ++++++++-- tests/graph.c | 9 +++++++++ tests/project.conf | 7 ++++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 tests/graph.c diff --git a/tests/Makefile b/tests/Makefile index 811ea19..81be72f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,4 @@ -TARGETS = hello struct union +TARGETS = graph hello struct union PREFIX = /usr/local DESTDIR = BINDIR = $(PREFIX)/bin @@ -16,6 +16,9 @@ INSTALL ?= install all: $(TARGETS) +graph_OBJS = graph +graph_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) -M graph + hello_OBJS = hello hello_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) @@ -25,6 +28,9 @@ struct_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) union_OBJS = union union_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +graph: graph.c + $(CC) $(graph_CFLAGS) -c graph.c + hello: hello.c $(CC) $(hello_CFLAGS) -c hello.c @@ -35,7 +41,7 @@ union: union.c $(CC) $(union_CFLAGS) -c union.c clean: - $(RM) -- $(hello_OBJS) $(struct_OBJS) $(union_OBJS) + $(RM) -- $(graph_OBJS) $(hello_OBJS) $(struct_OBJS) $(union_OBJS) distclean: clean $(RM) -- $(TARGETS) diff --git a/tests/graph.c b/tests/graph.c new file mode 100644 index 0000000..49f92a3 --- /dev/null +++ b/tests/graph.c @@ -0,0 +1,9 @@ +int test(void) +{ + return 0; +} + +int calltest(void) +{ + return test(); +} diff --git a/tests/project.conf b/tests/project.conf index fea11bc..1936811 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,9 +1,14 @@ -targets=hello,struct,union +targets=graph,hello,struct,union cflags_force=-W cflags= cc=../src/c99 dist=Makefile +[graph] +type=object +sources=graph.c +cflags=-M graph + [hello] type=object sources=hello.c