diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2,12 +2,15 @@ include deps/nanopb/extra/nanopb.mk include config.mk SRC += $(shell find src/ -type f -name '*.c') +SRC += $(NANOPB_DIR)/pb_encode.c +SRC += $(NANOPB_DIR)/pb_decode.c +SRC += $(NANOPB_DIR)/pb_common.c PROTO = $(shell find src/ -type f -name '*.proto') OBJ = $(PROTO:%.proto=$(BUILD_DIR)/%.pb.c.o) OBJ += $(SRC:%=$(BUILD_DIR)/%.o) H = include/libumumble.h -.PHONY: all static shared clean install-static install-shared install +.PHONY: all static shared tests clean install-static install-shared install all: static shared @@ -18,7 +21,7 @@ shared: $(DNAME) $(OBJ): config.mk $(PROTO) $(SNAME): $(OBJ) - ar -rcs $@ $^ + ar rcs $@ $? $(DNAME): LDFLAGS += -shared $(DNAME): $(OBJ) @@ -28,8 +31,12 @@ $(BUILD_DIR)/%.c.o: %.c mkdir -p '$(@D)' $(CC) -c -o $@ $(INCLUDES) $(CFLAGS) $< +tests: + $(MAKE) -C tests + clean: rm -rf $(SNAME) $(DNAME) $(BUILD_DIR) src/*.pb.h src/*.pb.c + $(MAKE) -C tests clean install-header: install -m 644 $(H) |