diff options
| author | 2024-06-12 08:56:49 -0400 | |
|---|---|---|
| committer | 2024-06-12 08:56:49 -0400 | |
| commit | 26afacd565bff3a016b769cb7ee644b3b75b809d (patch) | |
| tree | ef65b2ed0bf6dbb77d91307ee7519a9b4b92b58e /examples/string/Makefile | |
| parent | cheney copying collector (diff) | |
strings: add more tests
cheney_c89: fix memory leak errors
Diffstat (limited to 'examples/string/Makefile')
| -rw-r--r-- | examples/string/Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/string/Makefile b/examples/string/Makefile new file mode 100644 index 0000000..25352a8 --- /dev/null +++ b/examples/string/Makefile @@ -0,0 +1,22 @@ +.PHONY: test clean +TESTS=test_small.test test_inefficient.test test_large.test +COMMON_OBJS=test_common.o uns_string.o +.SUFFIXES: .test +CFLAGS=-Wall -Wno-overlength-strings -std=c89 -Werror -pedantic -fPIC -g -Iinclude + +test: $(TESTS) $(COMMON_OBJS) + for i in $(TESTS); do \ + LD_LIBRARY_PATH=$$(pwd)/../../ valgrind ./$$i || exit 1; \ + done + +test_inefficient.test: $(COMMON_OBJS) +test_small.test: $(COMMON_OBJS) +test_large.test: $(COMMON_OBJS) + +.c.test: + $(CC) -I../../include $(CFLAGS) $< $(COMMON_OBJS) -L../../ -luniversalservice -o $@ +.c.o: + $(CC) -I../../include $(CFLAGS) $< -c -o $@ + +clean: + rm -f $(TESTS) $(COMMON_OBJS) |
