File: Makefile

package info (click to toggle)
golang-github-twstrike-otr3 0.0~git20161015.0.744856d-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,080 kB
  • sloc: ansic: 127; makefile: 76
file content (28 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (3)
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
26
27
28
TEST_HELPER = /tmp/a.out

LIBOTR_TARGET = /tmp/libotr2-3.0.0
CFLAGS = -I$(LIBOTR_TARGET)/include/libotr
LDFLAGS =  -L$(LIBOTR_TARGET)/lib
LDLIBS = -lotr

default: libotr-compat

libotr-compat: $(TEST_HELPER)
	LD_LIBRARY_PATH=$(LIBOTR_TARGET)/lib \
	go test -v \
	-run=TestAgainstLibOTR \
	-tags="libotr2" \
	-ldflags "-X github.com/twstrike/otr3/compat.numIterations 1000"

$(TEST_HELPER): $(LIBOTR_TARGET) libotr_test_helper.c
	$(CC) libotr_test_helper.c $(LDLIBS) $(LDFLAGS) $(CFLAGS) -o $(TEST_HELPER)

$(LIBOTR_TARGET):
	$(MAKE) -C ../libotr-test $(LIBOTR_TARGET)

clean: clean-target
	$(RM) $(TEST_HELPER)

clean-target:
	rm -rf $(LIBOTR_TARGET)