3 ## Copyright (C) 2007 Steve Youngs
5 ## This file is part of SXEmacs.
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.
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.
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/>.
20 ## Process this file with automake to produce Makefile.in
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
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@
36 ETAGS = $(builddir)/etags
37 TAGS_DEPENDENCIES = $(ETAGS)
39 headerdir = $(includedir)/$(instvarsepdir)
40 archlibdir = ${libdir}/${instvardir}/${configuration}
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
50 AM_CPPFLAGS = -I$(sxesrcdir) $(c_switch_all)
51 AM_LDFLAGS = $(ld_switch_general) $(ld_libs_general)
53 REGEX_C = $(sxesrcdir)/regex.c $(sxesrcdir)/regex.h
54 REGEX_CF = -DINHIBIT_STRING_HEADER
55 ALLOCA_C = $(sxesrcdir)/alloca.c
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 dist_bin_SCRIPTS = gnudoit rcs-checkin
62 dist_archlib_SCRIPTS = rcs2log vcdiff gzip-el.sh
63 noinst_PROGRAMS = make-path make-dump-id
64 dist_noinst_SCRIPTS = ad2c
67 gnuclient_SOURCES = gnuserv.h gnuslib.c gnuclient.c
68 gnuserv_SOURCES = gnuserv.h gnuslib.c gnuserv.c
69 fakemail_SOURCES = fakemail.c
70 wakeup_SOURCES = wakeup.c
71 profile_SOURCES = profile.c
72 make_docfile_SOURCES = make-docfile.c
73 sorted_doc_SOURCES = sorted-doc.c
76 mmencode_SOURCES = mmencode.c
77 make_dump_id_SOURCES = make-dump-id.c
79 make_path_SOURCES = make-path.c
80 make_path_CFLAGS = -Demacs
82 movemail_SOURCES = movemail.c pop.c pop.h $(REGEX_C)
83 movemail_CFLAGS = $(AM_CFLAGS) $(REGEX_CF)
84 movemail_CPPFLAGS = $(AM_CPPFLAGS)
86 movemail_CPPFLAGS += $(BDWGC_CPPFLAGS)
87 movemail_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
90 ctags2_SOURCES = $(REGEX_C) etags.c
91 EXTRA_ctags2_SOURCES = $(ALLOCA_C)
92 ctags2_CFLAGS = $(REGEX_CF) -DCTAGS
95 ctags2_LDADD += $(ALLOCA_C)
97 ctags2_CPPFLAGS = $(AM_CPPFLAGS)
99 ctags2_CPPFLAGS += $(BDWGC_CPPFLAGS)
100 ctags2_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
102 ctags2_DEPENDENCIES = $(ALLOCA)
104 etags_SOURCES = $(REGEX_C) etags.c
105 EXTRA_etags_SOURCES = $(ALLOCA_C)
106 etags_CFLAGS = $(REGEX_CF) -DETAGS -DEMACS_NAME="\"SXEmacs\""
109 etags_LDADD += $(ALLOCA_C)
111 etags_CPPFLAGS = $(AM_CPPFLAGS)
113 etags_CPPFLAGS += $(BDWGC_CPPFLAGS)
114 etags_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
116 etags_DEPENDENCIES = $(ALLOCA)
118 ootags_SOURCES = $(REGEX_C) ootags.c
119 ootags_CFLAGS = $(REGEX_CF) -DOOTAGS
120 ootags_CPPFLAGS = $(AM_CPPFLAGS)
122 ootags_CPPFLAGS += $(BDWGC_CPPFLAGS)
123 ootags_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
129 stage1: $(bin_PROGRAMS) $(archlib_PROGRAMS) $(dist_bin_SCRIPTS) \
130 $(archlib_SCRIPTS) $(noinst_PROGRAMS) $(dist_archlib_DATA)
136 ### dont use staged build
139 CLEANFILES = core* stage1 stage2
142 cd $(DESTDIR)$(bindir) && \
146 cd $(DESTDIR)$(bindir) && \
150 # Help the SXEmacs developers get nice post-processed source files
152 ## Create preprocessor output (debugging purposes only)
154 $(COMPILE) -E -o $@ $<
156 ## Create assembler output (debugging purposes only)
158 $(COMPILE) -S -c $(cflags) $<