From b1ae3015af630c76a2d03f23bd7285638f66605f Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 18 Oct 2012 15:13:30 +0000 Subject: [PATCH] Moved the test files and trying to let them "build" --- tests/Makefile | 46 ++++++++++++++++++++++++++++++++++++ {src/test => tests}/hello.c | 0 tests/project.conf | 16 +++++++++++++ {src/test => tests}/struct.c | 0 {src/test => tests}/union.c | 0 5 files changed, 62 insertions(+) create mode 100644 tests/Makefile rename {src/test => tests}/hello.c (100%) create mode 100644 tests/project.conf rename {src/test => tests}/struct.c (100%) rename {src/test => tests}/union.c (100%) diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..3bf2e5f --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,46 @@ +TARGETS = hello struct union +PREFIX = /usr/local +DESTDIR = +BINDIR = $(PREFIX)/bin +CC = ../src/c99 +CPPFLAGSF?= +CPPFLAGS?= +CFLAGSF = -W +CFLAGS = +RM ?= rm -f +LN ?= ln -f +MKDIR ?= mkdir -p +INSTALL ?= install + + +all: $(TARGETS) + +hello_OBJS = hello +hello_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +struct_OBJS = struct +struct_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +union_OBJS = union +union_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +hello: hello.c + $(CC) $(hello_CFLAGS) -c hello.c + +struct: struct.c + $(CC) $(struct_CFLAGS) -c struct.c + +union: union.c + $(CC) $(union_CFLAGS) -c union.c + +clean: + $(RM) -- $(hello_OBJS) $(struct_OBJS) $(union_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + +uninstall: + +.PHONY: all clean distclean install uninstall diff --git a/src/test/hello.c b/tests/hello.c similarity index 100% rename from src/test/hello.c rename to tests/hello.c diff --git a/tests/project.conf b/tests/project.conf new file mode 100644 index 0000000..3bf029a --- /dev/null +++ b/tests/project.conf @@ -0,0 +1,16 @@ +targets=hello,struct,union +cflags_force=-W +cflags= +cc=../src/c99 + +[hello] +type=object +sources=hello.c + +[struct] +type=object +sources=struct.c + +[union] +type=object +sources=union.c diff --git a/src/test/struct.c b/tests/struct.c similarity index 100% rename from src/test/struct.c rename to tests/struct.c diff --git a/src/test/union.c b/tests/union.c similarity index 100% rename from src/test/union.c rename to tests/union.c