Print a warning if the underlying filesystem doesnn't support xattrs
[ciopfs.git] / Makefile
blob46dbd9e1c21e502209858978b0f1008ac22bda07
1 include config.mk
3 SRC += ciopfs.c
4 OBJ = ${SRC:.c=.o}
6 all: clean options ciopfs
8 options:
9 @echo ciopfs build options:
10 @echo "CFLAGS = ${CFLAGS}"
11 @echo "LDFLAGS = ${LDFLAGS}"
12 @echo "CC = ${CC}"
14 .c.o:
15 @echo CC $<
16 @${CC} -c ${CFLAGS} $<
18 ${OBJ}: config.mk
20 ciopfs: ${OBJ}
21 @echo CC -o $@
22 @${CC} -o $@ ${OBJ} ${LDFLAGS}
24 debug: clean
25 @make CFLAGS='${DEBUG_CFLAGS}'
27 ascii: clean
28 @make CFLAGS_UNICODE='' LDFLAGS_UNICODE=''
30 unicode-glib: clean
31 @make CFLAGS_UNICODE='${CFLAGS_GLIB}' LDFLAGS_UNICODE='${LDFLAGS_GLIB}'
33 unicode-icu: clean
34 @make CFLAGS_UNICODE='${CFLAGS_ICU}' LDFLAGS_UNICODE='${LDFLAGS_ICU}'
36 clean:
37 @echo cleaning
38 @rm -f ciopfs ${OBJ} ciopfs-${VERSION}.tar.gz
40 dist: clean
41 @echo creating dist tarball
42 @mkdir -p ciopfs-${VERSION}
43 @cp -R Makefile config.mk ciopfs.c ascii.c unicode-icu.c unicode-glib.c ciopfs-${VERSION}
44 @tar -cf ciopfs-${VERSION}.tar ciopfs-${VERSION}
45 @gzip ciopfs-${VERSION}.tar
46 @rm -rf ciopfs-${VERSION}
48 install: ciopfs
49 @echo stripping executable
50 @strip -s ciopfs
51 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
52 @mkdir -p ${DESTDIR}${PREFIX}/bin
53 @cp -f ciopfs ${DESTDIR}${PREFIX}/bin
54 @chmod 755 ${DESTDIR}${PREFIX}/bin/ciopfs
55 @echo creating symlink ${DESTDIR}/sbin/mount.ciopfs
56 @mkdir -p ${DESTDIR}/sbin
57 @ln -sf ${PREFIX}/bin/ciopfs ${DESTDIR}/sbin/mount.ciopfs
58 # @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
59 # @mkdir -p ${DESTDIR}${MANPREFIX}/man1
60 # @sed "s/VERSION/${VERSION}/g" < ciopfs.1 > ${DESTDIR}${MANPREFIX}/man1/ciopfs.1
61 # @chmod 644 ${DESTDIR}${MANPREFIX}/man1/ciopfs.1
63 uninstall:
64 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
65 @rm -f ${DESTDIR}${PREFIX}/bin/ciopfs
66 @echo removing symlink from ${DESTDIR}/sbin/mount.ciopfs
67 @rm -f ${DESTDIR}/sbin/mount.ciopfs
68 # @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
69 # @rm -f ${DESTDIR}${MANPREFIX}/man1/ciopfs.1
71 .PHONY: all options clean dist install uninstall debug ascii unicode-glib unicode-icu