2 # Top level makefile for building GNU Emacs on Windows NT
4 # This file is part of GNU Emacs.
6 # GNU Emacs is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 ALL = addpm ddeclient runemacs cmdproxy addsection preprep
25 TRES = $(BLD)/emacs.res
27 addpm: $(BLD) $(BLD)/addpm.exe
28 $(BLD)/addpm.exe: $(BLD)/addpm.$(O)
29 $(LINK) $(LINK_OUT)$@ \
30 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
32 ddeclient: $(BLD) $(BLD)/ddeclient.exe
33 $(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O)
34 $(LINK) $(LINK_OUT)$@ \
35 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
37 cmdproxy: $(BLD) $(BLD)/cmdproxy.exe
38 $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)
39 $(LINK) $(LINK_OUT)$@ \
40 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
42 addsection: $(BLD) $(BLD)/addsection.exe
43 $(BLD)/addsection.exe: $(BLD)/addsection.$(O)
44 $(LINK) $(LINK_OUT)$@ \
45 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
47 preprep: $(BLD) $(BLD)/preprep.exe
48 $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
49 $(LINK) $(LINK_OUT)$@ \
50 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)
53 # The resource file. NT 3.10 requires the use of cvtres; even though
54 # it is not necessary on later versions, it is still ok to use it.
57 $(RC) $(RC_OUT)$(BLD)/emacs.res $(ALL_DEPS)
59 runemacs: $(BLD) $(BLD)/runemacs.exe
60 $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)
61 $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \
62 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
65 @echo Using $(THE_SHELL) as shell.
70 all: which-sh $(BLD) $(ALL) all-other-dirs-$(MAKETYPE)
84 $(MAKE) $(MFLAGS) -C ../lib-src all
85 $(MAKE) $(MFLAGS) -C ../src all
86 $(MAKE) $(MFLAGS) -C ../lisp all
87 $(MAKE) $(MFLAGS) -C ../leim all
89 recompile: recompile-$(MAKETYPE)
93 $(MAKE) $(MFLAGS) recompile
97 $(MAKE) $(MFLAGS) -C ../lisp recompile
99 bootstrap: $(BLD) $(ALL) bootstrap-$(MAKETYPE)
103 $(MAKE) $(MFLAGS) bootstrap
104 $(MAKE) $(MFLAGS) bootstrap-clean
106 $(MAKE) $(MFLAGS) bootstrap
110 $(MAKE) $(MFLAGS) -C ../src bootstrap
111 $(MAKE) $(MFLAGS) -C ../src bootstrap-clean
112 $(MAKE) $(MFLAGS) -C ../lisp bootstrap
114 bootstrap-clean: bootstrap-clean-$(MAKETYPE)
116 bootstrap-clean-nmake:
118 $(MAKE) $(MFLAGS) bootstrap-clean
120 $(MAKE) $(MFLAGS) bootstrap-clean
122 bootstrap-clean-gmake:
123 $(MAKE) $(MFLAGS) -C ../src bootstrap-clean
124 $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean
127 - mkdir "$(INSTALL_DIR)"
130 - mkdir "$(INSTALL_DIR)/bin"
133 # Build and install emacs in INSTALL_DIR
135 install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
136 - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin
137 - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin
138 - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
139 - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin
140 - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin
141 - "$(INSTALL_DIR)/bin/addpm" /q
142 - $(DEL) ../same-dir.tst
143 - $(DEL) $(INSTALL_DIR)/same-dir.tst
144 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
145 - mkdir "$(INSTALL_DIR)/etc"
146 - mkdir "$(INSTALL_DIR)/info"
147 - mkdir "$(INSTALL_DIR)/lock"
148 - mkdir "$(INSTALL_DIR)/data"
149 - mkdir "$(INSTALL_DIR)/site-lisp"
150 - mkdir "$(INSTALL_DIR)/etc/icons"
151 $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)
152 - $(CP_DIR) icons $(INSTALL_DIR)/etc
153 $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)
154 - $(DEL) ../same-dir.tst
155 - $(DEL) $(INSTALL_DIR)/same-dir.tst
157 install-other-dirs-nmake:
159 $(MAKE) $(MFLAGS) install
161 $(MAKE) $(MFLAGS) install
163 $(MAKE) $(MFLAGS) install
165 $(MAKE) $(MFLAGS) install
168 install-other-dirs-gmake:
169 $(MAKE) $(MFLAGS) -C ../lib-src install
170 $(MAKE) $(MFLAGS) -C ../src install
171 $(MAKE) $(MFLAGS) -C ../lisp install
172 $(MAKE) $(MFLAGS) -C ../leim install
177 clean: clean-other-dirs-$(MAKETYPE)
178 - $(DEL) *~ $(COMPILER_TEMP_FILES)
179 - $(DEL_TREE) $(OBJDIR)
180 - $(DEL) ../etc/DOC ../etc/DOC-X
182 clean-other-dirs-nmake:
184 $(MAKE) $(MFLAGS) clean
186 $(MAKE) $(MFLAGS) clean
188 $(MAKE) $(MFLAGS) clean
190 $(MAKE) $(MFLAGS) clean
193 clean-other-dirs-gmake:
194 $(MAKE) $(MFLAGS) -C ../lib-src clean
195 $(MAKE) $(MFLAGS) -C ../src clean
196 $(MAKE) $(MFLAGS) -C ../lisp clean
197 $(MAKE) $(MFLAGS) -C ../leim clean
199 cleanall-other-dirs-nmake:
201 $(MAKE) $(MFLAGS) cleanall
203 $(MAKE) $(MFLAGS) cleanall
206 cleanall-other-dirs-gmake:
207 $(MAKE) $(MFLAGS) -C ../lib-src cleanall
208 $(MAKE) $(MFLAGS) -C ../src cleanall
210 cleanall: clean cleanall-other-dirs-$(MAKETYPE)
212 - $(DEL_TREE) obj-spd