diff options
Diffstat (limited to 'tests/threads/Makefile')
-rw-r--r-- | tests/threads/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/threads/Makefile b/tests/threads/Makefile new file mode 100644 index 000000000..01060060a --- /dev/null +++ b/tests/threads/Makefile @@ -0,0 +1,31 @@ +HASHDIR = ../../src +PROGS = test1 test2 + +# Thread support requires compiler-specific options +# ---------------------------------------------------------------------------- +# GNU +CFLAGS += -I$(HASHDIR) -g -pthread +# Solaris (Studio 11) +#CFLAGS = -I$(HASHDIR) -g -mt +# ---------------------------------------------------------------------------- + +ifeq ($(HASH_DEBUG),1) +CFLAGS += -DHASH_DEBUG=1 +endif + +all: $(PROGS) run_tests + +$(PROGS) : $(HASHDIR)/uthash.h + $(CC) $(CPPLFAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(@).c + +debug: + $(MAKE) all HASH_DEBUG=1 + +run_tests: $(PROGS) + perl ../do_tests + +.PHONY: clean + +clean: + rm -f $(PROGS) test*.out + rm -rf test*.dSYM |