bitreich-short

fork of git.z3bra.org/bitreich-short
git clone git://git.pyratebeard.net/bitreich-short.git
Log | Files | Refs | README | LICENSE

Makefile (1039B)


      1 # bitreich-httpd
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 NAME = bitreich-httpd
      6 VERSION = 2.0
      7 
      8 # Customize below to fit your system
      9 
     10 # paths
     11 PREFIX = /usr/local
     12 SHAREPREFIX = ${PREFIX}/share/${NAME}
     13 
     14 # flags
     15 BH_CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE ${CPPFLAGS}
     16 BH_CFLAGS = ${CFLAGS} -pedantic -Wall ${BH_CPPFLAGS}
     17 BH_LDFLAGS = ${LDFLAGS}
     18 
     19 SRC = ${NAME}.c
     20 
     21 OBJ = ${SRC:.c=.o}
     22 
     23 all: ${NAME}
     24 
     25 .c.o:
     26 	${CC} ${BH_CFLAGS} -c $<
     27 
     28 ${OBJ}:
     29 
     30 ${NAME}: ${OBJ}
     31 	${CC} ${BH_LDFLAGS} -o $@ ${OBJ} ${LIBS}
     32 
     33 clean:
     34 	rm -f ${NAME} ${OBJ} ${NAME}-${VERSION}.tar.gz
     35 
     36 dist: clean
     37 	mkdir -p ${NAME}-${VERSION}
     38 	cp -R LICENSE Makefile README.md \
     39 		${SRC} *.h ${NAME}-${VERSION}
     40 	tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
     41 	gzip ${NAME}-${VERSION}.tar
     42 	rm -rf ${NAME}-${VERSION}
     43 
     44 install: all
     45 	mkdir -p '${DESTDIR}${PREFIX}/sbin'
     46 	cp -f ${NAME} "${DESTDIR}${PREFIX}/sbin"
     47 	chmod 755 "${DESTDIR}${PREFIX}/sbin/${NAME}"
     48 
     49 uninstall: clean
     50 	rm -f "${DESTDIR}${PREFIX}/sbin/${NAME}"
     51 
     52 .PHONY: all clean dist install uninstall
     53