summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@pvv.ntnu.no>2008-11-27 12:55:27 +0100
committerUlf Lilleengen <lulf@pvv.ntnu.no>2008-11-27 12:55:27 +0100
commit338f166ea5ee9dfc959559a5743e0ce59a4826dc (patch)
tree20620018cb9ae32f00742c21d076b6bb0569800a
parent899ac8ed6a0186d5e30ae6e9286b08b4be8c3131 (diff)
- Missed fusever and makefile changes in the previous commit.
- Also put a consistent sorting on header includes: * System includes first * Then, standard C libraries * Then additiona libraries and our own headers.
-rw-r--r--Makefile27
-rw-r--r--src/mfs_cleanup_db.c1
-rw-r--r--src/mfs_subr.c13
-rwxr-xr-xsrc/mfs_vnops.c17
-rwxr-xr-xsrc/musicfs.c4
5 files changed, 30 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 99c6e3a..afdc002 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,17 @@
-CFLAGS = -Wall -std=c99 -D_BSD_SOURCE -I/usr/local/include/ -Iinclude/ \
- -lpthread -g `pkg-config fuse --cflags` `pkg-config taglib \
- --cflags` -DDEBUGGING -DSQLITE_THREADED
+SUBDIRS= src
+TARGET= musicfs
-LD_ADD = -L/usr/local/lib -lsqlite3 -ltag_c \
- `pkg-config fuse --libs`
-CC = gcc
+.PHONY: all
+all: $(TARGET)
-C_FILES = $(wildcard src/*.c)
-OBJS = $(C_FILES:.c=.o) \
+# A bit of a hack..
+$(TARGET): $(SUBDIRS)
+ cp src/$(TARGET) .
-PROGRAM = musicfs
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS)
- $(CC) -o $@ $+ $(LD_ADD)
+.PHONY: subdirs $(SUBDIRS)
+$(SUBDIRS):
+ $(MAKE) -C $@
clean:
- rm -f $(PROGRAM) $(OBJS) *~
+ for d in $(SUBDIRS); do ($(MAKE) -C $$d clean); done
+ rm -f $(TARGET)
diff --git a/src/mfs_cleanup_db.c b/src/mfs_cleanup_db.c
index c4cf258..2149f8e 100644
--- a/src/mfs_cleanup_db.c
+++ b/src/mfs_cleanup_db.c
@@ -20,6 +20,7 @@
* A copy of the license can typically be found in COPYING
*/
+#include <fusever.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/mfs_subr.c b/src/mfs_subr.c
index d92e85a..3749d1c 100644
--- a/src/mfs_subr.c
+++ b/src/mfs_subr.c
@@ -20,21 +20,20 @@
* A copy of the license can typically be found in COPYING
*/
-/* Miscellaneous subroutines for musicfs. */
-#define FUSE_USE_VERSION 26
+#include <sys/types.h>
+#include <sys/param.h>
+#include <dirent.h>
+#include <pthread.h>
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <err.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <dirent.h>
+#include <fusever.h>
#include <fuse.h>
-#include <pthread.h>
#include <tag_c.h>
-
#include <debug.h>
#include <musicfs.h>
#include <sqlite3.h>
diff --git a/src/mfs_vnops.c b/src/mfs_vnops.c
index 306b8fa..fc029e4 100755
--- a/src/mfs_vnops.c
+++ b/src/mfs_vnops.c
@@ -20,28 +20,29 @@
* A copy of the license can typically be found in COPYING
*/
-#define FUSE_USE_VERSION 26
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <err.h>
-
#include <sys/types.h>
#include <sys/time.h>
#include <dirent.h>
-#include <fuse.h>
#include <sys/param.h>
#include <sys/uio.h>
#include <unistd.h>
#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <err.h>
+
+#include <fusever.h>
+#include <fuse.h>
#include <tag_c.h>
#include <musicfs.h>
#include <debug.h>
static int mfs_getattr (const char *path, struct stat *stbuf)
{
+
char *realpath;
int res;
diff --git a/src/musicfs.c b/src/musicfs.c
index faa740f..86b90b9 100755
--- a/src/musicfs.c
+++ b/src/musicfs.c
@@ -20,10 +20,10 @@
* A copy of the license can typically be found in COPYING
*/
-#define FUSE_USE_VERSION 26
-
#include <stdlib.h>
#include <stdio.h>
+
+#include <fusever.h>
#include <fuse.h>
#include <fuse_opt.h>
#include <musicfs.h>