Merge remote-tracking branch 'origin/master' into for-steve
[sxemacs] / src / ui / lwlib / Makefile.am
1 ## SXEmacs Makefile.am
2
3 ## Copyright (C) 2007 Steve Youngs.
4
5 ## This file is part of SXEmacs.
6
7 ## SXEmacs is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
11
12 ## SXEmacs is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ## GNU General Public License for more details.
16
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 ## Process this file with automake to produce Makefile.in
21
22 # Help the Developers and yourself. Just use the C locale and settings
23 # for the compilation. They can still be overriden by make LANG=<whatever>
24 # but that is general a not very good idea
25 LANG=C
26 LC_ALL=C
27
28 top_build_prefix = $(top_builddir)/
29 sxesrcdir = $(top_srcdir)/src
30
31 AM_CFLAGS = -DXTSTRINGDEFINES
32 AM_CPPFLAGS = -I$(sxesrcdir) $(c_switch_all)
33 AM_LDFLAGS = $(ld_switch_all)
34
35 ETAGS = $(top_builddir)/lib-src/etags
36 TAGS_DEPENDENCIES = $(ETAGS)
37
38 REGEX_C = $(sxesrcdir)/regex.c $(sxesrcdir)/regex.h
39 REGEX_CF = -DINHIBIT_STRING_HEADER
40 ALLOCA_C = $(sxesrcdir)/alloca.c
41 GETOPT_C = getopt.c getopt1.c getopt.h
42
43 ## stuff we create here
44 lib_LTLIBRARIES = libsxelw-Xt.la
45 libsxelw_Xt_la_SOURCES = lwlib-internal.h lwlib.h lwlib-utils.h \
46         lwlib.c lwlib-utils.c lwlib-config.c
47 EXTRA_libsxelw_Xt_la_SOURCES = \
48         lwlib-Xaw.h lwlib-Xaw.c \
49         lwlib-Xlw.h lwlib-Xlw.c \
50         lwlib-Xm.h lwlib-Xm.c \
51         xlwmenu.h xlwmenuP.h xlwmenu.c \
52         xlwscrollbar.h xlwscrollbarP.h xlwscrollbar.c \
53         xlwtabs.h xlwtabsP.h xlwtabs.c \
54         xlwradio.h xlwradioP.h xlwradio.c \
55         xlwcheckbox.h xlwcheckboxP.h xlwcheckbox.c \
56         xlwgauge.h xlwgaugeP.h xlwgauge.c \
57         xlwgcs.h xlwgcs.c
58 libsxelw_Xt_la_DEPENDENCIES = $(lwlib_objs:.o=.lo)
59 libsxelw_Xt_la_LIBADD = $(lwlib_objs:.o=.lo) \
60         $(X_LIBS) $(ld_libs_window_system)
61 libsxelw_Xt_la_CPPFLAGS = $(AM_CPPFLAGS)
62 libsxelw_Xt_la_LDFLAGS = $(AM_LDFLAGS) $(lib_gcc) $(XCCLDFLAGS)
63 if WITH_BDWGC
64 libsxelw_Xt_la_CPPFLAGS += $(BDWGC_CPPFLAGS)
65 libsxelw_Xt_la_LDFLAGS += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
66 endif
67
68 CLEANFILES = core* stage1 stage2 $(lwlib_objs)
69
70 stage1: $(noinst_LIBRARIES)
71         @touch $@
72
73 stage2: stage1
74         @touch $@
75
76 all: stage1 stage2
77
78 #
79 # Help the SXEmacs developers get nice post-processed source files
80
81 ## Create preprocessor output (debugging purposes only)
82 .c.i:
83         $(COMPILE) -E -o $@ $<
84
85 ## Create assembler output (debugging purposes only)
86 .c.s:
87         $(COMPILE) -S -c $(cflags) $<