Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eee6a22ccd | ||
|
|
ee2d7a2e07 | ||
|
|
e5949b409f | ||
|
|
13703fb15f |
16
Makefile
16
Makefile
@@ -3,7 +3,6 @@ VERSION := $(shell ./version.sh)
|
||||
DIST := $(NAME)-$(VERSION)
|
||||
|
||||
CC ?= cc
|
||||
DESTDIR ?=
|
||||
prefix ?= /usr
|
||||
Q := @
|
||||
|
||||
@@ -18,15 +17,22 @@ FLAGS += -L.static/$(CROSS)/libsodium-stable/src/libsodium/.libs
|
||||
SRC := argz/argz.c mud/mud.c mud/aegis256/aegis256.c $(wildcard src/*.c)
|
||||
HDR := argz/argz.h mud/mud.h mud/aegis256/aegis256.h $(wildcard src/*.h)
|
||||
|
||||
ifneq ($(CROSS),)
|
||||
X = $(CROSS)-
|
||||
endif
|
||||
|
||||
$(NAME): $(SRC) $(HDR)
|
||||
@echo "$(NAME)"
|
||||
$(Q)$(CC) $(FLAGS) -o $(NAME) $(SRC) -lsodium
|
||||
$(Q)$(X)$(CC) $(FLAGS) -o $(NAME) $(SRC) -lsodium
|
||||
|
||||
$(NAME)-strip: $(NAME)
|
||||
$(Q)cp $< $@
|
||||
$(Q)$(X)strip -x $@
|
||||
|
||||
.PHONY: install
|
||||
install: $(NAME)
|
||||
install: $(NAME)-strip
|
||||
@echo "$(DESTDIR)$(prefix)/bin/$(NAME)"
|
||||
$(Q)install -m 755 -d $(DESTDIR)$(prefix)/bin
|
||||
$(Q)install -m 755 -s $(NAME) $(DESTDIR)$(prefix)/bin
|
||||
$(Q)install -m 755 $(NAME)-strip $(DESTDIR)$(prefix)/bin/$(NAME)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
2
mud
2
mud
Submodule mud updated: 5be4096452...2f966bb365
@@ -189,9 +189,10 @@ gt_path(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int set_rate = argz_is_set(pathz, "rate");
|
||||
int set = argz_is_set(pathz, "rate")
|
||||
|| argz_is_set(pathz, "beat");
|
||||
|
||||
if (set_rate && !req.path.addr.ss_family) {
|
||||
if (set && !req.path.addr.ss_family) {
|
||||
gt_log("please specify a path\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -213,7 +214,7 @@ gt_path(int argc, char **argv)
|
||||
int ret;
|
||||
|
||||
if (!req.path.addr.ss_family ||
|
||||
(req.path.state == MUD_EMPTY && !set_rate)) {
|
||||
(req.path.state == MUD_EMPTY && !set)) {
|
||||
ret = gt_path_status(fd, req.path.state, &req.path.addr);
|
||||
} else {
|
||||
ret = ctl_reply(fd, &res, &req);
|
||||
|
||||
Reference in New Issue
Block a user