PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/filesystems/unixfs/sysvfs/Makefile

http://macfuse.googlecode.com/
Makefile | 39 lines | 25 code | 9 blank | 5 comment | 0 complexity | 598d20616284070d26c8ce242cf368d0 MD5 | raw file
 1#
 2# SYSV File System Famiy for MacFUSE
 3# Amit Singh
 4# http://osxbook.com
 5#
 6
 7TARGETS = sysvfs
 8
 9COMMON=../common
10UNIXFS=$(COMMON)/unixfs
11LINUX=$(COMMON)/linux
12LINUX_KERNEL=$(LINUX)/kernel
13
14CC = gcc
15CFLAGS_MACFUSE = -D__FreeBSD__=10 -D__DARWIN_64_BIT_INO_T=1 -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=27 -I/usr/local/include/fuse -I$(UNIXFS) -I$(LINUX)
16CFLAGS_EXTRA = -Wall -Werror -g
17ARCHS = -arch i386 -arch ppc
18LIBS = -lfuse_ino64
19
20all: $(TARGETS)
21
22OBJS = unixfs_sysvfs.o sysvfs.o sysvfs_mainx.o
23OBJS_COMMON = $(UNIXFS)/unixfs.o $(UNIXFS)/unixfs_internal.o $(LINUX)/linux.o
24
25sysvfs: $(OBJS) $(OBJS_COMMON)
26	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) $(ARCHS) -o $@ $^ $(LIBS)
27
28-include $(OBJS:.o=.d)
29
30%.o: %.c
31	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) $(ARCHS) $*.c -c -o $*.o
32	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) -MM $*.c > $*.d
33	@mv -f $*.d $*.d.tmp
34	@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
35	@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
36	@rm -f $*.d.tmp
37
38clean:
39	rm -f $(TARGETS) *.o *.d $(UNIXFS)/*.o $(UNIXFS)/*.d $(LINUX)/*.o $(LINUX)/*.d