]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
librt depends on libpthread. libxfs needs librt
[thirdparty/xfsprogs-dev.git] / include / builddefs.in
1 #
2 # Copyright (c) 2004-2006 Silicon Graphics, Inc.
3 # All Rights Reserved.
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it would be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write the Free Software Foundation,
15 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 #
17 # @configure_input@
18 #
19
20 ifndef _BUILDDEFS_INCLUDED_
21 _BUILDDEFS_INCLUDED_ = 1
22
23 DEBUG = @debug_build@
24 OPTIMIZER = @opt_build@
25 MALLOCLIB = @malloc_lib@
26 LOADERFLAGS = @LDFLAGS@
27 LTLDFLAGS = @LDFLAGS@
28
29 LIBRT = @librt@
30 LIBUUID = @libuuid@
31 LIBPTHREAD = @libpthread@
32 LIBTERMCAP = @libtermcap@
33 LIBEDITLINE = @libeditline@
34 LIBREADLINE = @libreadline@
35 LIBBLKID = @libblkid@
36 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
37 LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
38 LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
39 LIBDISK = $(TOPDIR)/libdisk/libdisk.la
40 LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
41
42 PKG_NAME = @pkg_name@
43 PKG_USER = @pkg_user@
44 PKG_GROUP = @pkg_group@
45 PKG_RELEASE = @pkg_release@
46 PKG_VERSION = @pkg_version@
47 PKG_PLATFORM = @pkg_platform@
48 PKG_DISTRIBUTION= @pkg_distribution@
49
50 prefix = @prefix@
51 exec_prefix = @exec_prefix@
52 datarootdir = @datarootdir@
53 top_builddir = @top_builddir@
54
55 PKG_SBIN_DIR = @sbindir@
56 PKG_ROOT_SBIN_DIR = @root_sbindir@
57 PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
58 PKG_LIB_DIR = @libdir@@libdirsuffix@
59 PKG_INC_DIR = @includedir@/xfs
60 DK_INC_DIR = @includedir@/disk
61 PKG_MAN_DIR = @mandir@
62 PKG_DOC_DIR = @datadir@/doc/@pkg_name@
63 PKG_LOCALE_DIR = @datadir@/locale
64
65 CC = @cc@
66 AWK = @awk@
67 SED = @sed@
68 TAR = @tar@
69 ZIP = @zip@
70 MAKE = @make@
71 ECHO = @echo@
72 SORT = @sort@
73 LN_S = @LN_S@
74 LIBTOOL = @LIBTOOL@
75 MAKEDEPEND = @makedepend@
76
77 MSGFMT = @msgfmt@
78 MSGMERGE = @msgmerge@
79 XGETTEXT = @xgettext@
80 LOCALIZED_FILES = @LOCALIZED_FILES@
81
82 RPM = @rpm@
83 RPMBUILD = @rpmbuild@
84 RPM_VERSION = @rpm_version@
85
86 ENABLE_SHARED = @enable_shared@
87 ENABLE_GETTEXT = @enable_gettext@
88 ENABLE_EDITLINE = @enable_editline@
89 ENABLE_READLINE = @enable_readline@
90 ENABLE_BLKID = @enable_blkid@
91
92 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
93
94 HAVE_FADVISE = @have_fadvise@
95 HAVE_MADVISE = @have_madvise@
96 HAVE_MINCORE = @have_mincore@
97 HAVE_SENDFILE = @have_sendfile@
98 HAVE_GETMNTENT = @have_getmntent@
99 HAVE_GETMNTINFO = @have_getmntinfo@
100 HAVE_FALLOCATE = @have_fallocate@
101
102 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
103 # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
104
105 ifeq ($(PKG_PLATFORM),linux)
106 PCFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
107 DEPENDFLAGS = -D__linux__
108 endif
109 ifeq ($(PKG_PLATFORM),gnukfreebsd)
110 PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
111 endif
112 ifeq ($(PKG_PLATFORM),darwin)
113 PCFLAGS = -traditional-cpp $(GCCFLAGS)
114 DEPENDFLAGS = -D__APPLE__
115 endif
116 ifeq ($(PKG_PLATFORM),irix)
117 PLDLIBS = -ldisk -lgen
118 DEPENDFLAGS = -D__sgi__
119 endif
120 ifeq ($(PKG_PLATFORM),freebsd)
121 PLDLIBS = -L/usr/local/lib -lintl
122 PCFLAGS = -I/usr/local/include $(GCCFLAGS)
123 DEPENDFLAGS = -D__FreeBSD__
124 endif
125
126 GCFLAGS = $(OPTIMIZER) $(DEBUG) \
127 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
128 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
129
130 ifeq ($(ENABLE_GETTEXT),yes)
131 GCFLAGS += -DENABLE_GETTEXT
132 endif
133
134 # First, Global, Platform, Local CFLAGS
135 CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
136
137 include $(TOPDIR)/include/buildmacros
138
139 endif
140
141 #
142 # For targets that should always be rebuilt,
143 # define a target that is never up-to-date.
144 # Targets needing this should depend on $(_FORCE)
145 _FORCE = __force_build