2 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
6 include $(TOPDIR
)/include/builddefs
13 # headers to install in include/xfs
14 PKGHFILES
= xfs_fs.h \
17 # headers with build dependencies
24 # headers installed in QA targets
25 QAHFILES
= xfs_alloc.h \
53 init.c kmem.c logitem.c radix-tree.c rdwr.c trans.c util.c \
78 xfs_symlink_remote.c \
81 CFILES
+= $(PKG_PLATFORM
).c
82 PCFILES
= darwin.c freebsd.c irix.c linux.c
83 LSRCFILES
= $(shell echo
$(PCFILES
) | sed
-e
"s/$(PKG_PLATFORM).c//g")
84 LSRCFILES
+= gen_crc32table.c
88 # -DIO_DEBUG reads and writes of buffers
89 # -DMEM_DEBUG all zone memory use
90 # -DLI_DEBUG log item (ino/buf) manipulation
91 # -DXACT_DEBUG transaction state changes
97 LTLIBS
= $(LIBPTHREAD
) $(LIBRT
)
99 # don't try linking xfs_repair with a debug libxfs.
102 LDIRT
= gen_crc32table crc32table.h crc32selftest
104 default
: xfs crc32selftest ltdepend
$(LTLIBRARY
)
106 crc32table.h
: gen_crc32table.c
107 @echo
" [CC] gen_crc32table"
108 $(Q
) $(CC
) $(CFLAGS
) -o gen_crc32table
$<
109 @echo
" [GENERATE] $@"
110 $(Q
) .
/gen_crc32table
> crc32table.h
112 # The selftest binary will return an error if it fails. This is made a
113 # dependency of the build process so that we refuse to build the tools on broken
114 # systems/architectures. Hence we make sure that xfsprogs will never use a
115 # busted CRC calculation at build time and hence avoid putting bad CRCs down on
117 crc32selftest
: gen_crc32table.c crc32table.h crc32.c
118 @echo
" [TEST] CRC32"
119 $(Q
) $(CC
) $(CFLAGS
) -D CRC32_SELFTEST
=1 crc32.c
-o
$@
122 # set up include/xfs header directory
123 xfs
: $(addsuffix -hdrs
, $(PKGHFILES
) $(QAHFILES
))
126 $(Q
)$(LN_S
) -f
$(PWD
)/libxfs
/$* $(TOPDIR
)/include/xfs
/$*
128 include $(BUILDRULES
)
133 $(INSTALL
) -m
644 $(HFILES
) $(PKG_INC_DIR
)
135 install-qa
: install-dev
136 $(INSTALL
) -m
644 $(QAHFILES
) $(PKG_INC_DIR
)