catpoint

Catpoint simple presenting software.
git clone git://r-36.net/catpoint
Log | Files | Refs | README | LICENSE

Makefile (1613B)


      1 # catpoint - simple presentation software
      2 # See LICENSE file for copyright and license details.
      3 
      4 .POSIX:
      5 
      6 NAME = catpoint
      7 VERSION = 0.2
      8 
      9 # paths
     10 PREFIX = /usr/local
     11 MANPREFIX = ${PREFIX}/share/man
     12 
     13 # use system flags.
     14 CATPOINT_CFLAGS = ${CFLAGS}
     15 CATPOINT_CPPFLAGS = ${CPPFLAGS} -D_DEFAULT_SOURCE
     16 CATPOINT_LDFLAGS = ${LDFLAGS} -lncursesw
     17 # Gentoo
     18 #CATPOINT_LDFLAGS = ${LDFLAGS} -lncursesw -ltinfow
     19 
     20 SRC = ${NAME}.c
     21 MAN1 = ${NAME}.1
     22 BIN = ${NAME}
     23 OBJ = ${SRC:.c=.o}
     24 
     25 all: catpoint
     26 
     27 options:
     28 	@echo ${NAME} build options:
     29 	@echo "CFLAGS   = ${CFLAGS}"
     30 	@echo "LDFLAGS  = ${LDFLAGS}"
     31 	@echo "CC       = ${CC}"
     32 
     33 config.h:
     34 	cp config.def.h config.h
     35 
     36 .c.o:
     37 	${CC} -c ${CATPOINT_CFLAGS} ${CATPOINT_CPPFLAGS} $<
     38 
     39 ${OBJ}:
     40 
     41 catpoint: ${OBJ}
     42 	${CC} -o $@ ${OBJ} ${CATPOINT_LDFLAGS}
     43 
     44 clean:
     45 	rm -f ${BIN} ${OBJ} ${NAME}-${VERSION}.tar.gz
     46 
     47 dist:
     48 	mkdir -p ${NAME}-${VERSION}
     49 	cp -R LICENSE Makefile README.md TOOLS PATH-MAX-LIMIT.md ${SRC} \
     50 		${MAN1} showoff ${NAME}-${VERSION}
     51 	tar -cf - "${NAME}-${VERSION}" | \
     52 		gzip -c > ${NAME}-${VERSION}.tar.gz
     53 	rm -rf ${NAME}-${VERSION}
     54 
     55 install: all
     56 	mkdir -p ${DESTDIR}${PREFIX}/bin
     57 	cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
     58 	chmod 755 ${DESTDIR}${PREFIX}/bin/${BIN}
     59 	cp -f catpoint-wrap ${DESTDIR}${PREFIX}/bin
     60 	chmod 755 ${DESTDIR}${PREFIX}/bin/catpoint-wrap
     61 	mkdir -p ${DESTDIR}${MANPREFIX}/man1
     62 	cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1/${MAN1}
     63 	chmod 644 ${DESTDIR}${MANPREFIX}/man1/${MAN1}
     64 
     65 uninstall:
     66 	rm -f ${DESTDIR}${PREFIX}/bin/${BIN}
     67 	rm -f ${DESTDIR}${PREFIX}/bin/catpoint-wrap
     68 	rm -f ${DESTDIR}${MANPREFIX}/man1/${MAN1}
     69 
     70 .PHONY: all options clean dist install uninstall
     71