Merge from trunk.
[bpt/emacs.git] / lwlib / Makefile.in
CommitLineData
4ad9cddc 1# Copyright (C) 1992, 1993 Lucid, Inc.
acaf905b 2# Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
695e5b41 3#
4ad9cddc 4# This file is part of the Lucid Widget Library.
695e5b41 5#
4ad9cddc
GM
6# The Lucid Widget Library is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 1, or (at your option)
9# any later version.
695e5b41 10#
4ad9cddc
GM
11# The Lucid Widget Library is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
695e5b41 15#
4ad9cddc
GM
16# You should have received a copy of the GNU General Public License
17# along with GNU Emacs; see the file COPYING. If not, write to
18# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19# Boston, MA 02110-1301, USA.
20
21
22# This was taken from the output of Imake using Lucid's Imakefile.
ddd6d613 23# and set up to be configured by ../configure.
07bf635f 24
ec171d2e
RS
25srcdir=@srcdir@
26VPATH=@srcdir@
7bd04bb4 27@SET_MAKE@
ec171d2e 28C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
ed6281b0 29C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
e9bcdbf7
GM
30C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
31C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
e6cfa7c3 32PROFILING_CFLAGS = @PROFILING_CFLAGS@
b8df54ff
PE
33WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'`
34WERROR_CFLAGS = @WERROR_CFLAGS@
07bf635f 35
ec171d2e
RS
36CC=@CC@
37CFLAGS=@CFLAGS@
93a16fa8 38CPPFLAGS=@CPPFLAGS@
a6578b63 39RANLIB=@RANLIB@
07bf635f 40
e3cf0cde 41AR = ar cq
07bf635f 42
e3cf0cde
GM
43LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
44MOTIF_OBJS = lwlib-Xm.o
07bf635f 45
8f45ebb8 46## LUCID_OBJS or MOTIF_OBJS.
e3cf0cde 47TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
ec171d2e 48
e3cf0cde 49OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
07bf635f 50
8f45ebb8
GM
51## ../src is where the generated file (config.h, globals.h) are.
52## $(srcdir)/../src is where the non-generated files (lisp.h) are.
53## (In an out-of-tree build, these two are not the same.)
54## $(srcdir) is where the lwlib sources are.
55## There are no generated lwlib files, hence no need for -I.
77ccee09 56ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
e6cfa7c3 57 $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \
b8df54ff
PE
58 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
59 $(PROFILING_CFLAGS) $(CFLAGS) \
695e5b41 60 -DHAVE_CONFIG_H -Demacs -I../src \
bc11a394 61 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
07bf635f
RS
62
63.c.o:
eb5141d9 64 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
07bf635f
RS
65
66all:: liblw.a
67
68liblw.a: $(OBJS)
8f45ebb8 69 rm -f $@
07bf635f 70 $(AR) $@ $(OBJS)
7397acc4 71 $(RANLIB) $@
07bf635f 72
8f45ebb8
GM
73## Generated files in ../src, non-generated in $(srcdir)/../src.
74config_h = ../src/config.h
75lisp_h = $(srcdir)/../src/lisp.h
7bd04bb4 76## lisp.h includes this.
8f45ebb8
GM
77globals_h = ../src/globals.h
78src_h = $(config_h) $(lisp_h) $(globals_h)
7bd04bb4 79
8f45ebb8
GM
80$(globals_h):
81 cd ../src && $(MAKE) $(MFLAGS) globals.h
7bd04bb4 82
8f45ebb8
GM
83lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
84lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
85 lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
86lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
87lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
88lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
89xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
90 $(srcdir)/../src/xterm.h
07bf635f 91
ec171d2e 92mostlyclean:
8f45ebb8 93 rm -f *.o liblw.a \#*
07bf635f 94
ec171d2e
RS
95clean: mostlyclean
96distclean: clean
8f45ebb8 97 rm -f Makefile
26873b72 98maintainer-clean: distclean
8f45ebb8 99 rm -f TAGS
07bf635f 100
9009ad55 101TAGS:
9040fe8b 102 ../lib-src/etags $(srcdir)/*.[ch]
6180d6be
RS
103tags: TAGS
104.PHONY: tags