277 lines
6.4 KiB
Plaintext
277 lines
6.4 KiB
Plaintext
|
####
|
||
|
# makefile.sub - Subdirectory-specific makefile for new VCRT build process
|
||
|
#
|
||
|
# Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
|
||
|
#
|
||
|
# Purpose:
|
||
|
# This makefile builds the C++ runtimes for Multi-thread, Single-Thread
|
||
|
# and DLL.
|
||
|
#
|
||
|
# This is a general-purpose makefile. It is !INCLUDEd by the makefile
|
||
|
# in each subdirectory (hence the .SUB extension). All subdirectory-
|
||
|
# specific make information should be embedded in the SOURCES file in
|
||
|
# that subdirectory, not in this file.
|
||
|
#
|
||
|
# Change to the appropriate subdirectory and type NMAKE DEPEND to
|
||
|
# rebuild the dependencies. These are stored in DEPEND.DEF in each
|
||
|
# subdirectory.
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
# STRIPLIN=2
|
||
|
## Change this to BLD_ASM=1 if you have MASM 6.11a or later and wish
|
||
|
## to re-build the assembler sources provided in this release.
|
||
|
#
|
||
|
#BLD_ASM=0
|
||
|
# STRIPLIN=0
|
||
|
BLD_ASM=1
|
||
|
# STRIPLIN=1
|
||
|
|
||
|
#
|
||
|
# Macro definitions:
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
#
|
||
|
# Add .S and .I suffixes for assembler files on platforms other than x86
|
||
|
#
|
||
|
|
||
|
.SUFFIXES: .s .i
|
||
|
|
||
|
DBFLAGS = -Zi
|
||
|
|
||
|
!if "$(BLD_DBG)" == "1"
|
||
|
CFLAGS=$(CFLAGS) $(DBFLAGS) -D_DEBUG -Od
|
||
|
!if "$(TARGET_CPU)"!="PPC" && "$(TARGET_CPU)"!="IA64"
|
||
|
AFLAGS=$(AFLAGS) -Zi -D_DEBUG
|
||
|
!endif
|
||
|
!else
|
||
|
CFLAGS=$(CFLAGS) -O1
|
||
|
!if "$(TARGET_CPU)"=="IA64"
|
||
|
CFLAGS=$(CFLAGS) -Zx
|
||
|
!endif
|
||
|
# STRIPLIN=0
|
||
|
!if "$(BLD_BBT)" == "1" || "$(BLD_REL_NO_DBINFO)" != "1"
|
||
|
CFLAGS=$(CFLAGS) $(DBFLAGS)
|
||
|
!if "$(TARGET_CPU)"!="PPC" && "$(TARGET_CPU)"!="IA64"
|
||
|
AFLAGS=$(AFLAGS) -Zi
|
||
|
!endif
|
||
|
!endif
|
||
|
# STRIPLIN=1
|
||
|
!endif
|
||
|
|
||
|
!if "$(BLD_BROWSE)" == "1"
|
||
|
CFLAGS=-FR$(OBJDIR)\ $(CFLAGS)
|
||
|
!if "$(TARGET_CPU)"!="PPC" && "$(TARGET_CPU)"!="IA64"
|
||
|
AFLAGS=-FR$(OBJDIR)\ $(AFLAGS)
|
||
|
!endif
|
||
|
!endif
|
||
|
|
||
|
# Tool definitions:
|
||
|
|
||
|
CC=cl
|
||
|
LIB=link -lib -nologo
|
||
|
!if "$(TARGET_CPU)"=="i386"
|
||
|
AS=ml
|
||
|
!elseif "$(TARGET_CPU)"=="IA64"
|
||
|
AS=ias
|
||
|
ACFLAGS= -D__assembler
|
||
|
CFLAGS=$(CFLAGS) -Wp64 -QIA64_A0 -DCC_P7_SOFT25
|
||
|
AFLAGS=$(AFLAGS) -N so -X explicit
|
||
|
!elseif "$(TARGET_CPU)"=="ALPHA"
|
||
|
AS=asaxp -Ialpha $(ML)
|
||
|
!elseif "$(TARGET_CPU)"=="ALPHA64"
|
||
|
CC=$(CC) -Ap64
|
||
|
AS=asaxp -Iaxp64 -Ialpha $(ML) -Ap64 -D_AXP64_
|
||
|
CFLAGS=$(CFLAGS) -Wp64
|
||
|
!elseif "$(TARGET_CPU)"=="PPC"
|
||
|
AS=pas
|
||
|
!else
|
||
|
AS=cl
|
||
|
!endif
|
||
|
|
||
|
# ******** STRIPLIN=0 ********
|
||
|
LIB=$(LIB) -ignore:4006
|
||
|
# ******** STRIPLIN=1 ********
|
||
|
|
||
|
#
|
||
|
# Source file definitions:
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
A_INCLUDES=-I../h -I.
|
||
|
C_INCLUDES=-I../h
|
||
|
|
||
|
#
|
||
|
# Inference rules:
|
||
|
#
|
||
|
# (Due to the kind of dependencies used below, we must explicitly define
|
||
|
# inference rules to effect construction of the object files.)
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
CXXFLAGS=$(CFLAGS) -GR -GX -d1Binl
|
||
|
|
||
|
!if "$(POST_BLD)"!="1"
|
||
|
CXXFLAGS=$(CXXFLAGS) -I../stdhpp
|
||
|
!endif
|
||
|
|
||
|
|
||
|
#
|
||
|
# Rules for end-user source build
|
||
|
#
|
||
|
#
|
||
|
# LSOURCES will override A_INCLUDES and C_INCLUDES for conv/ and tran/ subdirs.
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
!if "$(POST_BLD)"=="1"
|
||
|
!INCLUDE makefile.inc
|
||
|
!else
|
||
|
!INCLUDE lsources.
|
||
|
!endif
|
||
|
|
||
|
.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!if "$(TARGET_CPU)"=="ALPHA"
|
||
|
|
||
|
{alpha}.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="ALPHA64"
|
||
|
|
||
|
{alpha}.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{axp64}.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="i386"
|
||
|
|
||
|
{i386}.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="IA64"
|
||
|
|
||
|
{ia64}.c{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="mips"
|
||
|
|
||
|
{mips}.c{$(OBJDIR)}.obj:
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="PPC"
|
||
|
|
||
|
{ppc}.c{$(OBJDIR)}.obj:
|
||
|
$(CC) $(CFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!endif
|
||
|
|
||
|
.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!if "$(TARGET_CPU)"=="ALPHA"
|
||
|
|
||
|
{alpha}.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{alpha}.s{$(OBJDIR)}.obj:
|
||
|
$(AS) $(AFLAGS) $(A_INCLUDES) -Fo $@ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="ALPHA64"
|
||
|
|
||
|
{alpha}.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{axp64}.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{alpha}.s{$(OBJDIR)}.obj:
|
||
|
$(AS) $(AFLAGS) $(A_INCLUDES) -Fo $@ $<
|
||
|
|
||
|
{axp64}.s{$(OBJDIR)}.obj:
|
||
|
$(AS) $(AFLAGS) $(A_INCLUDES) -Fo $@ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="i386"
|
||
|
|
||
|
{i386}.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!IF $(BLD_ASM)==1
|
||
|
|
||
|
{i386}.asm{$(OBJDIR)}.obj:
|
||
|
!if "$(POST_BLD)"=="1" # STRIPLIN!
|
||
|
$(AS) $(AFLAGS) $(A_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
# STRIPLIN=0
|
||
|
!else
|
||
|
$(AS) $(AFLAGS) $(A_INCLUDES) -Fo$(OBJDIR)\ $(MAKEDIR)\$<
|
||
|
!endif
|
||
|
# STRIPLIN=1
|
||
|
|
||
|
!ENDIF
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="IA64"
|
||
|
|
||
|
{ia64}.cpp{$(OBJDIR)}.obj::
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{ia64}.s{$(OBJDIR)}.obj:
|
||
|
$(CC) -E $(CFLAGS) $(ACFLAGS) $(A_INCLUDES) $< > $*.i
|
||
|
$(AS) $(AFLAGS) -o$(OBJDIR)\$(@F) $*.i
|
||
|
del $*.i
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="mips"
|
||
|
|
||
|
{mips}.cpp{$(OBJDIR)}.obj:
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{mips}.s{$(OBJDIR)}.obj:
|
||
|
$(CC) $(CFLAGS) /QMmips3 $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
!elseif "$(TARGET_CPU)"=="PPC"
|
||
|
|
||
|
{ppc}.cpp{$(OBJDIR)}.obj:
|
||
|
$(CC) $(CXXFLAGS) $(C_INCLUDES) -Fo$(OBJDIR)\ $<
|
||
|
|
||
|
{ppc}.s{$(OBJDIR)}.obj:
|
||
|
$(CC) -E $(CFLAGS) $(A_INCLUDES) $< > $(OBJDIR)\$(<F)
|
||
|
$(AS) $(AFLAGS) -o $@ $(OBJDIR)\$(<F)
|
||
|
del $(OBJDIR)\$(<F)
|
||
|
|
||
|
!endif
|
||
|
|
||
|
#
|
||
|
# Dependencies:
|
||
|
#
|
||
|
# NOTE: The inference rules cause the targets to actually be built; no
|
||
|
# commands are necessary below.
|
||
|
#
|
||
|
###############################################################################
|
||
|
|
||
|
$(OBJDIR)\$(CURDIR).lib: $(OBJS) $(OBJS_NOT_IN_LIB) $(OBJDIR)\$(CURDIR).rsp
|
||
|
!if "$(PRE_BLD)"=="1" && "$(DEVBUILD)"!="1"
|
||
|
sed -f %CRT_BUILDDIR%\crt\prebuild\tools\win32\newline.sed $(OBJDIR)\$(CURDIR).rsp | sed -f %CRT_BUILDDIR%\crt\prebuild\tools\win32\delblank.sed >> temp.lst
|
||
|
for /F %i in (temp.lst) do @%CRT_BUILDDIR%\crt\prebuild\libw32\tools\$(HOST_CPU)\whackline %i
|
||
|
del temp.lst
|
||
|
!endif
|
||
|
$(LIB) -out:$@ @$(OBJDIR)\$(CURDIR).rsp
|
||
|
|
||
|
|
||
|
$(OBJDIR)\$(CURDIR).rsp: lsources
|
||
|
@echo Creating response file: <<$(OBJDIR)\$(CURDIR).rsp
|
||
|
$(OBJS)
|
||
|
<<keep
|
||
|
|
||
|
|
||
|
!IF EXIST(special.mak)
|
||
|
! INCLUDE special.mak # Include special makefile additions, if any
|
||
|
!ENDIF
|
||
|
|
||
|
!IF EXIST(depend.def)
|
||
|
! INCLUDE depend.def # Include dependencies on .h files
|
||
|
!ENDIF
|
||
|
|
||
|
#<eof>
|