2016-09-02 07:59:02 +00:00
|
|
|
# quark - simple web server
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
2016-09-02 08:43:27 +00:00
|
|
|
all: quark
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
quark: quark.o config.h config.mk
|
2016-09-02 08:43:27 +00:00
|
|
|
${CC} -o $@ quark.o ${LDFLAGS}
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
quark.o: quark.c config.h config.mk
|
2016-09-02 08:43:27 +00:00
|
|
|
${CC} -c ${CFLAGS} quark.c
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
config.h:
|
2016-09-02 08:49:42 +00:00
|
|
|
cp config.def.h $@
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
clean:
|
2016-09-02 08:43:27 +00:00
|
|
|
rm -f quark quark.o quark-${VERSION}.tar.gz
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
dist: clean
|
2016-09-02 08:49:42 +00:00
|
|
|
mkdir -p quark-${VERSION}
|
|
|
|
cp -R LICENSE Makefile arg.h config.def.h config.mk quark.1 \
|
|
|
|
quark.c quark-${VERSION}
|
|
|
|
tar -cf quark-${VERSION}.tar quark-${VERSION}
|
|
|
|
gzip quark-${VERSION}.tar
|
|
|
|
rm -rf quark-${VERSION}
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
install: all
|
2016-09-02 08:49:42 +00:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
cp -f quark ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/quark
|
|
|
|
mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
cp quark.1 ${DESTDIR}${MANPREFIX}/man1/quark.1
|
|
|
|
chmod 644 ${DESTDIR}${MANPREFIX}/man1/quark.1
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
uninstall:
|
2016-09-02 08:43:27 +00:00
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/quark
|
|
|
|
rm -f ${DESTDIR}${MANPREFIX}/man1/quark.1
|
2016-09-02 07:59:02 +00:00
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall
|