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 noinst_PROGRAMS = make-path make-dump-id
62 dist_noinst_SCRIPTS = ad2c
65 gnuclient_SOURCES = gnuserv.h gnuslib.c gnuclient.c
66 gnuserv_SOURCES = gnuserv.h gnuslib.c gnuserv.c
67 fakemail_SOURCES = fakemail.c
68 wakeup_SOURCES = wakeup.c
69 profile_SOURCES = profile.c
70 make_docfile_SOURCES = make-docfile.c
71 sorted_doc_SOURCES = sorted-doc.c
74 mmencode_SOURCES = mmencode.c
75 make_dump_id_SOURCES = make-dump-id.c
77 make_path_SOURCES = make-path.c
78 make_path_CFLAGS = -Demacs
80 movemail_SOURCES = movemail.c pop.c pop.h $(REGEX_C)
81 movemail_CFLAGS = $(AM_CFLAGS) $(REGEX_CF)
82 movemail_CPPFLAGS = $(AM_CPPFLAGS)
84 movemail_CPPFLAGS += $(BDWGC_CPPFLAGS)
85 movemail_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
88 ctags2_SOURCES = $(REGEX_C) etags.c
89 EXTRA_ctags2_SOURCES = $(ALLOCA_C)
90 ctags2_CFLAGS = $(REGEX_CF) -DCTAGS
93 ctags2_LDADD += $(ALLOCA_C)
95 ctags2_CPPFLAGS = $(AM_CPPFLAGS)
97 ctags2_CPPFLAGS += $(BDWGC_CPPFLAGS)
98 ctags2_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
100 ctags2_DEPENDENCIES = $(ALLOCA)
102 etags_SOURCES = $(REGEX_C) etags.c
103 EXTRA_etags_SOURCES = $(ALLOCA_C)
104 etags_CFLAGS = $(REGEX_CF) -DETAGS -DEMACS_NAME="\"SXEmacs\""
107 etags_LDADD += $(ALLOCA_C)
109 etags_CPPFLAGS = $(AM_CPPFLAGS)
111 etags_CPPFLAGS += $(BDWGC_CPPFLAGS)
112 etags_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
114 etags_DEPENDENCIES = $(ALLOCA)
116 ootags_SOURCES = $(REGEX_C) ootags.c
117 ootags_CFLAGS = $(REGEX_CF) -DOOTAGS
118 ootags_CPPFLAGS = $(AM_CPPFLAGS)
120 ootags_CPPFLAGS += $(BDWGC_CPPFLAGS)
121 ootags_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
127 stage1: $(bin_PROGRAMS) $(archlib_PROGRAMS) \
128 $(archlib_SCRIPTS) $(noinst_PROGRAMS) $(dist_archlib_DATA)
134 ### dont use staged build
137 CLEANFILES = core* stage1 stage2
140 cd $(DESTDIR)$(bindir) && \
144 cd $(DESTDIR)$(bindir) && \
148 # Help the SXEmacs developers get nice post-processed source files
150 ## Create preprocessor output (debugging purposes only)
152 $(COMPILE) -E -o $@ $<
154 ## Create assembler output (debugging purposes only)
156 $(COMPILE) -S -c $(cflags) $<