source: trunk/src/msvcrt/makefile@ 3136

Last change on this file since 3136 was 3037, checked in by bird, 26 years ago

Corrections.

File size: 2.2 KB
Line 
1# $Id: makefile,v 1.15 2000-03-07 11:08:46 bird Exp $
2
3#
4# Odin32 API
5#
6# msvcrt.dll makefile
7#
8
9# Directory macros.
10PDWIN32_INCLUDE = ..\..\include
11PDWIN32_LIB = ..\..\lib
12PDWIN32_BIN = ..\..\$(OBJDIR)
13PDWIN32_TOOLS = ..\..\tools\bin
14
15
16# Compiler, tools, and interference rules.
17!include $(PDWIN32_INCLUDE)/pdwin32.mk
18
19
20# Flag overloads and local macros.
21CLEANEXTRAS = msvcrtrsrc.asm msvcrt20rsrc.asm msvcrt40rsrc.asm \
22 $(PDWIN32_BIN)\msvcrt.dll $(PDWIN32_LIB)\msvcrt.lib \
23 $(PDWIN32_BIN)\msvcrt20.dll $(PDWIN32_LIB)\msvcrt20.lib \
24 $(PDWIN32_BIN)\msvcrt40.dll $(PDWIN32_LIB)\msvcrt40.lib
25
26
27# Object files. All objects should be prefixed with $(OBJDIR)!
28OBJS = \
29$(OBJDIR)\msvcrt.obj \
30$(OBJDIR)\$(TARGET)rsrc.obj \
31$(PDWIN32_LIB)\dllentry.obj
32
33
34!ifndef TARGET
35
36# Dummy all rule - if not both all and lib will be invoked when
37# invoking nmake without a target.
38_all: all
39
40
41# All and lib rules - builds all targets by reinvoking make with target macro set.
42all lib:
43 $(MAKE_CMD) TARGET=msvcrt $@
44 $(MAKE_CMD) TARGET=msvcrt20 $@
45 $(MAKE_CMD) TARGET=msvcrt40 $@
46
47
48!else
49
50
51# Real all rule - build objs, target dll, copies dll to bin and makes libs.
52all: $(OBJDIR) \
53 $(OBJDIR)\$(TARGET).dll \
54 $(PDWIN32_BIN)\$(TARGET).dll \
55 lib
56
57
58# Real lib rule - build importlibrary (and evt. other libs)
59lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
60
61!endif
62
63
64# Dll rule - builds the target dll.
65$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
66 -4 $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
67
68
69# Linker file - creates the parameter file passed on to the linker.
70$(OBJDIR)\$(TARGET).lrf: makefile
71 @echo Creating file <<$@
72/OUT:$(OBJDIR)\$(TARGET).dll
73/MAP:$(OBJDIR)\$(TARGET).map
74$(OBJS)
75$(PDWIN32_LIB)/kernel32.lib
76$(PDWIN32_LIB)/crtdll.lib
77$(PDWIN32_LIB)/odincrt.lib
78OS2386.LIB
79$(RTLLIB_O)
80$(TARGET).def
81<<keep
82
83
84# Dep rule - makes depenencies for C, C++ and Asm files.
85dep:
86 $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
87 *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
88
89
90# Dummy target used for clean
91!ifndef TARGET
92TARGET = msvcrt
93!endif
94
95
96# Includes the common rules.
97!include $(PDWIN32_INCLUDE)/pdwin32.post
98
Note: See TracBrowser for help on using the repository browser.