You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB

  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
  4. Create short Makefiles for compiling just the necessary parts for a
  5. Debian-based (and possibly other distributions) HFS+ filesystem
  6. utilities.
  7. ---
  8. Makefile.lnx | 8 ++++++++
  9. fsck_hfs.tproj/Makefile.lnx | 16 ++++++++++++++++
  10. fsck_hfs.tproj/dfalib/Makefile.lnx | 15 +++++++++++++++
  11. newfs_hfs.tproj/Makefile.lnx | 12 ++++++++++++
  12. 4 files changed, 51 insertions(+)
  13. create mode 100644 Makefile.lnx
  14. create mode 100644 fsck_hfs.tproj/Makefile.lnx
  15. create mode 100644 fsck_hfs.tproj/dfalib/Makefile.lnx
  16. create mode 100644 newfs_hfs.tproj/Makefile.lnx
  17. diff --git a/Makefile.lnx b/Makefile.lnx
  18. new file mode 100644
  19. index 0000000..687d1e7
  20. --- /dev/null
  21. +++ b/Makefile.lnx
  22. @@ -0,0 +1,8 @@
  23. +CC := gcc
  24. +CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
  25. +SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
  26. +
  27. +all clean:
  28. + for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done
  29. +
  30. +export CC CFLAGS
  31. diff --git a/fsck_hfs.tproj/Makefile.lnx b/fsck_hfs.tproj/Makefile.lnx
  32. new file mode 100644
  33. index 0000000..977d7e8
  34. --- /dev/null
  35. +++ b/fsck_hfs.tproj/Makefile.lnx
  36. @@ -0,0 +1,16 @@
  37. +CFILES = fsck_hfs.c strings.c utilities.c cache.c fsck_debug.c
  38. +OFILES = $(CFILES:.c=.o)
  39. +
  40. +all: fsck_hfs
  41. +
  42. +fsck_hfs: $(OFILES) dfalib/libdfa.a
  43. + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) dfalib/libdfa.a
  44. +
  45. +dfalib/libdfa.a: FORCE
  46. + $(MAKE) -C dfalib -f Makefile.lnx CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libdfa.a
  47. +
  48. +clean:
  49. + $(RM) fsck_hfs $(OFILES)
  50. + $(MAKE) -C dfalib -f Makefile.lnx clean
  51. +
  52. +.PHONY : FORCE clean
  53. diff --git a/fsck_hfs.tproj/dfalib/Makefile.lnx b/fsck_hfs.tproj/dfalib/Makefile.lnx
  54. new file mode 100644
  55. index 0000000..8c07196
  56. --- /dev/null
  57. +++ b/fsck_hfs.tproj/dfalib/Makefile.lnx
  58. @@ -0,0 +1,15 @@
  59. +CFILES = hfs_endian.c BlockCache.c\
  60. + BTree.c BTreeAllocate.c BTreeMiscOps.c \
  61. + BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\
  62. + CatalogCheck.c HardLinkCheck.c\
  63. + SBTree.c SControl.c SVerify1.c SVerify2.c\
  64. + SRepair.c SRebuildCatalogBTree.c\
  65. + SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\
  66. + SCatalog.c SStubs.c VolumeBitmapCheck.c
  67. +OFILES = $(CFILES:.c=.o)
  68. +
  69. +libdfa.a: $(OFILES)
  70. + $(AR) rc $@ $?
  71. +
  72. +clean:
  73. + $(RM) $(OFILES) libdfa.a
  74. diff --git a/newfs_hfs.tproj/Makefile.lnx b/newfs_hfs.tproj/Makefile.lnx
  75. new file mode 100644
  76. index 0000000..58e6700
  77. --- /dev/null
  78. +++ b/newfs_hfs.tproj/Makefile.lnx
  79. @@ -0,0 +1,12 @@
  80. +CFILES = hfs_endian.c makehfs.c newfs_hfs.c
  81. +OFILES = $(CFILES:.c=.o)
  82. +
  83. +all: newfs_hfs
  84. +
  85. +newfs_hfs: $(OFILES)
  86. + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) -lcrypto
  87. +
  88. +clean:
  89. + $(RM) newfs_hfs $(OFILES)
  90. +
  91. +.PHONY : FORCE clean