diff options
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | README.md | 7 | ||||
| m--------- | ext/libhydrogen | 0 |
4 files changed, 14 insertions, 8 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ade3b37 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ext/libhydrogen"] + path = ext/libhydrogen + url = https://github.com/jedisct1/libhydrogen @@ -1,13 +1,14 @@ PREFIX ?= /usr/local WFLAGS ?= -Wall -Wextra -Wmissing-prototypes -Wdiv-by-zero -Wbad-function-cast -Wcast-align -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wnested-externs -Wno-unknown-pragmas -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wswitch-enum -Wno-type-limits CFLAGS ?= -Os -march=native -fno-exceptions $(WFLAGS) -CFLAGS += -I. -OBJ = src/encpipe.o src/safe_rw.o +CFLAGS += -I. -Iext/libhydrogen +OBJ = ext/libhydrogen/hydrogen.o src/encpipe.o src/safe_rw.o AR ?= ar RANLIB ?= ranlib STRIP ?= strip SRC = \ + ext/libhydrogen/hydrogen.c \ src/common.h \ src/encpipe.c \ src/encpipe_p.h \ @@ -19,7 +20,7 @@ all: bin bin: encpipe encpipe: $(OBJ) - $(CC) $(CFLAGS) -o encpipe $(OBJ) -lhydrogen + $(CC) $(CFLAGS) -o encpipe $(OBJ) install: bin -$(STRIP) encpipe 2> /dev/null @@ -31,7 +32,12 @@ uninstall: $(OBJ): $(SRC) +ext/libhydrogen/hydrogen.c: + git submodule update --init + .PHONY: clean clean: rm -f encpipe $(OBJ) + +distclean: clean @@ -29,11 +29,8 @@ encpipe -e -p password -i /etc/passwd | nc 127.0.0.1 6666 # Dependencies -[libhydrogen](https://github.com/jedisct1/libhydrogen) - Install with -`make install` - -The library gets statically linked, so the resulting binary doesn't -have any dependencies besides the standard C library. +None. It includes [libhydrogen](https://github.com/jedisct1/libhydrogen) as +a submodule. There is nothing to install. # Installation diff --git a/ext/libhydrogen b/ext/libhydrogen new file mode 160000 +Subproject c223fbeeec7aa621d21ddd83ed41de8569eaa88 |