; Merge: fixes and updates to scroll margin (Bug#5718)
[emacs.git] / nt / Makefile.in
blob34c552ca2626dddd6849ec9645763450e195700d
1 ### @configure_input@
3 # Copyright (C) 2013-2017 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
7 # GNU Emacs 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 # GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20 # Avoid trouble on systems where the `SHELL' variable might be
21 # inherited from the environment.
22 SHELL = /bin/sh
24 # ==================== Things `configure' will edit ====================
26 CC=@CC@
27 CFLAGS=@CFLAGS@
28 CPPFLAGS = @CPPFLAGS@
29 LDFLAGS = @LDFLAGS@
31 version=@version@
32 ## Used in $archlibdir.
33 configuration=@configuration@
34 EXEEXT=@EXEEXT@
35 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
36 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
37 PROFILING_CFLAGS = @PROFILING_CFLAGS@
38 WARN_CFLAGS = @WARN_CFLAGS@
39 WERROR_CFLAGS = @WERROR_CFLAGS@
41 # Program name transformation.
42 TRANSFORM = @program_transform_name@
44 # 'make' verbosity.
45 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
47 AM_V_CC = $(am__v_CC_@AM_V@)
48 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
49 am__v_CC_0 = @echo " CC " $@;
50 am__v_CC_1 =
52 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
53 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
54 am__v_CCLD_0 = @echo " CCLD " $@;
55 am__v_CCLD_1 =
57 AM_V_GEN = $(am__v_GEN_@AM_V@)
58 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
59 am__v_GEN_0 = @echo " GEN " $@;
60 am__v_GEN_1 =
62 AM_V_RC = $(am__v_RC_@AM_V@)
63 am__v_RC_ = $(am__v_RC_@AM_DEFAULT_V@)
64 am__v_RC_0 = @echo " RC " $@;
65 am__v_RC_1 =
67 # ==================== Where To Install Things ====================
69 # The default location for installation. Everything is placed in
70 # subdirectories of this directory. The default values for many of
71 # the variables below are expressed in terms of this one, so you may
72 # not need to change them. This is set with the --prefix option to
73 # `../configure'.
74 prefix=@prefix@
76 # Like `prefix', but used for architecture-specific files. This is
77 # set with the --exec-prefix option to `../configure'.
78 exec_prefix=@exec_prefix@
80 # Where to install Emacs and other binaries that people will want to
81 # run directly (like etags). This is set with the --bindir option
82 # to `../configure'.
83 bindir=@bindir@
85 # The root of the directory tree for read-only architecture-independent
86 # data files. ${datadir}, ${infodir} and ${mandir} are based on this.
87 datarootdir=@datarootdir@
89 # Where to install architecture-independent data files. ${lispdir}
90 # and ${etcdir} are subdirectories of this. This is set with the
91 # --datadir option to `../configure'.
92 datadir=@datadir@
94 # Where to install and expect executable files to be run by Emacs
95 # rather than directly by users, and other architecture-dependent
96 # data. ${archlibdir} is usually below this. This is set with the
97 # --libexecdir option to `../configure'.
98 libexecdir=@libexecdir@
100 # Directory for local state files for all programs.
101 localstatedir=@localstatedir@
103 # Where to find the source code. This is set by the configure
104 # script's `--srcdir' option. However, the value of ${srcdir} in
105 # this makefile is not identical to what was specified with --srcdir,
106 # since the variable here has `/lib-src' added at the end.
108 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
109 srcdir=@srcdir@
110 VPATH=@srcdir@
112 # The top-level source directory, also set by configure.
113 top_srcdir=@top_srcdir@
114 # MinGW CPPFLAGS may use this.
115 abs_top_srcdir=@abs_top_srcdir@
117 # ==================== Emacs-specific directories ====================
119 # These variables hold the values Emacs will actually use. They are
120 # based on the values of the standard Make variables above.
122 # Where to put executables to be run by Emacs rather than the user.
123 # This path usually includes the Emacs version and configuration name,
124 # so that multiple configurations for multiple versions of Emacs may
125 # be installed at once. This can be set with the --archlibdir option
126 # to `../configure'.
127 archlibdir=@archlibdir@
129 # ==================== Utility Programs for the Build =================
131 # ../configure figures out the correct values for these.
132 INSTALL = @INSTALL@
133 INSTALL_DATA = @INSTALL_DATA@
134 INSTALL_PROGRAM = @INSTALL_PROGRAM@
135 INSTALL_SCRIPT = @INSTALL_SCRIPT@
136 # By default, we uphold the dignity of our programs.
137 INSTALL_STRIP =
138 MKDIR_P = @MKDIR_P@
140 # ========================== Lists of Files ===========================
142 # Things that a user might actually run, which should be installed in bindir.
143 INSTALLABLES = runemacs${EXEEXT} addpm${EXEEXT}
145 # Things that Emacs runs internally, which should not be installed in bindir.
146 UTILITIES = cmdproxy${EXEEXT} ddeclient${EXEEXT}
148 # Things that Emacs runs during the build process.
149 DONT_INSTALL =
151 # All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
152 EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
154 # =========================== Configuration ===========================
156 # MS-Windows resource files and resource compiler
157 EMACSRES = @EMACSRES@
158 EMACS_MANIFEST = @EMACS_MANIFEST@
159 WINDRES = @WINDRES@
161 ## Extra libraries to use when linking addpm.
162 LIBS_ADDPM = -lole32 -luuid
164 ## Compilation and linking flags
165 BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
166 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
167 -I. -I${srcdir}
169 ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
170 ## Unused.
171 LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
172 ## Unused.
173 CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
175 all: ${EXE_FILES}
177 .PHONY: all
179 ## Install the internal utilities. Until they are installed, we can
180 ## just run them directly from nt/.
181 $(DESTDIR)${archlibdir}: all
182 @echo
183 @echo "Installing utilities run internally by Emacs."
184 umask 022; ${MKDIR_P} "$(DESTDIR)${archlibdir}"
185 exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \
186 if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \
187 for file in ${UTILITIES}; do \
188 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file "$(DESTDIR)${archlibdir}/$$file" ; \
189 done ; \
192 .PHONY: install uninstall mostlyclean clean distclean maintainer-clean
193 .PHONY: bootstrap-clean extraclean check tags
195 install: $(DESTDIR)${archlibdir}
196 @echo
197 @echo "Installing utilities for users to run."
198 umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
199 for file in ${INSTALLABLES} ; do \
200 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
201 done
202 ${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)"
203 $(INSTALL_DATA) ${srcdir}/README.W32 "$(DESTDIR)${datadir}/emacs/$(version)"
205 uninstall:
206 rm -f "$(DESTDIR)${datadir}/emacs/$(version)/README.W32"
207 for file in ${INSTALLABLES}; do \
208 rm -f "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
209 done
210 if [ -d "$(DESTDIR)${archlibdir}" ]; then \
211 (cd "$(DESTDIR)${archlibdir}" && rm -f ${UTILITIES}) \
214 mostlyclean:
215 -rm -f core *.o *.res
217 clean: mostlyclean
218 -rm -f ${EXE_FILES}
220 distclean: clean
221 -rm -f TAGS Makefile *.rc
223 bootstrap-clean maintainer-clean: distclean
224 true
226 extraclean: maintainer-clean
227 -rm -f *~ \#*
229 ## Test the contents of the directory.
230 check:
231 @echo "We don't have any tests for the nt/ directory yet."
233 ETAGS = ../lib-src/etags${EXEEXT}
235 ${ETAGS}: FORCE
236 ${MAKE} -C ../lib-src $(notdir $@)
238 tagsfiles= $(wildcard ${srcdir}/*.[ch])
240 FORCE:
241 .PHONY: tags FORCE
242 tags: TAGS
243 TAGS: ${ETAGS} ${tagsfiles}
244 ${ETAGS} ${tagsfiles}
246 ## Build the programs
247 addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
248 $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LIBS_ADDPM) -o $@
250 ddeclient${EXEEXT}: ${srcdir}/ddeclient.c
251 $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< -o $@
253 cmdproxy${EXEEXT}: ${srcdir}/cmdproxy.c
254 $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< -o $@
256 runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES)
257 $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $^ -mwindows -o $@
259 ## Also used in ../src/Makefile.
260 emacs.res ../src/emacs.res: emacs.rc ${srcdir}/icons/emacs.ico \
261 ${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST)
262 $(AM_V_RC)${WINDRES} -I ${srcdir} -O coff -o $@ $<
264 ${srcdir}/gnulib.mk: ${srcdir}/gnulib-modules-to-delete.cfg ${srcdir}/../lib/gnulib.mk
265 $(AM_V_GEN)sed '/^[^#]/s|^.*$$|/^## begin *gnulib module &/,/^## end *gnulib module &/d|' < $< | \
266 sed -f- ${srcdir}/../lib/gnulib.mk > $@-t && \
267 ${srcdir}/../build-aux/move-if-change $@-t $@