PageRenderTime 36ms CodeModel.GetById 17ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/filesystems/unixfs/ancientfs/Makefile

http://macfuse.googlecode.com/
Makefile | 57 lines | 41 code | 12 blank | 4 comment | 0 complexity | ca27a4582f72f7177488537c7b31aad0 MD5 | raw file
 1#
 2# Ancient Unix File Systems for MacFUSE
 3# Amit Singh
 4# http://osxbook.com
 5
 6TARGETS = ancientfs
 7
 8COMMON=../common
 9OSNAME=$(shell uname)
10UNIXFS=$(COMMON)/unixfs
11
12CC = false
13
14ifeq ($(OSNAME), Darwin)
15CC = gcc
16CFLAGS_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)
17CFLAGS_EXTRA = -Wall -Werror -g
18ARCHS = -arch i386 -arch ppc
19LIBS = -lfuse_ino64
20endif
21
22ifeq ($(OSNAME), FreeBSD)
23CC = gcc
24CFLAGS_MACFUSE = -D__DARWIN_64_BIT_INO_T=1 -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=27 -I/usr/local/include -I/usr/local/include/fuse -I$(UNIXFS)
25CFLAGS_EXTRA = -Wall -Werror -g -rdynamic
26ARCHS =
27LIBS = -L/usr/local/lib -lfuse
28endif
29
30ifeq ($(OSNAME), Linux)
31CC = gcc
32CFLAGS_MACFUSE = -D__DARWIN_64_BIT_INO_T=1 -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=27 -I$(COMMON) -I$(UNIXFS)
33CFLAGS_EXTRA = -Wall -Werror -g -rdynamic
34ARCHS =
35LIBS = -lfuse -ldl
36endif
37
38all: $(TARGETS)
39
40OBJS = ancientfs_tap.o ancientfs_tp.o ancientfs_itp.o ancientfs_dtp.o ancientfs_dump.o ancientfs_dump1024.o ancientfs_dumpvn.o ancientfs_dumpvn1024.o ancientfs_voar.o ancientfs_oar.o ancientfs_ar.o ancientfs_bcpio.o ancientfs_cpio_odc.o ancientfs_cpio_newc.o ancientfs_tar.o ancientfs_v1,2,3.o ancientfs_v4,5,6.o ancientfs_v7.o ancientfs_v10.o ancientfs_32v.o ancientfs_2.9bsd.o ancientfs_2.11bsd.o ancientfs_mainx.o
41OBJS_COMMON = $(UNIXFS)/unixfs.o $(UNIXFS)/unixfs_internal.o
42
43ancientfs: $(OBJS) $(OBJS_COMMON)
44	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) $(ARCHS) -o $@ $^ $(LIBS)
45
46-include $(OBJS:.o=.d)
47
48%.o: %.c
49	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) $(ARCHS) $*.c -c -o $*.o
50	$(CC) $(CFLAGS_MACFUSE) $(CFLAGS_EXTRA) -MM $*.c > $*.d
51	@mv -f $*.d $*.d.tmp
52	@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
53	@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
54	@rm -f $*.d.tmp
55
56clean:
57	rm -f $(TARGETS) *.o *.d $(UNIXFS)/*.o $(UNIXFS)/*.d