about summary refs log tree commit diff stats
path: root/tests/Makefile
blob: 9c8e5681f532366469b60e04d7bee6921256b235 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
include ../config.mk
INCLUDES = -I../include

SRC = $(shell find -type f -name '*.c')
BIN = $(SRC:%.c=%)

LDLIBS = -l:libumumble.a -ltlsuv $(shell pkg-config --libs openssl) -luv
LDFLAGS = -L..

.PHONY: all

all: $(BIN)

$(BIN): $(SRC)
	mkdir -p '$(BUILD_DIR)'
	$(CC) -o $(BUILD_DIR)/$@ $(CFLAGS) $(INCLUDES) $(@:%=%.c) $(LDFLAGS) $(LDLIBS)

clean:
	rm -rf $(BUILD_DIR)