blob: c3e7685a97944ff038c454d0e09ef551e455e720 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001# Beginning of file MCONFIG
2
Theodore Ts'oef8901b1999-07-03 04:55:36 +00003all::
4
Theodore Ts'o3e377db2000-12-09 02:37:33 +00005check::
6
Theodore Ts'o50e1e101997-04-26 13:58:21 +00007SHELL = /bin/sh
8
Theodore Ts'o482afc42002-10-31 03:32:34 -05009COMPRESS_EXT = gz bz2 bz Z
10
Theodore Ts'o50e1e101997-04-26 13:58:21 +000011prefix = @prefix@
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000012root_prefix = @root_prefix@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000013exec_prefix = @exec_prefix@
Theodore Ts'ob5ffead2002-05-11 19:17:00 -040014root_bindir = @root_bindir@
15root_sbindir = @root_sbindir@
16root_libdir = @root_libdir@
Theodore Ts'ob6b65c32006-10-22 00:14:26 -040017datarootdir = @datarootdir@
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000018bindir = @bindir@
19sbindir = @sbindir@
20libdir = @libdir@
Theodore Ts'ob5ffead2002-05-11 19:17:00 -040021datadir= @datadir@
Theodore Ts'oa04eba32003-05-03 16:35:17 -040022localedir = $(datadir)/locale
Theodore Ts'ob5ffead2002-05-11 19:17:00 -040023root_sysconfdir= @root_sysconfdir@
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000024includedir = @includedir@
25mandir = @mandir@
Theodore Ts'oa4bf69d1999-05-29 21:53:30 +000026man1dir = $(mandir)/man1
27man3dir = $(mandir)/man3
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050028man5dir = $(mandir)/man5
Theodore Ts'oa4bf69d1999-05-29 21:53:30 +000029man8dir = $(mandir)/man8
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000030infodir = @infodir@
31datadir = @datadir@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000032
33@SET_MAKE@
34
Theodore Ts'o50e1e101997-04-26 13:58:21 +000035CC = @CC@
Theodore Ts'o6c133521999-07-03 20:37:03 +000036BUILD_CC = @BUILD_CC@
Matthias Andreeabcfdfd2006-06-10 16:08:18 +020037DEFS = -DLOCALEDIR=\"$(localedir)\" -DROOT_SYSCONFDIR=\"$(root_sysconfdir)\" @DEFS@
Theodore Ts'o74becf31997-04-26 14:37:06 +000038CFLAGS = @CFLAGS@
Matthias Andree290806a2005-01-20 03:17:31 +010039CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @CPPFLAGS@
Theodore Ts'oc6f35b82003-05-17 16:29:27 -040040INTL_FLAGS = @INTL_FLAGS@
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +000041ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
Matthias Andree290806a2005-01-20 03:17:31 +010042 $(INTL_FLAGS) $(LINUX_INCLUDE)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000043LDFLAGS = @LDFLAGS@
Theodore Ts'o74becf31997-04-26 14:37:06 +000044ALL_LDFLAGS = $(LDFLAGS)
Theodore Ts'odd947da2005-11-09 18:37:07 -040045BUILD_CFLAGS = @BUILD_CFLAGS@
46BUILD_LDFLAGS = @BUILD_LDFLAGS@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000047RM = @RM@
48LN = @LN@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000049LN_S = @LN_S@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000050MV = @MV@
51CP = @CP@
52CHMOD = @CHMOD@
53AR = @AR@
54AWK = @AWK@
55SED = @SED@
Theodore Ts'o9d564f71999-07-03 20:25:58 +000056PERL = @PERL@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000057RANLIB = @RANLIB@
58STRIP = @STRIP@
59LD = $(PURE) @CC@
60ARUPD = $(AR) r
Theodore Ts'o47204ff2004-11-30 10:52:27 -050061ARGEN = $(AR) rc
Theodore Ts'o250f79f2001-05-19 22:02:22 +000062LDCONFIG = @LDCONFIG@
Theodore Ts'o6d402272004-12-14 21:46:26 -050063INSTALL_PROGRAM = @INSTALL_PROGRAM@
64INSTALL_DATA = @INSTALL_DATA@
65INSTALL_SCRIPT = @INSTALL_SCRIPT@
66MKINSTALLDIRS = @MKINSTALLDIRS@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000067
68#
Theodore Ts'oa4d09611997-04-29 14:28:00 +000069# Library definitions
70#
Karel Zak4db2f592006-03-08 14:17:28 -050071DEVMAPPER_LIBS = @DEVMAPPER_LIBS@
72STATIC_DEVMAPPER_LIBS = @STATIC_DEVMAPPER_LIBS@
73
Theodore Ts'oa4d09611997-04-29 14:28:00 +000074LIB = $(top_builddir)/lib
75LIBSS = $(LIB)/libss@LIB_EXT@
76LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
77LIBE2P = $(LIB)/libe2p@LIB_EXT@
78LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000079LIBUUID = $(LIB)/libuuid@LIB_EXT@ @SOCKET_LIB@
Theodore Ts'occe2f492006-10-01 22:18:08 -040080LIBBLKID = $(LIB)/libblkid@LIB_EXT@
Theodore Ts'oa04eba32003-05-03 16:35:17 -040081LIBINTL = @LIBINTL@
Theodore Ts'o77200f42000-01-18 17:53:27 +000082DEPLIBUUID = $(LIB)/libuuid@LIB_EXT@
Theodore Ts'occe2f492006-10-01 22:18:08 -040083DEPLIBBLKID = $(LIB)/libblkid@LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +000084
85STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
86STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
87STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
88STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000089STATIC_LIBUUID = $(LIB)/libuuid@STATIC_LIB_EXT@ @SOCKET_LIB@
Karel Zak4db2f592006-03-08 14:17:28 -050090STATIC_LIBBLKID = $(LIB)/libblkid@STATIC_LIB_EXT@ $(STATIC_DEVMAPPER_LIBS)
Theodore Ts'o77200f42000-01-18 17:53:27 +000091DEPSTATIC_LIBUUID = $(LIB)/libuuid@STATIC_LIB_EXT@
Theodore Ts'occe2f492006-10-01 22:18:08 -040092DEPSTATIC_LIBBLKID = $(LIB)/libblkid@STATIC_LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +000093
94PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
95PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
96PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
97PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000098PROFILED_LIBUUID = $(LIB)/libuuid@PROFILED_LIB_EXT@ @SOCKET_LIB@
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050099PROFILED_LIBBLKID = $(LIB)/libblkid@PROFILED_LIB_EXT@
Theodore Ts'o77200f42000-01-18 17:53:27 +0000100DEPPROFILED_LIBUUID = $(LIB)/libuuid@PROFILED_LIB_EXT@
Theodore Ts'occe2f492006-10-01 22:18:08 -0400101DEPPROFILED_LIBBLKID = $(LIB)/libblkid@PROFILED_LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000102
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000103# An include directive pointing to a directory holding enough linux-like
104# include files to satisfy some programs here
105LINUX_INCLUDE=@LINUX_INCLUDE@
106
107#
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000108# A fast substitution command for fixing up man pages, shell scripts, etc.
109#
Theodore Ts'o44339bd1997-10-15 02:47:20 +0000110SUBST_CONF=$(top_builddir)/util/subst.conf
111SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
Theodore Ts'odd607052004-04-03 13:53:46 -0500112SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
Theodore Ts'o44339bd1997-10-15 02:47:20 +0000113DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000114
Theodore Ts'oef8901b1999-07-03 04:55:36 +0000115$(top_builddir)/util/subst:
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000116 cd $(top_builddir)/util ; $(MAKE) subst
Theodore Ts'oef8901b1999-07-03 04:55:36 +0000117
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000118#
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000119# Warning flags
120#
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000121# Run make gcc-wall to do a build with warning messages.
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000122#
123#
Theodore Ts'o19c000e2006-11-14 23:40:19 -0500124WFLAGS= -std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
125 -pedantic $(WFLAGS_EXTRA) \
Theodore Ts'o032a7632003-11-26 23:18:56 -0500126 -Wall -W -Wwrite-strings -Wpointer-arith \
Theodore Ts'o19c000e2006-11-14 23:40:19 -0500127 -Wcast-qual -Wcast-align -Wno-variadic-macros \
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000128 -Wstrict-prototypes -Wmissing-prototypes \
Theodore Ts'o48e6e812003-07-06 00:36:48 -0400129 -Wformat-security -Wformat-nonliteral \
Theodore Ts'o19c000e2006-11-14 23:40:19 -0500130 -Wmissing-format-attribute -O2 -Wstrict-aliasing \
Theodore Ts'o032a7632003-11-26 23:18:56 -0500131 -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
132 -UENABLE_NLS
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000133
Theodore Ts'oc8c071a2001-01-11 16:08:23 +0000134gcc-wall-new:
135 (make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
136
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000137gcc-wall:
138 make clean > /dev/null
Theodore Ts'oc8c071a2001-01-11 16:08:23 +0000139 make gcc-wall-new
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000140
141#
142# Installation user and groups
143#
144BINGRP= bin
145BINOWN= bin
146BINMODE= 555
147INCGRP= bin
148INCOWN= bin
149INCMODE= 444
150LIBOWN= bin
151LIBGRP= bin
152LIBMODE= 444
153MANGRP= bin
154MANOWN= bin
155MANMODE= 444
156
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000157#
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000158# Autoconf magic...
159#
160
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000161DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.elf-lib \
Theodore Ts'o2b5901d2004-11-19 17:06:47 -0500162 $(top_srcdir)/lib/Makefile.bsd-lib $(top_srcdir)/lib/Makefile.darwin-lib \
163 $(top_srcdir)/lib/Makefile.solaris-lib $(top_srcdir)/lib/Makefile.checker \
164 $(top_srcdir)/lib/Makefile.profile
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000165
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000166$(top_builddir)/config.status: $(top_srcdir)/configure
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000167 cd $(top_builddir); ./config.status --recheck
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000168
169$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000170 cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000171
172$(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
173 $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000174 cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000175
Theodore Ts'obf2602b1998-03-30 01:11:44 +0000176$(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
177 $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000178 cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
Theodore Ts'obf2602b1998-03-30 01:11:44 +0000179
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000180Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000181 $(DEP_MAKEFILE) $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000182 cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000183
Theodore Ts'o98919bd2005-02-04 10:43:58 -0500184@MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.in
185@MAINTAINER_CMT@ cd $(top_srcdir) && autoconf
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000186
187#
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000188# Make depend magic...
189#
190
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000191.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000192 if test -n "$(SRCS)" ; then \
Theodore Ts'o74becf31997-04-26 14:37:06 +0000193 $(CC) -M $(ALL_CFLAGS) $(SRCS) | \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000194 $(SED) -f $(top_srcdir)/depfix.sed \
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000195 -e 's; $(srcdir)/; $$(srcdir)/;g' \
196 -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
197 -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
198 -e 's; \./; ;g' \
Theodore Ts'o6d402272004-12-14 21:46:26 -0500199 -e '/^#/d' \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000200 -e '/^ *\\$$/d' | \
201 $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000202 else :; fi
203
204depend:: .depend
205 if test -n "$(SRCS)" ; then \
206 sed -e '/^# +++ Dependency line eater +++/,$$d' \
207 < $(srcdir)/Makefile.in | cat - .depend \
208 > $(srcdir)/Makefile.in.new; \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000209 if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
210 $(RM) $(srcdir)/Makefile.in.new ; \
211 else \
212 $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
213 $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
214 fi ; else :; fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000215
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000216# End of file MCONFIG