nldev

NetLink DEVice manager; a lightweight netlink frontend for mdev.
git clone git://r-36.net/nldev
Log | Files | Refs | README | LICENSE

Makefile (1451B)


      1 # nldev - NetLink Device manager 
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 SRC = ${NAME}.c nltrigger.c
      7 OBJ = ${SRC:.c=.o}
      8 
      9 all: ${NAME} nltrigger
     10 
     11 .c.o:
     12 	${CC} -c ${CFLAGS} $<
     13 
     14 ${OBJ}: config.h config.mk
     15 
     16 config.h:
     17 	cp config.def.h $@
     18 
     19 ${NAME}: ${OBJ}
     20 	${CC} -o $@ $@.o ${LDFLAGS}
     21 
     22 nltrigger: ${OBJ}
     23 	${CC} -o $@ $@.o ${LDFLAGS}
     24 
     25 
     26 clean:
     27 	rm -f ${NAME} ${OBJ} nltrigger ${NAME}-${VERSION}.tar.gz
     28 
     29 dist: clean
     30 	mkdir -p ${NAME}-${VERSION}
     31 	cp -R LICENSE Makefile README.md FIXES.md config.def.h config.mk \
     32 		${SRC} ${NAME}.8 nltrigger.1 *.h ${NAME}-${VERSION}
     33 	tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
     34 	gzip ${NAME}-${VERSION}.tar
     35 	rm -rf ${NAME}-${VERSION}
     36 
     37 install: all
     38 	mkdir -p ${DESTDIR}${PREFIX}/bin
     39 	cp -f ${NAME} ${DESTDIR}${PREFIX}/bin
     40 	cp -f run_${NAME} ${DESTDIR}${PREFIX}/bin
     41 	cp -f nltrigger ${DESTDIR}${PREFIX}/bin
     42 	chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}
     43 	mkdir -p ${DESTDIR}${MANPREFIX}/man8
     44 	cp -f ${NAME}.8 ${DESTDIR}${MANPREFIX}/man8
     45 	chmod 644 ${DESTDIR}${MANPREFIX}/man8/${NAME}.8
     46 	mkdir -p ${DESTDIR}${MANPREFIX}/man1
     47 	cp -f nltrigger.1 ${DESTDIR}${MANPREFIX}/man1
     48 	chmod 644 ${DESTDIR}${MANPREFIX}/man1/nltrigger.1
     49 
     50 uninstall:
     51 	rm -f ${DESTDIR}${PREFIX}/bin/${NAME}
     52 	rm -f ${DESTDIR}${PREFIX}/bin/run_${NAME}
     53 	rm -f ${DESTDIR}${PREFIX}/bin/nltrigger
     54 	rm -f ${DESTDIR}${MANPREFIX}/man8/${NAME}.8
     55 	rm -f ${DESTDIR}${MANPREFIX}/man1/nltrigger.1
     56 
     57 .PHONY: all clean dist install uninstall