aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Frank Denis <github@pureftpd.org>2017-12-30 12:41:25 +0100
committerGravatar Frank Denis <github@pureftpd.org>2017-12-30 12:41:25 +0100
commit55336e98456fa55da2fd975a737c1b40d85eee6e (patch)
tree73be4bdfca5576e9fc4a5a9eb3ecd64f32539df0 /Makefile
parentff7a2e6e4917657a67759b25f8c4f41ce085c3c7 (diff)
downloadtweetpipe-55336e98456fa55da2fd975a737c1b40d85eee6e.tar.gz
Embded libhydrogen as a submodule
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4656bfd..ff50b37 100644
--- a/Makefile
+++ b/Makefile
@@ -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