VirtualBox

source: kBuild/vendor/gnumake/2005-05-16/NMakefile.template

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

Current make snaphot, 2005-05-16.

  • Property svn:eol-style set to native
File size: 3.9 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
28MAKE = nmake
29
30OUTDIR=.
31MAKEFILE=NMakefile
32SUBPROC_MAKEFILE=NMakefile
33
34CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
35CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
36CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
37
38LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
39 /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
40 /OUT:WinDebug/make.exe /DEBUG
41LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
42 /INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
43
44all: config.h subproc Release Debug
45
46#
47# Make sure we build the subproc library first. It has it's own
48# makefile. To be portable to Windows 95, we put the instructions
49# on how to build the library into a batch file. On NT, we could
50# simply have done foo && bar && dog, but this doesn't port.
51#
52subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
53
54w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: w32/subproc/misc.c w32/subproc/sub_proc.c w32/subproc/w32err.c
55 subproc.bat $(SUBPROC_MAKEFILE) $(MAKE)
56 if exist WinDebug\make.exe erase WinDebug\make.exe
57 if exist WinRel\make.exe erase WinRel\make.exe
58
59config.h: config.h.W32
60 copy $? $@
61
62Release:
63 $(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
64Debug:
65 $(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
66
67clean:
68 if exist WinDebug\nul rmdir /s /q WinDebug
69 if exist WinRel\nul rmdir /s /q WinRel
70 if exist w32\subproc\WinDebug\nul rmdir /s /q w32\subproc\WinDebug
71 if exist w32\subproc\WinRel\nul rmdir /s /q w32\subproc\WinRel
72 if exist config.h erase config.h
73 erase *.pdb
74
75$(OUTDIR):
76 if not exist .\$@\nul mkdir .\$@
77
78LIBS = kernel32.lib user32.lib advapi32.lib
79
80OBJS = \
81 $(OUTDIR)/ar.obj \
82 $(OUTDIR)/arscan.obj \
83 $(OUTDIR)/commands.obj \
84 $(OUTDIR)/default.obj \
85 $(OUTDIR)/dir.obj \
86 $(OUTDIR)/expand.obj \
87 $(OUTDIR)/file.obj \
88 $(OUTDIR)/function.obj \
89 $(OUTDIR)/getloadavg.obj \
90 $(OUTDIR)/getopt.obj \
91 $(OUTDIR)/getopt1.obj \
92 $(OUTDIR)/hash.obj \
93 $(OUTDIR)/implicit.obj \
94 $(OUTDIR)/job.obj \
95 $(OUTDIR)/main.obj \
96 $(OUTDIR)/misc.obj \
97 $(OUTDIR)/read.obj \
98 $(OUTDIR)/remake.obj \
99 $(OUTDIR)/remote-stub.obj \
100 $(OUTDIR)/rule.obj \
101 $(OUTDIR)/signame.obj \
102 $(OUTDIR)/variable.obj \
103 $(OUTDIR)/version.obj \
104 $(OUTDIR)/vpath.obj \
105 $(OUTDIR)/glob.obj \
106 $(OUTDIR)/fnmatch.obj \
107 $(OUTDIR)/dirent.obj \
108 $(OUTDIR)/pathstuff.obj
109
110$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
111 $(LINK) @<<
112 $(LDFLAGS) $(LIBS) $(OBJS)
113<<
114
115.c{$(OUTDIR)}.obj:
116 $(CC) $(CFLAGS) /c $<
117
118$(OUTDIR)/glob.obj : glob/glob.c
119 $(CC) $(CFLAGS) /c $?
120$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
121 $(CC) $(CFLAGS) /c $?
122$(OUTDIR)/dirent.obj : w32/compat/dirent.c
123 $(CC) $(CFLAGS) /c $?
124$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
125 $(CC) $(CFLAGS) /c $?
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