summaryrefslogtreecommitdiff
path: root/Makefile
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 /Makefile
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 12 insertions, 15 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)