Silence some variable set but not used warnings.
[sxemacs] / lib-src / 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 builddir = @builddir@
29 srcdir = @srcdir@
30 top_builddir = @top_builddir@
31 top_build_prefix = $(top_builddir)/
32 top_srcdir = @top_srcdir@
33 abs_top_builddir = @abs_top_builddir@
34 abs_top_srcdir = @abs_top_srcdir@
35
36 ETAGS = $(builddir)/etags
37 TAGS_DEPENDENCIES = $(ETAGS)
38
39 headerdir = $(includedir)/$(instvarsepdir)
40 archlibdir = ${libdir}/${instvardir}/${configuration}
41
42 sxesrcdir = $(top_srcdir)/src
43 bldsrcdir = $(top_builddir)/src
44 sxelispdir = $(abs_top_srcdir)/lisp
45 bldlispdir = $(abs_top_builddir)/lisp
46 sxelibsrcdir = $(top_srcdir)/lib-src
47 bldlibsrcdir = $(top_builddir)/lib-src
48
49 AM_CFLAGS =
50 AM_CPPFLAGS = -I$(sxesrcdir) $(c_switch_all)
51 AM_LDFLAGS = $(ld_switch_general) $(ld_libs_general)
52
53 REGEX_C = $(sxesrcdir)/regex.c $(sxesrcdir)/regex.h
54 REGEX_CF = -DINHIBIT_STRING_HEADER
55 ALLOCA_C = $(sxesrcdir)/alloca.c
56
57 ## stuff we create here
58 bin_PROGRAMS = gnuclient etags ctags2 ootags
59 archlib_PROGRAMS = gnuserv fakemail wakeup profile make-docfile \
60         sorted-doc movemail yow hexl mmencode
61 noinst_PROGRAMS = make-path make-dump-id
62
63 ## how do we create
64 gnuclient_SOURCES = gnuserv.h gnuslib.c gnuclient.c
65 gnuserv_SOURCES = gnuserv.h gnuslib.c gnuserv.c
66 fakemail_SOURCES = fakemail.c
67 wakeup_SOURCES = wakeup.c
68 profile_SOURCES = profile.c
69 make_docfile_SOURCES = make-docfile.c
70 sorted_doc_SOURCES = sorted-doc.c
71 yow_SOURCES = yow.c
72 hexl_SOURCES = hexl.c
73 mmencode_SOURCES = mmencode.c
74 make_dump_id_SOURCES = make-dump-id.c
75
76 make_path_SOURCES = make-path.c
77 make_path_CFLAGS = -Demacs
78
79 movemail_SOURCES = movemail.c pop.c pop.h $(REGEX_C)
80 movemail_CFLAGS = $(AM_CFLAGS) $(REGEX_CF)
81 movemail_CPPFLAGS = $(AM_CPPFLAGS)
82 if WITH_BDWGC
83 movemail_CPPFLAGS += $(BDWGC_CPPFLAGS)
84 movemail_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
85 endif
86
87 ctags2_SOURCES = $(REGEX_C) etags.c
88 EXTRA_ctags2_SOURCES = $(ALLOCA_C)
89 ctags2_CFLAGS = $(REGEX_CF) -DCTAGS
90 ctags2_LDADD =
91 if NEED_ALLOCA_C
92 ctags2_LDADD += $(ALLOCA_C)
93 endif
94 ctags2_CPPFLAGS = $(AM_CPPFLAGS)
95 if WITH_BDWGC
96 ctags2_CPPFLAGS += $(BDWGC_CPPFLAGS)
97 ctags2_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
98 endif
99 ctags2_DEPENDENCIES = $(ALLOCA)
100
101 etags_SOURCES = $(REGEX_C) etags.c
102 EXTRA_etags_SOURCES = $(ALLOCA_C)
103 etags_CFLAGS = $(REGEX_CF) -DETAGS -DEMACS_NAME="\"SXEmacs\""
104 etags_LDADD =
105 if NEED_ALLOCA_C
106 etags_LDADD += $(ALLOCA_C)
107 endif
108 etags_CPPFLAGS = $(AM_CPPFLAGS)
109 if WITH_BDWGC
110 etags_CPPFLAGS += $(BDWGC_CPPFLAGS)
111 etags_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
112 endif
113 etags_DEPENDENCIES = $(ALLOCA)
114
115 ootags_SOURCES = $(REGEX_C) ootags.c
116 ootags_CFLAGS = $(REGEX_CF) -DOOTAGS
117 ootags_CPPFLAGS = $(AM_CPPFLAGS)
118 if WITH_BDWGC
119 ootags_CPPFLAGS += $(BDWGC_CPPFLAGS)
120 ootags_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
121 endif
122
123 ## custom rules
124 RM = rm -f
125
126 stage1: $(bin_PROGRAMS) $(archlib_PROGRAMS)  \
127         $(archlib_SCRIPTS) $(noinst_PROGRAMS) $(dist_archlib_DATA)
128         @touch $@
129
130 stage2: stage1 ##DOC
131         @touch $@
132
133 ### dont use staged build
134 ##all: stage1 stage2
135
136 CLEANFILES = core* stage1 stage2
137
138 install-exec-hook:
139         cd $(DESTDIR)$(bindir) && \
140         mv -f ctags2 ctags
141
142 uninstall-hook:
143         cd $(DESTDIR)$(bindir) && \
144         $(RM) ctags
145
146 #
147 # Help the SXEmacs developers get nice post-processed source files
148
149 ## Create preprocessor output (debugging purposes only)
150 .c.i:
151         $(COMPILE) -E -o $@ $<
152
153 ## Create assembler output (debugging purposes only)
154 .c.s:
155         $(COMPILE) -S -c $(cflags) $<