VirtualBox

source: kBuild/trunk/src/gmake/NMakefile@ 151

Last change on this file since 151 was 151, checked in by bird, 20 years ago

Initial revision

  • Property svn:eol-style set to native
File size: 6.3 KB
Line 
1# NOTE: If you have no `make' program at all to process this makefile, run
2# `build_w32.bat' instead.
3#
4# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
5# This file is part of GNU Make.
6#
7# GNU Make 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 2, or (at your option)
10# any later version.
11#
12# GNU Make 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.
16#
17# You should have received a copy of the GNU General Public License
18# along with GNU Make; see the file COPYING. If not, write to
19# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20# Boston, MA 02111-1307, USA.
21
22#
23# NMakefile for GNU Make
24#
25
26LINK = link
27CC = cl
28
29OUTDIR=.
30MAKEFILE=NMakefile
31SUBPROC_MAKEFILE=NMakefile
32
33CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
34CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
35CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
36
37LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
38 /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
39 /OUT:WinDebug/make.exe /DEBUG
40LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
41 /INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
42
43all: config.h subproc Release Debug
44
45#
46# Make sure we build the subproc library first. It has it's own
47# makefile. To be portable to Windows 95, we put the instructions
48# on how to build the library into a batch file. On NT, we could
49# simply have done foo && bar && dog, but this doesn't port.
50#
51subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
52
53w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: w32/subproc/misc.c w32/subproc/sub_proc.c w32/subproc/w32err.c
54 subproc.bat $(SUBPROC_MAKEFILE) $(MAKE)
55 if exist WinDebug\make.exe erase WinDebug\make.exe
56 if exist WinRel\make.exe erase WinRel\make.exe
57
58config.h: config.h.W32
59 copy $? $@
60
61Release:
62 $(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
63Debug:
64 $(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
65
66clean:
67 if exist WinDebug\nul rmdir /s /q WinDebug
68 if exist WinRel\nul rmdir /s /q WinRel
69 if exist w32\subproc\WinDebug\nul rmdir /s /q w32\subproc\WinDebug
70 if exist w32\subproc\WinRel\nul rmdir /s /q w32\subproc\WinRel
71 if exist config.h erase config.h
72 erase *.pdb
73
74$(OUTDIR):
75 if not exist .\$@\nul mkdir .\$@
76
77LIBS = kernel32.lib user32.lib advapi32.lib
78
79OBJS = \
80 $(OUTDIR)/ar.obj \
81 $(OUTDIR)/arscan.obj \
82 $(OUTDIR)/commands.obj \
83 $(OUTDIR)/default.obj \
84 $(OUTDIR)/dir.obj \
85 $(OUTDIR)/expand.obj \
86 $(OUTDIR)/file.obj \
87 $(OUTDIR)/function.obj \
88 $(OUTDIR)/getloadavg.obj \
89 $(OUTDIR)/getopt.obj \
90 $(OUTDIR)/getopt1.obj \
91 $(OUTDIR)/hash.obj \
92 $(OUTDIR)/implicit.obj \
93 $(OUTDIR)/job.obj \
94 $(OUTDIR)/main.obj \
95 $(OUTDIR)/misc.obj \
96 $(OUTDIR)/read.obj \
97 $(OUTDIR)/remake.obj \
98 $(OUTDIR)/remote-stub.obj \
99 $(OUTDIR)/rule.obj \
100 $(OUTDIR)/signame.obj \
101 $(OUTDIR)/variable.obj \
102 $(OUTDIR)/version.obj \
103 $(OUTDIR)/vpath.obj \
104 $(OUTDIR)/glob.obj \
105 $(OUTDIR)/fnmatch.obj \
106 $(OUTDIR)/dirent.obj \
107 $(OUTDIR)/pathstuff.obj
108
109$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
110 $(LINK) @<<
111 $(LDFLAGS) $(LIBS) $(OBJS)
112<<
113
114.c{$(OUTDIR)}.obj:
115 $(CC) $(CFLAGS) /c $<
116
117$(OUTDIR)/glob.obj : glob/glob.c
118 $(CC) $(CFLAGS) /c $?
119$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
120 $(CC) $(CFLAGS) /c $?
121$(OUTDIR)/dirent.obj : w32/compat/dirent.c
122 $(CC) $(CFLAGS) /c $?
123$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
124 $(CC) $(CFLAGS) /c $?
125
126# --------------- DEPENDENCIES
127#
128# dummy
129# dummy
130ar.o : \
131 ar.c make.h config.h \
132 getopt.h \
133 gettext.h filedef.h \
134 hash.h dep.h
135arscan.o : \
136 arscan.c make.h config.h \
137 getopt.h \
138 gettext.h \
139
140commands.o : \
141 commands.c make.h config.h \
142 getopt.h \
143 gettext.h dep.h \
144 filedef.h hash.h variable.h job.h \
145 commands.h
146default.o : \
147 default.c make.h config.h \
148 getopt.h \
149 gettext.h filedef.h \
150 hash.h variable.h rule.h dep.h job.h \
151 commands.h
152dir.o : \
153 dir.c make.h config.h \
154 getopt.h \
155 gettext.h hash.h \
156
157expand.o : \
158 expand.c make.h config.h \
159 getopt.h \
160 gettext.h \
161 filedef.h hash.h job.h \
162 commands.h variable.h rule.h
163file.o : \
164 file.c make.h config.h \
165 getopt.h \
166 gettext.h \
167 dep.h filedef.h hash.h job.h \
168 commands.h variable.h \
169 debug.h
170function.o : \
171 function.c make.h config.h \
172 getopt.h \
173 gettext.h filedef.h \
174 hash.h variable.h dep.h job.h \
175 commands.h debug.h
176getopt.o : \
177 getopt.c config.h \
178
179getopt1.o : \
180 getopt1.c config.h getopt.h \
181
182hash.o : \
183 hash.c make.h config.h \
184 getopt.h \
185 gettext.h hash.h
186implicit.o : \
187 implicit.c make.h config.h \
188 getopt.h \
189 gettext.h filedef.h \
190 hash.h rule.h dep.h debug.h
191job.o : \
192 job.c make.h config.h \
193 getopt.h \
194 gettext.h \
195 job.h \
196 debug.h filedef.h hash.h commands.h \
197 variable.h \
198
199loadavg-getloadavg.o : \
200 getloadavg.c config.h \
201 make.h \
202 getopt.h \
203 gettext.h \
204
205main.o : \
206 main.c make.h config.h \
207 getopt.h \
208 gettext.h dep.h \
209 filedef.h hash.h variable.h job.h \
210 commands.h rule.h debug.h \
211
212misc.o : \
213 misc.c make.h config.h \
214 getopt.h \
215 gettext.h dep.h \
216 debug.h
217read.o : \
218 read.c make.h config.h \
219 getopt.h \
220 gettext.h \
221 dep.h filedef.h hash.h \
222 job.h commands.h \
223 variable.h rule.h debug.h
224remake.o : \
225 remake.c make.h config.h \
226 getopt.h \
227 gettext.h filedef.h \
228 hash.h job.h \
229 commands.h dep.h variable.h debug.h
230# dummy
231remote-stub.o : \
232 remote-stub.c make.h config.h \
233 getopt.h \
234 gettext.h filedef.h \
235 hash.h job.h \
236 commands.h
237rule.o : \
238 rule.c make.h config.h \
239 getopt.h \
240 gettext.h dep.h \
241 filedef.h hash.h job.h \
242 commands.h variable.h rule.h
243signame.o : \
244 signame.c make.h config.h \
245 getopt.h \
246 gettext.h
247variable.o : \
248 variable.c make.h config.h \
249 getopt.h \
250 gettext.h dep.h \
251 filedef.h hash.h job.h \
252 commands.h variable.h rule.h
253version.o : \
254 version.c config.h
255vpath.o : \
256 vpath.c make.h config.h \
257 getopt.h \
258 gettext.h filedef.h \
259 hash.h variable.h
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette