root/branches/2.1/nt/makefile.w32-in

Revision 1885, 5.7 kB (checked in by cvs2svn, 6 years ago)

2745 copies to tags/branches

Line 
1 #  Makefile for GNU Emacs on the Microsoft W32 API.
2 #  Copyright (c) 2000-2001 Free Software Foundation, Inc.
3 #
4 #  Top level makefile for building GNU Emacs on Windows NT
5 #
6 #  This file is part of GNU Emacs.
7
8 #  GNU Emacs is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 2, or (at your option)
11 #  any later version.
12
13 #  GNU Emacs is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17
18 #  You should have received a copy of the GNU General Public License
19 #  along with GNU Emacs; see the file COPYING.  If not, write to
20 #  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 #  Boston, MA 02111-1307, USA.
22
23 ALL             = addpm ddeclient runemacs cmdproxy addsection preprep
24
25 .PHONY: $(ALL)
26
27 TRES            = $(BLD)/emacs.res
28
29 addpm:            $(BLD) $(BLD)/addpm.exe
30 $(BLD)/addpm.exe: $(BLD)/addpm.$(O)
31                   $(LINK) $(LINK_OUT)$@ \
32                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
33
34 ddeclient:        $(BLD) $(BLD)/ddeclient.exe
35 $(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O)
36                   $(LINK) $(LINK_OUT)$@ \
37                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
38
39 cmdproxy:         $(BLD) $(BLD)/cmdproxy.exe
40 $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)
41                   $(LINK) $(LINK_OUT)$@ \
42                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
43
44 addsection:       $(BLD) $(BLD)/addsection.exe
45 $(BLD)/addsection.exe: $(BLD)/addsection.$(O)
46                   $(LINK) $(LINK_OUT)$@ \
47                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
48
49 preprep:          $(BLD) $(BLD)/preprep.exe
50 $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
51                   $(LINK) $(LINK_OUT)$@ \
52                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)
53
54 #
55 # The resource file.  NT 3.10 requires the use of cvtres; even though
56 # it is not necessary on later versions, it is still ok to use it.
57 #
58 $(TRES):        emacs.rc
59                 $(RC) $(RC_OUT)$(BLD)/emacs.res $(ALL_DEPS)
60
61 runemacs:         $(BLD) $(BLD)/runemacs.exe
62 $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)
63                   $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \
64                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)
65
66 which-sh:
67         @echo Using $(THE_SHELL) as shell.
68
69 #
70 # Build emacs
71 #
72 all:    which-sh $(BLD) $(ALL) all-other-dirs-$(MAKETYPE)
73
74 all-other-dirs-nmake:
75         cd ..\lib-src
76         $(MAKE) $(MFLAGS) all
77         cd ..\src
78         $(MAKE) $(MFLAGS) all
79         cd ..\lisp
80         $(MAKE) $(MFLAGS) all
81         cd ..\leim
82         $(MAKE) $(MFLAGS) all
83         cd ..\nt
84
85 all-other-dirs-gmake:
86         $(MAKE) $(MFLAGS) -C ../lib-src all
87         $(MAKE) $(MFLAGS) -C ../src all
88         $(MAKE) $(MFLAGS) -C ../lisp all
89         $(MAKE) $(MFLAGS) -C ../leim all
90
91 recompile:      recompile-$(MAKETYPE)
92
93 recompile-nmake:
94         cd ..\lisp
95         $(MAKE) $(MFLAGS) recompile
96         cd ..\nt
97
98 recompile-gmake:
99         $(MAKE) $(MFLAGS) -C ../lisp recompile
100
101 bootstrap:      $(BLD) $(ALL) bootstrap-$(MAKETYPE)
102
103 bootstrap-nmake:
104         cd ..\src
105         $(MAKE) $(MFLAGS) bootstrap
106         $(MAKE) $(MFLAGS) bootstrap-clean
107         cd ..\lisp
108         $(MAKE) $(MFLAGS) bootstrap
109         cd ..\nt
110
111 bootstrap-gmake:
112         $(MAKE) $(MFLAGS) -C ../src bootstrap
113         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean
114         $(MAKE) $(MFLAGS) -C ../lisp bootstrap
115
116 bootstrap-clean: bootstrap-clean-$(MAKETYPE)
117
118 bootstrap-clean-nmake:
119         cd ..\src
120         $(MAKE) $(MFLAGS) bootstrap-clean
121         cd ..\lisp
122         $(MAKE) $(MFLAGS) bootstrap-clean
123
124 bootstrap-clean-gmake:
125         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean
126         $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean
127
128 $(INSTALL_DIR):
129         - mkdir "$(INSTALL_DIR)"
130
131 $(INSTALL_DIR)/bin: $(INSTALL_DIR)
132         - mkdir "$(INSTALL_DIR)/bin"
133
134 #
135 # Build and install emacs in INSTALL_DIR
136 #
137 install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
138         - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin
139         - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin
140         - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
141         - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin
142         - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin
143         - "$(INSTALL_DIR)/bin/addpm" /q
144         - $(DEL) ../same-dir.tst
145         - $(DEL) $(INSTALL_DIR)/same-dir.tst
146         echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
147         - mkdir "$(INSTALL_DIR)/etc"
148         - mkdir "$(INSTALL_DIR)/info"
149         - mkdir "$(INSTALL_DIR)/lock"
150         - mkdir "$(INSTALL_DIR)/data"
151         - mkdir "$(INSTALL_DIR)/site-lisp"
152         - mkdir "$(INSTALL_DIR)/etc/icons"
153         $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)
154         $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)
155         - $(CP_DIR) icons $(INSTALL_DIR)/etc
156         $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)
157         - $(DEL) ../same-dir.tst
158         - $(DEL) $(INSTALL_DIR)/same-dir.tst
159
160 install-other-dirs-nmake:
161         cd ..\lib-src
162         $(MAKE) $(MFLAGS) install
163         cd ..\src
164         $(MAKE) $(MFLAGS) install
165         cd ..\lisp
166         $(MAKE) $(MFLAGS) install
167         cd ..\leim
168         $(MAKE) $(MFLAGS) install
169         cd ..\nt
170
171 install-other-dirs-gmake:
172         $(MAKE) $(MFLAGS) -C ../lib-src install
173         $(MAKE) $(MFLAGS) -C ../src install
174         $(MAKE) $(MFLAGS) -C ../lisp install
175         $(MAKE) $(MFLAGS) -C ../leim install
176
177 #
178 # Maintenance
179 #
180 clean:  clean-other-dirs-$(MAKETYPE)
181         - $(DEL) *~ $(COMPILER_TEMP_FILES)
182         - $(DEL_TREE) $(OBJDIR)
183         - $(DEL) ../etc/DOC ../etc/DOC-X
184
185 clean-other-dirs-nmake:
186         cd ..\lib-src
187         $(MAKE) $(MFLAGS) clean
188         cd ..\src
189         $(MAKE) $(MFLAGS) clean
190         cd ..\lisp
191         $(MAKE) $(MFLAGS) clean
192         cd ..\leim
193         $(MAKE) $(MFLAGS) clean
194         cd ..\nt
195
196 clean-other-dirs-gmake:
197         $(MAKE) $(MFLAGS) -C ../lib-src clean
198         $(MAKE) $(MFLAGS) -C ../src clean
199         $(MAKE) $(MFLAGS) -C ../lisp clean
200         $(MAKE) $(MFLAGS) -C ../leim clean
201
202 cleanall-other-dirs-nmake:
203         cd ..\lib-src
204         $(MAKE) $(MFLAGS) cleanall
205         cd ..\src
206         $(MAKE) $(MFLAGS) cleanall
207         cd ..\nt
208
209 cleanall-other-dirs-gmake:
210         $(MAKE) $(MFLAGS) -C ../lib-src cleanall
211         $(MAKE) $(MFLAGS) -C ../src cleanall
212
213 cleanall: clean cleanall-other-dirs-$(MAKETYPE)
214          - $(DEL_TREE) obj
215          - $(DEL_TREE) obj-spd
216          - $(DEL_TREE) oo
217          - $(DEL_TREE) oo-spd
218
219 realclean: cleanall
220         - $(DEL_TREE) ../bin
Note: See TracBrowser for help on using the browser.