diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 19 | ||||
| -rw-r--r-- | tests/test.c | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..bc757bf --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,19 @@ +include ../config.mk +INCLUDES = -I../include + +SRC = $(shell find -type f -name '*.c') +BIN = $(SRC:%.c=%) + +LDLIBS = -luv -l:libumumble.a +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) diff --git a/tests/test.c b/tests/test.c new file mode 100644 index 0000000..d96167c --- /dev/null +++ b/tests/test.c @@ -0,0 +1,11 @@ +#include <libumumble.h> + +int main(int argc, char *argv[]) +{ + mumble_ctx_t ctx; + printf("%ld\n", ctx.uv_loop.time); + mumble_init_ctx(&ctx); + printf("%ld\n", ctx.uv_loop.time); + mumble_free_ctx(&ctx); + printf("%ld\n", ctx.uv_loop.time); +} |