Changeset 4624 for trunk/src/msvcrt


Ignore:
Timestamp:
Nov 19, 2000, 10:27:40 AM (25 years ago)
Author:
bird
Message:

New makefile style.

Location:
trunk/src/msvcrt
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/makefile

    r4069 r4624  
    1 # $Id: makefile,v 1.18 2000-08-22 08:09:21 phaller Exp $
     1# $Id: makefile,v 1.19 2000-11-19 09:09:12 bird Exp $
    22
    33#
    44# Odin32 API
    55#
    6 #       msvcrt.dll makefile
     6#       msvcrt.dll, msvcrt20.dll and msvcrt40.dll makefile
    77#
    88
    9 # Directory macros.
    10 PDWIN32_INCLUDE = ..\..\include
    11 PDWIN32_LIB     = ..\..\lib
    12 PDWIN32_BIN     = ..\..\$(OBJDIR)
    13 PDWIN32_TOOLS   = ..\..\tools\bin
     9
     10#
     11# Compiler, tools, and interference rules.
     12#
     13!include ../../include/pdwin32.mk
    1414
    1515
    16 # Compiler, tools, and interference rules.
    17 !include $(PDWIN32_INCLUDE)/pdwin32.mk
     16#
     17# Generic rules which forwards to the real makefiles.
     18#   The all rule has to stand alone, else make will make all the rules if it
     19#   is invoked without any target.
     20#
     21_all: all
     22
     23all clean lib:  # add all common rules here
     24    $(MAKE_CMD) -f msvcrt.mak $@
     25    $(MAKE_CMD) -f msvcrt20.mak $@
     26    $(MAKE_CMD) -f msvcrt40.mak $@
    1827
    1928
    20 # Flag overloads and local macros.
    21 CLEANEXTRAS = 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
     29# don't have to make deps more than once.
     30dep:
     31    $(MAKE_CMD) -f msvcrt.mak $@
    2532
    2633
    27 # Object files. All objects should be prefixed with $(OBJDIR)!
    28 OBJS = \
    29 $(OBJDIR)\msvcrt.obj \
    30 $(OBJDIR)\critsec.obj \
    31 $(OBJDIR)\util.obj \
    32 $(OBJDIR)\$(TARGET)rsrc.obj \
    33 $(PDWIN32_LIB)\dllentry.obj
     34#
     35# Do not includes the common rules.
     36#
    3437
    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.
    44 all 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.
    54 all:   $(OBJDIR) \
    55         $(OBJDIR)\$(TARGET).dll \
    56         $(PDWIN32_BIN)\$(TARGET).dll \
    57         lib
    58 
    59 
    60 # Real lib rule - build importlibrary (and evt. other libs)
    61 lib: $(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
    80 OS2386.LIB
    81 $(RTLLIB_O)
    82 $(TARGET).def
    83 <<keep
    84 
    85 
    86 # Dep rule - makes depenencies for C, C++ and Asm files.
    87 dep:
    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
    94 TARGET = msvcrt
    95 !endif
    96 
    97 
    98 # Includes the common rules.
    99 !include $(PDWIN32_INCLUDE)/pdwin32.post
    100 
Note: See TracChangeset for help on using the changeset viewer.