minit

mini init daemon
git clone git://git.ckyln.com/minit.git
Log | Files | Refs | README | LICENSE

Makefile (902B)


      1 VERSION   = 0.1.0
      2 
      3 PREFIX    = /usr/local
      4 MANPREFIX = ${PREFIX}/share/man
      5 BINDIR    = ${PREFIX}/bin
      6 
      7 CFLAGS    = -Wextra -Wall -Os
      8 LDFLAGS   = -s -static
      9 CC        = cc
     10 groff     = groff -m man
     11 
     12 all: minit
     13 
     14 minit: config.h
     15 	${CC} ${LDFLAGS} ${CFLAGS} -o $@ minit.c
     16 
     17 minit.8.html:
     18 	${groff} -Thtml ./minit.8 > minit.8.html
     19 
     20 config.h:
     21 	cp config.def.h config.h
     22 
     23 clean:
     24 	rm -f minit minit-${VERSION}.tar.gz minit.8.html
     25 
     26 dist:
     27 	mkdir minit-${VERSION}
     28 	cp minit.c Makefile LICENSE README.md config.def.h \
     29 		minit-${VERSION}
     30 	tar cf minit-${VERSION}.tar minit-${VERSION}
     31 	gzip minit-${VERSION}.tar
     32 	rm -rf minit-${VERSION}
     33 
     34 htmldoc: minit.8.html
     35 
     36 install: all
     37 	install -Dm755 minit ${DESTDIR}${BINDIR}/minit
     38 	install -Dm644 minit.8 ${DESTDIR}${MANPREFIX}/man8/minit.8
     39 
     40 uninstall:
     41 	rm -f ${DESTDIR}${BINDIR}/minit
     42 	rm -f ${DESTDIR}${MANPREFIX}/man8/minit.8
     43 
     44 .PHONY: all clean dist htmldoc install uninstall