2013-07-23 22:57:17 +00:00
|
|
|
### @configure_input@
|
|
|
|
|
2007-02-27 03:06:23 +00:00
|
|
|
# Copyright (C) 1992, 1993 Lucid, Inc.
|
2014-01-01 07:43:34 +00:00
|
|
|
# Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
|
2011-06-06 18:26:04 +00:00
|
|
|
#
|
2007-02-27 03:06:23 +00:00
|
|
|
# This file is part of the Lucid Widget Library.
|
2011-06-06 18:26:04 +00:00
|
|
|
#
|
2007-02-27 03:06:23 +00:00
|
|
|
# The Lucid Widget Library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 1, or (at your option)
|
|
|
|
# any later version.
|
2011-06-06 18:26:04 +00:00
|
|
|
#
|
2007-02-27 03:06:23 +00:00
|
|
|
# The Lucid Widget Library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2011-06-06 18:26:04 +00:00
|
|
|
#
|
2007-02-27 03:06:23 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2012-12-31 15:34:32 +00:00
|
|
|
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
2007-02-27 03:06:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
# This was taken from the output of Imake using Lucid's Imakefile.
|
1994-01-21 16:22:40 +00:00
|
|
|
# and set up to be configured by ../configure.
|
1994-01-18 23:47:41 +00:00
|
|
|
|
1994-01-19 17:21:49 +00:00
|
|
|
srcdir=@srcdir@
|
2013-10-24 04:05:54 +00:00
|
|
|
# MinGW CPPFLAGS may use this.
|
|
|
|
abs_top_srcdir=@abs_top_srcdir@
|
1994-01-19 17:21:49 +00:00
|
|
|
VPATH=@srcdir@
|
2011-02-09 03:25:07 +00:00
|
|
|
@SET_MAKE@
|
1994-01-19 17:21:49 +00:00
|
|
|
C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
|
2010-05-04 03:20:50 +00:00
|
|
|
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
|
|
|
|
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
|
Properly handle C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS
* configure.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
(PROFILING_LDFLAGS): Substitute, don't add them to CFLAGS/LDFLAGS.
(C_OPTIMIZE_SWITCH): Remove.
(TEMACS_LDFLAGS2): Add ${PROFILING_LDFLAGS}.
* lib-src/Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
(PROFILING_LDFLAGS): Set from substitution.
(BASE_CFLAGS): Add ${C_WARNINGS_SWITCH}.
(ALL_CFLAGS, CPP_CFLAGS): Add ${PROFILING_CFLAGS}.
(LINK_CFLAGS): Add ${PROFILING_LDFLAGS}.
* lwlib/Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
substitution.
(ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
* oldXMenu/Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
substitution.
(ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
* src/Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
(PROFILING_LDFLAGS): Set from substitution.
(ALL_CFLAGS): Add C_WARNINGS_SWITCH and PROFILING_CFLAGS, put
CFLAGS last.
2010-07-12 14:16:38 +00:00
|
|
|
PROFILING_CFLAGS = @PROFILING_CFLAGS@
|
configure: new option --enable-gcc-warnings
I have been using this change for many months in my private copy
of Emacs, and have used it to find several bugs. It's mature
enough to publish now.
* Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
* configure.in: Support --enable-gcc-warnings, in the style of
other GNU packages such as coreutils.
(C_WARNINGS_SWITCH): Remove, replacing with...
(WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
(PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
when including system files with GCC.
* etc/NEWS: Mention --enable-gcc-warnings.
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
* lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(BASE_CFLAGS): Use new macros rather than old.
* lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
* src/regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
-Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
-Wunused-result, -Wunused-variable. This should go away once
the Emacs and Gnulib regex code is merged.
(xmalloc, xrealloc): Now static.
2012-04-09 07:45:59 +00:00
|
|
|
WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'`
|
|
|
|
WERROR_CFLAGS = @WERROR_CFLAGS@
|
1994-01-18 23:47:41 +00:00
|
|
|
|
1994-01-19 17:21:49 +00:00
|
|
|
CC=@CC@
|
|
|
|
CFLAGS=@CFLAGS@
|
2003-04-30 00:02:23 +00:00
|
|
|
CPPFLAGS=@CPPFLAGS@
|
1995-08-16 14:20:19 +00:00
|
|
|
RANLIB=@RANLIB@
|
1994-01-18 23:47:41 +00:00
|
|
|
|
2012-10-06 00:42:28 +00:00
|
|
|
AR = @AR@
|
|
|
|
ARFLAGS = @ARFLAGS@
|
1994-01-18 23:47:41 +00:00
|
|
|
|
Remove some unused Makefile.in variables.
* configure.in (AC_PROG_LN_S): Remove test, nothing uses @LN_S@.
* Makefile.in (CPP, C_SWITCH_SYSTEM, ALLOCA, LN_S, C_SWITCH_X_SITE)
(LD_SWITCH_X_SITE): Remove unused variables.
* lwlib/Makefile.in (CPP, LN_S, TOP, LN): Remove unused variables.
* oldXMenu/Makefile.in (CPP, LN_S, AS, LD, MV, LS, LINTOPTS, LINTLIBFLAG, MAKE)
(STD_DEFINES, CDEBUGFLAGS, RM_CMD): Remove unused variables.
* src/Makefile.in (CPP, LN_S): Remove unused variables.
* msdos/sed1v2.inp, msdos/sed5x.inp: Remove LN_S, unused.
2010-05-06 07:24:18 +00:00
|
|
|
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
|
|
|
|
MOTIF_OBJS = lwlib-Xm.o
|
1994-01-18 23:47:41 +00:00
|
|
|
|
2011-02-11 03:41:17 +00:00
|
|
|
## LUCID_OBJS or MOTIF_OBJS.
|
Remove some unused Makefile.in variables.
* configure.in (AC_PROG_LN_S): Remove test, nothing uses @LN_S@.
* Makefile.in (CPP, C_SWITCH_SYSTEM, ALLOCA, LN_S, C_SWITCH_X_SITE)
(LD_SWITCH_X_SITE): Remove unused variables.
* lwlib/Makefile.in (CPP, LN_S, TOP, LN): Remove unused variables.
* oldXMenu/Makefile.in (CPP, LN_S, AS, LD, MV, LS, LINTOPTS, LINTLIBFLAG, MAKE)
(STD_DEFINES, CDEBUGFLAGS, RM_CMD): Remove unused variables.
* src/Makefile.in (CPP, LN_S): Remove unused variables.
* msdos/sed1v2.inp, msdos/sed5x.inp: Remove LN_S, unused.
2010-05-06 07:24:18 +00:00
|
|
|
TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
|
1994-01-19 17:21:49 +00:00
|
|
|
|
Remove some unused Makefile.in variables.
* configure.in (AC_PROG_LN_S): Remove test, nothing uses @LN_S@.
* Makefile.in (CPP, C_SWITCH_SYSTEM, ALLOCA, LN_S, C_SWITCH_X_SITE)
(LD_SWITCH_X_SITE): Remove unused variables.
* lwlib/Makefile.in (CPP, LN_S, TOP, LN): Remove unused variables.
* oldXMenu/Makefile.in (CPP, LN_S, AS, LD, MV, LS, LINTOPTS, LINTLIBFLAG, MAKE)
(STD_DEFINES, CDEBUGFLAGS, RM_CMD): Remove unused variables.
* src/Makefile.in (CPP, LN_S): Remove unused variables.
* msdos/sed1v2.inp, msdos/sed5x.inp: Remove LN_S, unused.
2010-05-06 07:24:18 +00:00
|
|
|
OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
|
1994-01-18 23:47:41 +00:00
|
|
|
|
2011-02-11 03:41:17 +00:00
|
|
|
## ../src is where the generated file (config.h, globals.h) are.
|
|
|
|
## $(srcdir)/../src is where the non-generated files (lisp.h) are.
|
|
|
|
## (In an out-of-tree build, these two are not the same.)
|
|
|
|
## $(srcdir) is where the lwlib sources are.
|
|
|
|
## There are no generated lwlib files, hence no need for -I.
|
2008-07-23 06:26:32 +00:00
|
|
|
ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
|
2012-04-11 01:25:51 +00:00
|
|
|
$(C_SWITCH_MACHINE) \
|
2012-04-14 04:37:44 +00:00
|
|
|
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
|
2012-06-26 01:05:39 +00:00
|
|
|
-Demacs -I../src \
|
2011-06-27 03:00:16 +00:00
|
|
|
-I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
|
1994-01-18 23:47:41 +00:00
|
|
|
|
2013-09-04 06:45:44 +00:00
|
|
|
all: liblw.a
|
|
|
|
.PHONY: all
|
|
|
|
|
1994-01-18 23:47:41 +00:00
|
|
|
.c.o:
|
2011-02-11 03:30:09 +00:00
|
|
|
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
1994-01-18 23:47:41 +00:00
|
|
|
|
|
|
|
liblw.a: $(OBJS)
|
2011-02-11 03:41:17 +00:00
|
|
|
rm -f $@
|
2012-10-06 00:42:28 +00:00
|
|
|
$(AR) $(ARFLAGS) $@ $(OBJS)
|
2000-03-08 19:10:01 +00:00
|
|
|
$(RANLIB) $@
|
1994-01-18 23:47:41 +00:00
|
|
|
|
2011-02-11 03:41:17 +00:00
|
|
|
## Generated files in ../src, non-generated in $(srcdir)/../src.
|
2012-08-01 17:55:15 +00:00
|
|
|
config_h = ../src/config.h $(srcdir)/../src/conf_post.h
|
2011-02-11 03:41:17 +00:00
|
|
|
lisp_h = $(srcdir)/../src/lisp.h
|
2011-02-09 03:25:07 +00:00
|
|
|
## lisp.h includes this.
|
2011-02-11 03:41:17 +00:00
|
|
|
globals_h = ../src/globals.h
|
|
|
|
src_h = $(config_h) $(lisp_h) $(globals_h)
|
2011-02-09 03:25:07 +00:00
|
|
|
|
2011-02-11 03:41:17 +00:00
|
|
|
$(globals_h):
|
|
|
|
cd ../src && $(MAKE) $(MFLAGS) globals.h
|
2011-02-09 03:25:07 +00:00
|
|
|
|
2011-02-11 03:41:17 +00:00
|
|
|
lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
|
|
|
|
lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
|
|
|
|
lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
|
|
|
|
lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
|
|
|
|
lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
|
|
|
|
lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
|
|
|
|
xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
|
|
|
|
$(srcdir)/../src/xterm.h
|
1994-01-18 23:47:41 +00:00
|
|
|
|
1994-01-19 17:21:49 +00:00
|
|
|
mostlyclean:
|
2011-02-11 03:41:17 +00:00
|
|
|
rm -f *.o liblw.a \#*
|
1994-01-18 23:47:41 +00:00
|
|
|
|
1994-01-19 17:21:49 +00:00
|
|
|
clean: mostlyclean
|
|
|
|
distclean: clean
|
2011-02-11 03:41:17 +00:00
|
|
|
rm -f Makefile
|
1995-02-07 23:55:01 +00:00
|
|
|
maintainer-clean: distclean
|
2011-02-11 03:41:17 +00:00
|
|
|
rm -f TAGS
|
1994-01-18 23:47:41 +00:00
|
|
|
|
Small Makefile cleanup mainly related to tags file generation
* src/Makefile.in (abs_srcdir): New, set by configure.
(maintainer-clean): Remove pointless echo. That should be in the
top-level Makefile, if anywhere. Delete TAGS-LISP.
(extraclean): No s/ and m/ directories for some time.
(TAGS): Remove no-longer-defined S_FILE.
Pass absolute filenames to etags once more.
(TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
* lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line.
Remove all *loaddefs files, not just the first. Remove esh-groups.
(maintainer-clean): Delete TAGS, TAGS-LISP.
* lwlib/Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again.
2013-11-02 19:18:50 +00:00
|
|
|
|
|
|
|
ETAGS = ../lib-src/etags
|
|
|
|
|
2013-11-02 19:41:33 +00:00
|
|
|
ctagsfiles= $(srcdir)/*.[ch]
|
Small Makefile cleanup mainly related to tags file generation
* src/Makefile.in (abs_srcdir): New, set by configure.
(maintainer-clean): Remove pointless echo. That should be in the
top-level Makefile, if anywhere. Delete TAGS-LISP.
(extraclean): No s/ and m/ directories for some time.
(TAGS): Remove no-longer-defined S_FILE.
Pass absolute filenames to etags once more.
(TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
* lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line.
Remove all *loaddefs files, not just the first. Remove esh-groups.
(maintainer-clean): Delete TAGS, TAGS-LISP.
* lwlib/Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again.
2013-11-02 19:18:50 +00:00
|
|
|
|
2013-11-02 19:41:33 +00:00
|
|
|
TAGS: $(ctagsfiles)
|
|
|
|
"$(ETAGS)" $(ctagsfiles)
|
1996-03-29 14:52:56 +00:00
|
|
|
tags: TAGS
|
|
|
|
.PHONY: tags
|
Small Makefile cleanup mainly related to tags file generation
* src/Makefile.in (abs_srcdir): New, set by configure.
(maintainer-clean): Remove pointless echo. That should be in the
top-level Makefile, if anywhere. Delete TAGS-LISP.
(extraclean): No s/ and m/ directories for some time.
(TAGS): Remove no-longer-defined S_FILE.
Pass absolute filenames to etags once more.
(TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
* lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line.
Remove all *loaddefs files, not just the first. Remove esh-groups.
(maintainer-clean): Delete TAGS, TAGS-LISP.
* lwlib/Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again.
2013-11-02 19:18:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Makefile.in ends here
|