Package: hfsprogs / 332.25-11

0001-Create-short-Makefiles-for-Debian.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
Date: Thu, 24 Oct 2013 01:11:21 -0200
Subject: Create short Makefiles for Debian

Create short Makefiles for compiling just the necessary parts for a
Debian-based (and possibly other distributions) HFS+ filesystem
utilities.
---
 Makefile.lnx                       |  8 ++++++++
 fsck_hfs.tproj/Makefile.lnx        | 16 ++++++++++++++++
 fsck_hfs.tproj/dfalib/Makefile.lnx | 15 +++++++++++++++
 newfs_hfs.tproj/Makefile.lnx       | 12 ++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 Makefile.lnx
 create mode 100644 fsck_hfs.tproj/Makefile.lnx
 create mode 100644 fsck_hfs.tproj/dfalib/Makefile.lnx
 create mode 100644 newfs_hfs.tproj/Makefile.lnx

diff --git a/Makefile.lnx b/Makefile.lnx
new file mode 100644
index 0000000..687d1e7
--- /dev/null
+++ b/Makefile.lnx
@@ -0,0 +1,8 @@
+CC := gcc
+CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
+SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
+
+all clean:
+	for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done
+
+export CC CFLAGS
diff --git a/fsck_hfs.tproj/Makefile.lnx b/fsck_hfs.tproj/Makefile.lnx
new file mode 100644
index 0000000..977d7e8
--- /dev/null
+++ b/fsck_hfs.tproj/Makefile.lnx
@@ -0,0 +1,16 @@
+CFILES = fsck_hfs.c strings.c utilities.c cache.c fsck_debug.c
+OFILES = $(CFILES:.c=.o)
+
+all: fsck_hfs
+
+fsck_hfs: $(OFILES) dfalib/libdfa.a
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) dfalib/libdfa.a -lbsd
+
+dfalib/libdfa.a: FORCE
+	$(MAKE) -C dfalib -f Makefile.lnx CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libdfa.a
+
+clean:
+	$(RM) fsck_hfs $(OFILES)
+	$(MAKE) -C dfalib -f Makefile.lnx clean
+
+.PHONY : FORCE clean
diff --git a/fsck_hfs.tproj/dfalib/Makefile.lnx b/fsck_hfs.tproj/dfalib/Makefile.lnx
new file mode 100644
index 0000000..8c07196
--- /dev/null
+++ b/fsck_hfs.tproj/dfalib/Makefile.lnx
@@ -0,0 +1,15 @@
+CFILES = hfs_endian.c BlockCache.c\
+         BTree.c BTreeAllocate.c BTreeMiscOps.c \
+         BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\
+         CatalogCheck.c HardLinkCheck.c\
+         SBTree.c SControl.c SVerify1.c SVerify2.c\
+         SRepair.c SRebuildCatalogBTree.c\
+         SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\
+         SCatalog.c SStubs.c VolumeBitmapCheck.c
+OFILES = $(CFILES:.c=.o)
+
+libdfa.a: $(OFILES)
+	ar rc $@ $?
+
+clean:
+	$(RM) $(OFILES) libdfa.a
diff --git a/newfs_hfs.tproj/Makefile.lnx b/newfs_hfs.tproj/Makefile.lnx
new file mode 100644
index 0000000..58e6700
--- /dev/null
+++ b/newfs_hfs.tproj/Makefile.lnx
@@ -0,0 +1,12 @@
+CFILES = hfs_endian.c makehfs.c newfs_hfs.c
+OFILES = $(CFILES:.c=.o)
+
+all: newfs_hfs
+
+newfs_hfs: $(OFILES)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) -lcrypto
+
+clean:
+	$(RM) newfs_hfs $(OFILES)
+
+.PHONY : FORCE clean