3 # Copyright (C) 2013-2014 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.
24 # ==================== Things `configure' will edit ====================
30 ## Used in $archlibdir.
31 configuration
=@configuration@
33 C_SWITCH_SYSTEM
=@C_SWITCH_SYSTEM@
34 C_SWITCH_MACHINE
=@C_SWITCH_MACHINE@
35 PROFILING_CFLAGS
= @PROFILING_CFLAGS@
36 WARN_CFLAGS
= @WARN_CFLAGS@
37 WERROR_CFLAGS
= @WERROR_CFLAGS@
39 # Program name transformation.
40 TRANSFORM
= @program_transform_name@
42 # ==================== Where To Install Things ====================
44 # The default location for installation. Everything is placed in
45 # subdirectories of this directory. The default values for many of
46 # the variables below are expressed in terms of this one, so you may
47 # not need to change them. This is set with the --prefix option to
51 # Like `prefix', but used for architecture-specific files. This is
52 # set with the --exec-prefix option to `../configure'.
53 exec_prefix=@
exec_prefix@
55 # Where to install Emacs and other binaries that people will want to
56 # run directly (like etags). This is set with the --bindir option
60 # The root of the directory tree for read-only architecture-independent
61 # data files. ${datadir}, ${infodir} and ${mandir} are based on this.
62 datarootdir
=@datarootdir@
64 # Where to install architecture-independent data files. ${lispdir}
65 # and ${etcdir} are subdirectories of this. This is set with the
66 # --datadir option to `../configure'.
69 # Where to install and expect executable files to be run by Emacs
70 # rather than directly by users, and other architecture-dependent
71 # data. ${archlibdir} is usually below this. This is set with the
72 # --libexecdir option to `../configure'.
73 libexecdir
=@libexecdir@
75 # Directory for local state files for all programs.
76 localstatedir
=@localstatedir@
78 # Where to find the source code. This is set by the configure
79 # script's `--srcdir' option. However, the value of ${srcdir} in
80 # this makefile is not identical to what was specified with --srcdir,
81 # since the variable here has `/lib-src' added at the end.
83 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
87 # The top-level source directory, also set by configure.
88 top_srcdir
=@top_srcdir@
89 # MinGW CPPFLAGS may use this.
90 abs_top_srcdir
=@abs_top_srcdir@
92 # ==================== Emacs-specific directories ====================
94 # These variables hold the values Emacs will actually use. They are
95 # based on the values of the standard Make variables above.
97 # Where to put executables to be run by Emacs rather than the user.
98 # This path usually includes the Emacs version and configuration name,
99 # so that multiple configurations for multiple versions of Emacs may
100 # be installed at once. This can be set with the --archlibdir option
102 archlibdir
=@archlibdir@
104 # ==================== Utility Programs for the Build =================
106 # ../configure figures out the correct values for these.
108 INSTALL_DATA
= @INSTALL_DATA@
109 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
110 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
111 # By default, we uphold the dignity of our programs.
115 # ========================== Lists of Files ===========================
117 # Things that a user might actually run, which should be installed in bindir.
118 INSTALLABLES
= runemacs
${EXEEXT} addpm
${EXEEXT}
120 # Things that Emacs runs internally, which should not be installed in bindir.
121 UTILITIES
= cmdproxy
${EXEEXT} ddeclient
${EXEEXT}
123 # Things that Emacs runs during the build process.
126 # All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
127 EXE_FILES
= ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
129 # =========================== Configuration ===========================
131 # MS-Windows resource files and resource compiler
132 EMACSRES
= @EMACSRES@
133 EMACS_MANIFEST
= @EMACS_MANIFEST@
136 ## Extra libraries to use when linking addpm.
137 LIBS_ADDPM
= -lole32
-luuid
139 ## Compilation and linking flags
140 BASE_CFLAGS
= $(C_SWITCH_SYSTEM
) $(C_SWITCH_MACHINE
) \
141 $(WARN_CFLAGS
) $(WERROR_CFLAGS
) \
144 ALL_CFLAGS
= ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
145 LINK_CFLAGS
= ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
146 CPP_CFLAGS
= ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
152 ## Install the internal utilities. Until they are installed, we can
153 ## just run them directly from nt/.
154 $(DESTDIR
)${archlibdir}: all
156 @echo
"Installing utilities run internally by Emacs."
157 umask
022; ${MKDIR_P} "$(DESTDIR)${archlibdir}"
158 exp_archlibdir
=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \
159 if
[ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \
160 for file in
${UTILITIES}; do \
161 $(INSTALL_PROGRAM
) $(INSTALL_STRIP
) $$file "$(DESTDIR)${archlibdir}/$$file" ; \
165 .PHONY
: install uninstall mostlyclean clean distclean maintainer-clean
166 .PHONY
: bootstrap-clean extraclean
check tags
168 install: $(DESTDIR
)${archlibdir}
170 @echo
"Installing utilities for users to run."
171 umask
022; ${MKDIR_P} "$(DESTDIR)${bindir}"
172 for file in
${INSTALLABLES} ; do \
173 $(INSTALL_PROGRAM
) $(INSTALL_STRIP
) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
175 ${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)"
176 $(INSTALL_DATA
) ${srcdir}/README.W32
"$(DESTDIR)${datadir}/emacs/$(version)"
179 rm -f
"$(DESTDIR)${datadir}/emacs/$(version)/README.W32"
180 for file in
${INSTALLABLES}; do \
181 rm -f
"$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
183 if
[ -d
"$(DESTDIR)${archlibdir}" ]; then \
184 (cd
"$(DESTDIR)${archlibdir}" && rm -f
${UTILITIES}) \
188 -rm -f core
*.o
*.res
197 bootstrap-clean maintainer-clean
: distclean
200 extraclean
: maintainer-clean
203 ## Test the contents of the directory.
205 @echo
"We don't have any tests for the nt/ directory yet."
208 TAGS
: ${EXE_FILES
:${EXEEXT}=.c
}
209 ..
/lib-src
/etags
*.
[ch
]
211 ## Build the programs
212 addpm
${EXEEXT}: ${srcdir}/addpm.c ..
/src
/epaths.h
213 $(CC
) ${ALL_CFLAGS} ${srcdir}/addpm.c
$(LIBS_ADDPM
) -o addpm
${EXEEXT}
215 ddeclient
${EXEEXT}: ${srcdir}/ddeclient.c
216 $(CC
) ${ALL_CFLAGS} ${srcdir}/ddeclient.c
-o ddeclient
${EXEEXT}
218 cmdproxy
${EXEEXT}: ${srcdir}/cmdproxy.c
219 $(CC
) ${ALL_CFLAGS} ${srcdir}/cmdproxy.c
-o cmdproxy
${EXEEXT}
221 runemacs
${EXEEXT}: ${srcdir}/runemacs.c
$(EMACSRES
)
222 $(CC
) ${ALL_CFLAGS} ${srcdir}/runemacs.c
$(EMACSRES
) -mwindows \
225 emacs.res
: ${srcdir}/emacs.rc
${srcdir}/icons
/emacs.ico
${srcdir}/$(EMACS_MANIFEST
)
226 ${WINDRES} -I
${srcdir} -O coff
-o emacs.res
${srcdir}/emacs.rc