aboutsummaryrefslogtreecommitdiffstats
path: root/examples/hashtable/Makefile
blob: c06e4824c5b35abb7a136de160cc582fca9efdf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PHONY: test clean
TESTS=test_insert.test
COMMON_OBJS=../test_common.o uns_hashtable.o
.SUFFIXES: .test
CFLAGS=-Wall -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_insert.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)