hysteria

ii wrapper script
git clone git://git.2f30.org/hysteria.git
Log | Files | Refs | README | LICENSE

commit 5e3336eae703264e1f18340d6738e0fd96ec2c0f
parent 9ce9eea11d50b0f748730c5acb3699e23a958a56
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue Oct 28 21:43:50 +0000

add suckless Makefile with build, install and uninstall rules.

Diffstat:
Makefile | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config.mk | 25+++++++++++++++++++++++++
2 files changed, 83 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile @@ -0,0 +1,58 @@ +include config.mk + +SRC = hysteria-highlight.c +HDR = +OBJ = ${SRC:.c=.o} + +all: options hysteria-highlight + +options: + @echo hysteria build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + +.c.o: + @echo CC $< + @${CC} -c ${CFLAGS} $< + +${OBJ}: config.mk + +hysteria-highlight: ${OBJ} + @echo CC -o $@ + @${CC} -o $@ ${OBJ} ${LDFLAGS} + +clean: + @echo cleaning + @rm -f hysteria-highlight ${OBJ} + +install: all + @echo installing executable file to ${DESTDIR}${PREFIX}/bin + @mkdir -p ${DESTDIR}${PREFIX}/bin + @cp -f \ + hysteria \ + hysteria-autojoin \ + hysteria-connect \ + hysteria-highlight \ + hysteria-monitor \ + hysteria-waitfile \ + ${DESTDIR}${PREFIX}/bin + @chmod 755 \ + ${DESTDIR}${PREFIX}/bin/hysteria \ + ${DESTDIR}${PREFIX}/bin/hysteria-autojoin \ + ${DESTDIR}${PREFIX}/bin/hysteria-connect \ + ${DESTDIR}${PREFIX}/bin/hysteria-highlight \ + ${DESTDIR}${PREFIX}/bin/hysteria-monitor \ + ${DESTDIR}${PREFIX}/bin/hysteria-waitfile + +uninstall: + @echo removing executable file from ${DESTDIR}${PREFIX}/bin + @rm -f \ + ${DESTDIR}${PREFIX}/bin/hysteria \ + ${DESTDIR}${PREFIX}/bin/hysteria-autojoin \ + ${DESTDIR}${PREFIX}/bin/hysteria-connect \ + ${DESTDIR}${PREFIX}/bin/hysteria-highlight \ + ${DESTDIR}${PREFIX}/bin/hysteria-monitor \ + ${DESTDIR}${PREFIX}/bin/hysteria-waitfile + +.PHONY: all hysteria options clean dist install uninstall diff --git a/config.mk b/config.mk @@ -0,0 +1,25 @@ +VERSION = 0.4 + +# Customize below to fit your system + +# paths +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/share/man + +# includes and libs +INCS = -I. -I/usr/include +LIBS = -L/usr/lib -lc + +# flags +CPPFLAGS = -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE=200809 -D_BSD_SOURCE -D_XOPEN_SOURCE=700 + +# debug +#CFLAGS = -g -std=c99 -pedantic -Wall -Wextra -O0 ${INCS} ${CPPFLAGS} +#LDFLAGS = ${LIBS} + +# release +CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os ${INCS} ${CPPFLAGS} +LDFLAGS = -s ${LIBS} + +# compiler and linker +CC = cc