1 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
2 Date: Thu, 24 Oct 2013 01:11:21 -0200
3 Subject: Create short Makefiles for Debian
5 Create short Makefiles for compiling just the necessary parts for a
6 Debian-based (and possibly other distributions) HFS+ filesystem
9 Makefile.lnx | 8 ++++++++
10 fsck_hfs.tproj/Makefile.lnx | 16 ++++++++++++++++
11 fsck_hfs.tproj/dfalib/Makefile.lnx | 15 +++++++++++++++
12 newfs_hfs.tproj/Makefile.lnx | 12 ++++++++++++
13 4 files changed, 51 insertions(+)
14 create mode 100644 Makefile.lnx
15 create mode 100644 fsck_hfs.tproj/Makefile.lnx
16 create mode 100644 fsck_hfs.tproj/dfalib/Makefile.lnx
17 create mode 100644 newfs_hfs.tproj/Makefile.lnx
19 diff --git a/Makefile.lnx b/Makefile.lnx
21 index 0000000..687d1e7
26 +CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
27 +SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
30 + for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done
33 diff --git a/fsck_hfs.tproj/Makefile.lnx b/fsck_hfs.tproj/Makefile.lnx
35 index 0000000..977d7e8
37 +++ b/fsck_hfs.tproj/Makefile.lnx
39 +CFILES = fsck_hfs.c strings.c utilities.c cache.c fsck_debug.c
40 +OFILES = $(CFILES:.c=.o)
44 +fsck_hfs: $(OFILES) dfalib/libdfa.a
45 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) dfalib/libdfa.a -lbsd
47 +dfalib/libdfa.a: FORCE
48 + $(MAKE) -C dfalib -f Makefile.lnx CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libdfa.a
51 + $(RM) fsck_hfs $(OFILES)
52 + $(MAKE) -C dfalib -f Makefile.lnx clean
55 diff --git a/fsck_hfs.tproj/dfalib/Makefile.lnx b/fsck_hfs.tproj/dfalib/Makefile.lnx
57 index 0000000..8c07196
59 +++ b/fsck_hfs.tproj/dfalib/Makefile.lnx
61 +CFILES = hfs_endian.c BlockCache.c\
62 + BTree.c BTreeAllocate.c BTreeMiscOps.c \
63 + BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\
64 + CatalogCheck.c HardLinkCheck.c\
65 + SBTree.c SControl.c SVerify1.c SVerify2.c\
66 + SRepair.c SRebuildCatalogBTree.c\
67 + SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\
68 + SCatalog.c SStubs.c VolumeBitmapCheck.c
69 +OFILES = $(CFILES:.c=.o)
75 + $(RM) $(OFILES) libdfa.a
76 diff --git a/newfs_hfs.tproj/Makefile.lnx b/newfs_hfs.tproj/Makefile.lnx
78 index 0000000..58e6700
80 +++ b/newfs_hfs.tproj/Makefile.lnx
82 +CFILES = hfs_endian.c makehfs.c newfs_hfs.c
83 +OFILES = $(CFILES:.c=.o)
88 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) -lcrypto
91 + $(RM) newfs_hfs $(OFILES)