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 = regex.c regex.h
54 REGEX_CF = -DINHIBIT_STRING_HEADER
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
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
73 mmencode_SOURCES = mmencode.c
74 make_dump_id_SOURCES = make-dump-id.c
76 make_path_SOURCES = make-path.c
77 make_path_CFLAGS = -Demacs
79 movemail_SOURCES = movemail.c pop.c pop.h $(REGEX_C)
80 movemail_CFLAGS = $(AM_CFLAGS) $(REGEX_CF)
81 movemail_CPPFLAGS = $(AM_CPPFLAGS)
83 movemail_CPPFLAGS += $(BDWGC_CPPFLAGS)
84 movemail_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
87 ctags2_SOURCES = $(REGEX_C) etags.c
88 EXTRA_ctags2_SOURCES = $(ALLOCA_C)
89 ctags2_CFLAGS = $(REGEX_CF) -DCTAGS
92 ctags2_LDADD += $(ALLOCA_C)
94 ctags2_CPPFLAGS = $(AM_CPPFLAGS)
96 ctags2_CPPFLAGS += $(BDWGC_CPPFLAGS)
97 ctags2_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
99 ctags2_DEPENDENCIES = $(ALLOCA)
101 etags_SOURCES = $(REGEX_C) etags.c
102 EXTRA_etags_SOURCES = $(ALLOCA_C)
103 etags_CFLAGS = $(REGEX_CF) -DETAGS -DEMACS_NAME="\"SXEmacs\""
106 etags_LDADD += $(ALLOCA_C)
108 etags_CPPFLAGS = $(AM_CPPFLAGS)
110 etags_CPPFLAGS += $(BDWGC_CPPFLAGS)
111 etags_LDADD += $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
113 etags_DEPENDENCIES = $(ALLOCA)
115 ootags_SOURCES = $(REGEX_C) ootags.c
116 ootags_CFLAGS = $(REGEX_CF) -DOOTAGS
117 ootags_CPPFLAGS = $(AM_CPPFLAGS)
119 ootags_CPPFLAGS += $(BDWGC_CPPFLAGS)
120 ootags_LDADD = $(BDWGC_LDFLAGS) $(BDWGC_LIBS)
126 stage1: $(bin_PROGRAMS) $(archlib_PROGRAMS) \
127 $(archlib_SCRIPTS) $(noinst_PROGRAMS) $(dist_archlib_DATA)
133 ### dont use staged build
136 CLEANFILES = core* stage1 stage2
139 cd $(DESTDIR)$(bindir) && \
143 cd $(DESTDIR)$(bindir) && \
147 # Help the SXEmacs developers get nice post-processed source files
149 ## Create preprocessor output (debugging purposes only)
151 $(COMPILE) -E -o $@ $<
153 ## Create assembler output (debugging purposes only)
155 $(COMPILE) -S -c $(cflags) $<