Commit | Line | Data |
---|---|---|
bbece175 GM |
1 | ### @configure_input@ |
2 | ||
4ad9cddc | 3 | # Copyright (C) 1992, 1993 Lucid, Inc. |
ab422c4d | 4 | # Copyright (C) 1994, 2001-2013 Free Software Foundation, Inc. |
695e5b41 | 5 | # |
4ad9cddc | 6 | # This file is part of the Lucid Widget Library. |
695e5b41 | 7 | # |
4ad9cddc GM |
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. | |
695e5b41 | 12 | # |
4ad9cddc GM |
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. | |
695e5b41 | 17 | # |
4ad9cddc | 18 | # You should have received a copy of the GNU General Public License |
fee0bd5f | 19 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
4ad9cddc GM |
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 | 25 | srcdir=@srcdir@ |
11e5e2eb GM |
26 | # MinGW CPPFLAGS may use this. |
27 | abs_top_srcdir=@abs_top_srcdir@ | |
ec171d2e | 28 | VPATH=@srcdir@ |
7bd04bb4 | 29 | @SET_MAKE@ |
ec171d2e | 30 | C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ |
e9bcdbf7 GM |
31 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ |
32 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | |
e6cfa7c3 | 33 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ |
b8df54ff PE |
34 | WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'` |
35 | WERROR_CFLAGS = @WERROR_CFLAGS@ | |
07bf635f | 36 | |
ec171d2e RS |
37 | CC=@CC@ |
38 | CFLAGS=@CFLAGS@ | |
93a16fa8 | 39 | CPPFLAGS=@CPPFLAGS@ |
a6578b63 | 40 | RANLIB=@RANLIB@ |
07bf635f | 41 | |
150798c5 UM |
42 | AR = @AR@ |
43 | ARFLAGS = @ARFLAGS@ | |
07bf635f | 44 | |
e3cf0cde GM |
45 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o |
46 | MOTIF_OBJS = lwlib-Xm.o | |
07bf635f | 47 | |
8f45ebb8 | 48 | ## LUCID_OBJS or MOTIF_OBJS. |
e3cf0cde | 49 | TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS) |
ec171d2e | 50 | |
e3cf0cde | 51 | OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o |
07bf635f | 52 | |
8f45ebb8 GM |
53 | ## ../src is where the generated file (config.h, globals.h) are. |
54 | ## $(srcdir)/../src is where the non-generated files (lisp.h) are. | |
55 | ## (In an out-of-tree build, these two are not the same.) | |
56 | ## $(srcdir) is where the lwlib sources are. | |
57 | ## There are no generated lwlib files, hence no need for -I. | |
77ccee09 | 58 | ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ |
2f097256 | 59 | $(C_SWITCH_MACHINE) \ |
bdf35b6a | 60 | $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \ |
cf38a720 | 61 | -Demacs -I../src \ |
bc11a394 | 62 | -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib |
07bf635f | 63 | |
224e313d PE |
64 | all: liblw.a |
65 | .PHONY: all | |
66 | ||
07bf635f | 67 | .c.o: |
eb5141d9 | 68 | $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
07bf635f | 69 | |
07bf635f | 70 | liblw.a: $(OBJS) |
8f45ebb8 | 71 | rm -f $@ |
150798c5 | 72 | $(AR) $(ARFLAGS) $@ $(OBJS) |
7397acc4 | 73 | $(RANLIB) $@ |
07bf635f | 74 | |
8f45ebb8 | 75 | ## Generated files in ../src, non-generated in $(srcdir)/../src. |
0f6cabdb | 76 | config_h = ../src/config.h $(srcdir)/../src/conf_post.h |
8f45ebb8 | 77 | lisp_h = $(srcdir)/../src/lisp.h |
7bd04bb4 | 78 | ## lisp.h includes this. |
8f45ebb8 GM |
79 | globals_h = ../src/globals.h |
80 | src_h = $(config_h) $(lisp_h) $(globals_h) | |
7bd04bb4 | 81 | |
8f45ebb8 GM |
82 | $(globals_h): |
83 | cd ../src && $(MAKE) $(MFLAGS) globals.h | |
7bd04bb4 | 84 | |
8f45ebb8 GM |
85 | lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h |
86 | lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \ | |
87 | lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h | |
88 | lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h | |
89 | lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h | |
90 | lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h | |
91 | xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \ | |
92 | $(srcdir)/../src/xterm.h | |
07bf635f | 93 | |
ec171d2e | 94 | mostlyclean: |
8f45ebb8 | 95 | rm -f *.o liblw.a \#* |
07bf635f | 96 | |
ec171d2e RS |
97 | clean: mostlyclean |
98 | distclean: clean | |
8f45ebb8 | 99 | rm -f Makefile |
26873b72 | 100 | maintainer-clean: distclean |
8f45ebb8 | 101 | rm -f TAGS |
07bf635f | 102 | |
b0b9e592 GM |
103 | |
104 | ETAGS = ../lib-src/etags | |
105 | ||
c617f3d0 | 106 | ctagsfiles= $(srcdir)/*.[ch] |
b0b9e592 | 107 | |
c617f3d0 GM |
108 | TAGS: $(ctagsfiles) |
109 | "$(ETAGS)" $(ctagsfiles) | |
6180d6be RS |
110 | tags: TAGS |
111 | .PHONY: tags | |
b0b9e592 GM |
112 | |
113 | ||
114 | ### Makefile.in ends here |