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.

81 lines
2.3 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. --- /dev/null
  18. +++ b/Makefile.lnx
  19. @@ -0,0 +1,8 @@
  20. +CC := gcc
  21. +CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
  22. +SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
  23. +
  24. +all clean:
  25. + for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done
  26. +
  27. +export CC CFLAGS
  28. --- /dev/null
  29. +++ b/fsck_hfs.tproj/Makefile.lnx
  30. @@ -0,0 +1,16 @@
  31. +CFILES = fsck_hfs.c strings.c utilities.c cache.c fsck_debug.c
  32. +OFILES = $(CFILES:.c=.o)
  33. +
  34. +all: fsck_hfs
  35. +
  36. +fsck_hfs: $(OFILES) dfalib/libdfa.a
  37. + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) dfalib/libdfa.a
  38. +
  39. +dfalib/libdfa.a: FORCE
  40. + $(MAKE) -C dfalib -f Makefile.lnx CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libdfa.a
  41. +
  42. +clean:
  43. + $(RM) fsck_hfs $(OFILES)
  44. + $(MAKE) -C dfalib -f Makefile.lnx clean
  45. +
  46. +.PHONY : FORCE clean
  47. --- /dev/null
  48. +++ b/fsck_hfs.tproj/dfalib/Makefile.lnx
  49. @@ -0,0 +1,15 @@
  50. +CFILES = hfs_endian.c BlockCache.c\
  51. + BTree.c BTreeAllocate.c BTreeMiscOps.c \
  52. + BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\
  53. + CatalogCheck.c HardLinkCheck.c\
  54. + SBTree.c SControl.c SVerify1.c SVerify2.c\
  55. + SRepair.c SRebuildCatalogBTree.c\
  56. + SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\
  57. + SCatalog.c SStubs.c VolumeBitmapCheck.c
  58. +OFILES = $(CFILES:.c=.o)
  59. +
  60. +libdfa.a: $(OFILES)
  61. + $(AR) rc $@ $?
  62. +
  63. +clean:
  64. + $(RM) $(OFILES) libdfa.a
  65. --- /dev/null
  66. +++ b/newfs_hfs.tproj/Makefile.lnx
  67. @@ -0,0 +1,12 @@
  68. +CFILES = hfs_endian.c makehfs.c newfs_hfs.c
  69. +OFILES = $(CFILES:.c=.o)
  70. +
  71. +all: newfs_hfs
  72. +
  73. +newfs_hfs: $(OFILES)
  74. + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) -lcrypto
  75. +
  76. +clean:
  77. + $(RM) newfs_hfs $(OFILES)
  78. +
  79. +.PHONY : FORCE clean