]> code.delx.au - gnu-emacs/blob - lwlib/Makefile.in
Small Makefile cleanup mainly related to tags file generation
[gnu-emacs] / lwlib / Makefile.in
1 ### @configure_input@
2
3 # Copyright (C) 1992, 1993 Lucid, Inc.
4 # Copyright (C) 1994, 2001-2013 Free Software Foundation, Inc.
5 #
6 # This file is part of the Lucid Widget Library.
7 #
8 # The Lucid Widget Library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 1, or (at your option)
11 # any later version.
12 #
13 # The Lucid Widget Library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20
21
22 # This was taken from the output of Imake using Lucid's Imakefile.
23 # and set up to be configured by ../configure.
24
25 srcdir=@srcdir@
26 abs_srcdir=@abs_srcdir@
27 # MinGW CPPFLAGS may use this.
28 abs_top_srcdir=@abs_top_srcdir@
29 VPATH=@srcdir@
30 @SET_MAKE@
31 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
32 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
33 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
34 PROFILING_CFLAGS = @PROFILING_CFLAGS@
35 WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'`
36 WERROR_CFLAGS = @WERROR_CFLAGS@
37
38 CC=@CC@
39 CFLAGS=@CFLAGS@
40 CPPFLAGS=@CPPFLAGS@
41 RANLIB=@RANLIB@
42
43 AR = @AR@
44 ARFLAGS = @ARFLAGS@
45
46 LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
47 MOTIF_OBJS = lwlib-Xm.o
48
49 ## LUCID_OBJS or MOTIF_OBJS.
50 TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
51
52 OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
53
54 ## ../src is where the generated file (config.h, globals.h) are.
55 ## $(srcdir)/../src is where the non-generated files (lisp.h) are.
56 ## (In an out-of-tree build, these two are not the same.)
57 ## $(srcdir) is where the lwlib sources are.
58 ## There are no generated lwlib files, hence no need for -I.
59 ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
60 $(C_SWITCH_MACHINE) \
61 $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
62 -Demacs -I../src \
63 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
64
65 all: liblw.a
66 .PHONY: all
67
68 .c.o:
69 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
70
71 liblw.a: $(OBJS)
72 rm -f $@
73 $(AR) $(ARFLAGS) $@ $(OBJS)
74 $(RANLIB) $@
75
76 ## Generated files in ../src, non-generated in $(srcdir)/../src.
77 config_h = ../src/config.h $(srcdir)/../src/conf_post.h
78 lisp_h = $(srcdir)/../src/lisp.h
79 ## lisp.h includes this.
80 globals_h = ../src/globals.h
81 src_h = $(config_h) $(lisp_h) $(globals_h)
82
83 $(globals_h):
84 cd ../src && $(MAKE) $(MFLAGS) globals.h
85
86 lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
87 lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
88 lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
89 lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
90 lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
91 lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
92 xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
93 $(srcdir)/../src/xterm.h
94
95 mostlyclean:
96 rm -f *.o liblw.a \#*
97
98 clean: mostlyclean
99 distclean: clean
100 rm -f Makefile
101 maintainer-clean: distclean
102 rm -f TAGS
103
104
105 ETAGS = ../lib-src/etags
106
107 ## FIXME? Does etags need to use absolute filenames?
108 ## See comments in lisp/Makefile.in, src/Makefile.in.
109 ctagsfiles= *.[ch]
110
111 TAGS: $(srcdir)/$(ctagsfiles)
112 "$(ETAGS)" "$(abs_srcdir)"/$(ctagsfiles)
113 tags: TAGS
114 .PHONY: tags
115
116
117 ### Makefile.in ends here