2009-08-15 18:56:11 +00:00
|
|
|
# quark - simple httpd get daemon
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
|
|
|
SRC = quark.c
|
|
|
|
OBJ = ${SRC:.c=.o}
|
|
|
|
|
|
|
|
all: options quark
|
|
|
|
|
|
|
|
options:
|
|
|
|
@echo quark build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo CC $<
|
|
|
|
@${CC} -c ${CFLAGS} $<
|
|
|
|
|
2010-03-28 01:09:14 +00:00
|
|
|
${OBJ}: config.mk config.h
|
|
|
|
|
|
|
|
config.h:
|
|
|
|
@echo creating $@ from config.def.h
|
|
|
|
@cp config.def.h $@
|
2009-08-15 18:56:11 +00:00
|
|
|
|
|
|
|
quark: ${OBJ}
|
|
|
|
@echo CC -o $@
|
|
|
|
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo cleaning
|
|
|
|
@rm -f quark ${OBJ} quark-${VERSION}.tar.gz
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
@echo creating dist tarball
|
|
|
|
@mkdir -p quark-${VERSION}
|
2014-08-20 14:25:58 +00:00
|
|
|
@cp -R LICENSE Makefile README config.mk quark.1 arg.h config.def.h ${SRC} quark-${VERSION}
|
2009-08-15 18:56:11 +00:00
|
|
|
@tar -cf quark-${VERSION}.tar quark-${VERSION}
|
|
|
|
@gzip quark-${VERSION}.tar
|
|
|
|
@rm -rf quark-${VERSION}
|
|
|
|
|
|
|
|
install: all
|
|
|
|
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
|
|
|
|
@mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
@cp -f quark ${DESTDIR}${PREFIX}/bin
|
|
|
|
@chmod 755 ${DESTDIR}${PREFIX}/bin/quark
|
2014-08-20 14:25:58 +00:00
|
|
|
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
@sed "s/VERSION/${VERSION}/g" < quark.1 > ${DESTDIR}${MANPREFIX}/man1/quark.1
|
2009-08-15 18:56:11 +00:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
|
|
|
|
@rm -f ${DESTDIR}${PREFIX}/bin/quark
|
2014-08-20 14:25:58 +00:00
|
|
|
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
@rm -f ${DESTDIR}${MANPREFIX}/man1/quark.1
|
2009-08-15 18:56:11 +00:00
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall
|