summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/lib/librdkafka-2.1.0/packaging/rpm/tests/Makefile
blob: edd4579974821cbf2454d9d3e72cd349e7cc2ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PROGS?=test test-static testcpp testcpp-static

all: $(PROGS)

test: test.c
	$(CC) -O2 -Werror -Wall $^ -o $@ $$(pkg-config --libs rdkafka)

test-static: test.c
	$(CC) -O2 -Werror -Wall $^ -o $@ $$(pkg-config --libs --static rdkafka-static)

testcpp: test.cpp
	$(CXX) -O2 -Werror -Wall $^ -o $@ $$(pkg-config --libs rdkafka++)

testcpp-static: test.cpp
	$(CXX) -O2 -Werror -Wall $^ -o $@ $$(pkg-config --libs rdkafka++-static)

run:
	@(for p in $(PROGS); do \
		echo "# Running $$p" ; \
		./$$p || (echo $$p failed ; exit 1) ; \
	done)

clean:
	rm -f $(PROGS)