blob: 0e9fc6527e5171cba3352302264df8abdf7d14a3 [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'oa4b2d3c1998-04-03 16:12:25 +000017bindir = @bindir@
18sbindir = @sbindir@
19libdir = @libdir@
Theodore Ts'ob5ffead2002-05-11 19:17:00 -040020datadir= @datadir@
Theodore Ts'oa04eba32003-05-03 16:35:17 -040021localedir = $(datadir)/locale
Theodore Ts'ob5ffead2002-05-11 19:17:00 -040022root_sysconfdir= @root_sysconfdir@
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000023includedir = @includedir@
24mandir = @mandir@
Theodore Ts'oa4bf69d1999-05-29 21:53:30 +000025man1dir = $(mandir)/man1
26man3dir = $(mandir)/man3
27man8dir = $(mandir)/man8
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +000028infodir = @infodir@
29datadir = @datadir@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000030
31@SET_MAKE@
32
33INSTALL_PROGRAM = @INSTALL_PROGRAM@
34INSTALL_DATA = @INSTALL_DATA@
35CC = @CC@
Theodore Ts'o6c133521999-07-03 20:37:03 +000036BUILD_CC = @BUILD_CC@
Theodore Ts'oa04eba32003-05-03 16:35:17 -040037DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
Theodore Ts'o74becf31997-04-26 14:37:06 +000038CFLAGS = @CFLAGS@
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +000039CPPFLAGS = @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) \
Theodore Ts'oc6f35b82003-05-17 16:29:27 -040042 $(INTL_FLAGS) -I$(top_builddir)/lib -I$(top_srcdir)/lib \
43 $(LINUX_INCLUDE)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000044LDFLAGS = @LDFLAGS@
Theodore Ts'o74becf31997-04-26 14:37:06 +000045ALL_LDFLAGS = $(LDFLAGS)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000046RM = @RM@
47LN = @LN@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000048LN_S = @LN_S@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000049MV = @MV@
50CP = @CP@
51CHMOD = @CHMOD@
52AR = @AR@
53AWK = @AWK@
54SED = @SED@
Theodore Ts'o9d564f71999-07-03 20:25:58 +000055PERL = @PERL@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000056RANLIB = @RANLIB@
57STRIP = @STRIP@
58LD = $(PURE) @CC@
59ARUPD = $(AR) r
Theodore Ts'o250f79f2001-05-19 22:02:22 +000060LDCONFIG = @LDCONFIG@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000061
62#
Theodore Ts'oa4d09611997-04-29 14:28:00 +000063# Library definitions
64#
65LIB = $(top_builddir)/lib
66LIBSS = $(LIB)/libss@LIB_EXT@
67LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
68LIBE2P = $(LIB)/libe2p@LIB_EXT@
69LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000070LIBUUID = $(LIB)/libuuid@LIB_EXT@ @SOCKET_LIB@
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050071LIBBLKID = $(LIB)/libblkid@LIB_EXT@
Theodore Ts'oa04eba32003-05-03 16:35:17 -040072LIBINTL = @LIBINTL@
Theodore Ts'o77200f42000-01-18 17:53:27 +000073DEPLIBUUID = $(LIB)/libuuid@LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +000074
75STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
76STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
77STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
78STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000079STATIC_LIBUUID = $(LIB)/libuuid@STATIC_LIB_EXT@ @SOCKET_LIB@
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050080STATIC_LIBBLKID = $(LIB)/libblkid@STATIC_LIB_EXT@
Theodore Ts'o77200f42000-01-18 17:53:27 +000081DEPSTATIC_LIBUUID = $(LIB)/libuuid@STATIC_LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +000082
83PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
84PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
85PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
86PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000087PROFILED_LIBUUID = $(LIB)/libuuid@PROFILED_LIB_EXT@ @SOCKET_LIB@
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050088PROFILED_LIBBLKID = $(LIB)/libblkid@PROFILED_LIB_EXT@
Theodore Ts'o77200f42000-01-18 17:53:27 +000089DEPPROFILED_LIBUUID = $(LIB)/libuuid@PROFILED_LIB_EXT@
Theodore Ts'oa4d09611997-04-29 14:28:00 +000090
91#
Theodore Ts'o50e1e101997-04-26 13:58:21 +000092# Use these definitions is you use tools 2.x, x < 16
93#
94#DLL_BIN=/usr/dll/bin
95#JUMP_PREFIX=/usr/dll/jump/
96
97#
98# Use these definitions if you use tools 2.16 or above
99#
100DLL_BIN=/usr/bin
101JUMP_PREFIX=/usr/bin/jump
102
103# 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'o48e6e812003-07-06 00:36:48 -0400124WFLAGS= -ansi -D_POSIX_SOURCE -pedantic $(WFLAGS_EXTRA) \
Theodore Ts'o032a7632003-11-26 23:18:56 -0500125 -Wall -W -Wwrite-strings -Wpointer-arith \
Theodore Ts'o48e6e812003-07-06 00:36:48 -0400126 -Wcast-qual -Wcast-align \
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000127 -Wstrict-prototypes -Wmissing-prototypes \
Theodore Ts'o48e6e812003-07-06 00:36:48 -0400128 -Wformat-security -Wformat-nonliteral \
129 -Wmissing-format-attribute \
Theodore Ts'o032a7632003-11-26 23:18:56 -0500130 -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
131 -UENABLE_NLS
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000132
Theodore Ts'oc8c071a2001-01-11 16:08:23 +0000133gcc-wall-new:
134 (make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
135
Theodore Ts'o4d0f3e12001-01-11 15:48:50 +0000136gcc-wall:
137 make clean > /dev/null
Theodore Ts'oc8c071a2001-01-11 16:08:23 +0000138 make gcc-wall-new
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000139
140#
141# Installation user and groups
142#
143BINGRP= bin
144BINOWN= bin
145BINMODE= 555
146INCGRP= bin
147INCOWN= bin
148INCMODE= 444
149LIBOWN= bin
150LIBGRP= bin
151LIBMODE= 444
152MANGRP= bin
153MANOWN= bin
154MANMODE= 444
155
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000156#
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000157# Autoconf magic...
158#
159
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000160DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.elf-lib \
161 $(top_srcdir)/lib/Makefile.dll-lib $(top_srcdir)/lib/Makefile.bsd-lib \
162 $(top_srcdir)/lib/Makefile.checker $(top_srcdir)/lib/Makefile.profile
163
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000164$(top_builddir)/config.status: $(top_srcdir)/configure
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000165 cd $(top_builddir); ./config.status --recheck
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000166
167$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000168 cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000169
170$(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
171 $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000172 cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000173
Theodore Ts'obf2602b1998-03-30 01:11:44 +0000174$(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
175 $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000176 cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
Theodore Ts'obf2602b1998-03-30 01:11:44 +0000177
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000178Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
Theodore Ts'oa4b2d3c1998-04-03 16:12:25 +0000179 $(DEP_MAKEFILE) $(top_builddir)/config.status
Theodore Ts'oe8aed8c2000-04-03 03:18:59 +0000180 cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000181
182$(top_srcdir)/configure: $(top_srcdir)/configure.in
183 cd $(top_srcdir) && autoconf
184
185#
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000186# Make depend magic...
187#
188
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000189.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000190 if test -n "$(SRCS)" ; then \
Theodore Ts'o74becf31997-04-26 14:37:06 +0000191 $(CC) -M $(ALL_CFLAGS) $(SRCS) | \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000192 $(SED) -f $(top_srcdir)/depfix.sed \
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +0000193 -e 's; $(srcdir)/; $$(srcdir)/;g' \
194 -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
195 -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
196 -e 's; \./; ;g' \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000197 -e '/^ *\\$$/d' | \
198 $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000199 else :; fi
200
201depend:: .depend
202 if test -n "$(SRCS)" ; then \
203 sed -e '/^# +++ Dependency line eater +++/,$$d' \
204 < $(srcdir)/Makefile.in | cat - .depend \
205 > $(srcdir)/Makefile.in.new; \
Theodore Ts'o9d564f71999-07-03 20:25:58 +0000206 if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
207 $(RM) $(srcdir)/Makefile.in.new ; \
208 else \
209 $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
210 $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
211 fi ; else :; fi
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000212
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000213# End of file MCONFIG