source: trunk/src/msvcrt/makefile@ 4144

Last change on this file since 4144 was 4069, checked in by phaller, 25 years ago

Restructured

File size: 2.2 KB
Line 
1# $Id: makefile,v 1.18 2000-08-22 08:09:21 phaller 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)\critsec.obj \
31$(OBJDIR)\util.obj \
32$(OBJDIR)\$(TARGET)rsrc.obj \
33$(PDWIN32_LIB)\dllentry.obj
34
35
36!ifndef TARGET
37
38# Dummy all rule - if not both all and lib will be invoked when
39# invoking nmake without a target.
40_all: all
41
42
43# All and lib rules - builds all targets by reinvoking make with target macro set.
44all lib:
45 $(MAKE_CMD) TARGET=msvcrt $@
46 $(MAKE_CMD) TARGET=msvcrt20 $@
47 $(MAKE_CMD) TARGET=msvcrt40 $@
48
49
50!else
51
52
53# Real all rule - build objs, target dll, copies dll to bin and makes libs.
54all: $(OBJDIR) \
55 $(OBJDIR)\$(TARGET).dll \
56 $(PDWIN32_BIN)\$(TARGET).dll \
57 lib
58
59
60# Real lib rule - build importlibrary (and evt. other libs)
61lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
62
63!endif
64
65
66# Dll rule - builds the target dll.
67$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
68 -4 $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
69
70
71# Linker file - creates the parameter file passed on to the linker.
72$(OBJDIR)\$(TARGET).lrf: makefile
73 @echo Creating file <<$@
74/OUT:$(OBJDIR)\$(TARGET).dll
75/MAP:$(OBJDIR)\$(TARGET).map
76$(OBJS)
77$(PDWIN32_LIB)/kernel32.lib
78$(PDWIN32_LIB)/crtdll.lib
79$(PDWIN32_LIB)/$(ODINCRT).lib
80OS2386.LIB
81$(RTLLIB_O)
82$(TARGET).def
83<<keep
84
85
86# Dep rule - makes depenencies for C, C++ and Asm files.
87dep:
88 $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
89 *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
90
91
92# Dummy target used for clean
93!ifndef TARGET
94TARGET = msvcrt
95!endif
96
97
98# Includes the common rules.
99!include $(PDWIN32_INCLUDE)/pdwin32.post
100
Note: See TracBrowser for help on using the repository browser.