rfcommd

RFCOMM daemon to run filters on clients.
git clone git://arztpraxis-lohmann.de/rfcommd
Log | Files | Refs | LICENSE

Makefile (1148B)


      1 # rfcomm-script - a rfcomm service script
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 NAME = rfcommd
      6 VERSION = 0.2
      7 
      8 PREFIX = /usr/local
      9 BINDIR = ${PREFIX}/sbin
     10 MANDIR = ${PREFIX}/share/man/man1
     11 
     12 RFCOMMD_CFLAGS = -D_GNU_SOURCE -Wall -I. -I/usr/include ${CFLAGS}
     13 RFCOMMD_LDFLAGS = -L/usr/lib -L. -lbluetooth ${LDFLAGS}
     14 
     15 SRC = rfcommd.c
     16 OBJ = ${SRC:.c=.o}
     17 
     18 all: ${NAME}
     19 
     20 .c.o:
     21 	${CC} ${RFCOMMD_CFLAGS} -c $<
     22 
     23 ${OBJ}:
     24 
     25 ${NAME}: ${OBJ}
     26 	${CC} -o $@ ${OBJ} ${RFCOMMD_LDFLAGS}
     27 
     28 clean:
     29 	rm -f ${NAME} ${OBJ} ${NAME}-${VERSION}.tar.gz
     30 
     31 install: all
     32 	mkdir -p "${DESTDIR}${BINDIR}"
     33 	cp -f ${NAME} "${DESTDIR}${BINDIR}"
     34 	chmod 755 "${DESTDIR}${BINDIR}/${NAME}"
     35 	#mkdir -p "${DESTDIR}${MANDIR}"
     36 	#cp -f ${NAME}.1 "${DESTDIR}${MANDIR}"
     37 	#chmod 644 "${DESTDIR}${MANDIR}/${MANDIR}.1"
     38 
     39 uninstall:
     40 	rm -f "${DESTDIR}${BINDIR}/${NAME}"
     41 	#rm -f "${DESTDIR}${MANDIR}/${NAME}.1"
     42 
     43 dist: clean
     44 	mkdir -p ${NAME}-${VERSION}
     45 	cp -R *.c *.h Makefile \
     46 		${NAME}-${VERSION}
     47 	tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
     48 	gzip ${NAME}-${VERSION}.tar
     49 	mv ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}.tgz
     50 	rm -rf "${NAME}-${VERSION}"
     51 
     52 .PHONY: all clean
     53