Changeset 4624 for trunk/src/peldr


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

New makefile style.

Location:
trunk/src/peldr
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/peldr/makefile

    r4501 r4624  
    1 # $Id: makefile,v 1.17 2000-10-20 11:45:25 sandervl Exp $
     1# $Id: makefile,v 1.18 2000-11-19 08:57:04 bird Exp $
    22
    33#
    44# Odin32 API
    55#
    6 #       pe.exe makefile
     6#       pe.exe and pec.exe makefile
    77#
    88
    9 # Tell that we're producing an executable
    10 EXETARGET = 1
    119
    12 # Directory macros.
    13 PDWIN32_INCLUDE = ..\..\include
    14 PDWIN32_LIB     = ..\..\lib
    15 PDWIN32_BIN     = ..\..\$(OBJDIR)
    16 PDWIN32_TOOLS   = ..\..\tools\bin
     10#
     11# Compiler, tools, and interference rules.
     12#
     13!include ../../include/pdwin32.mk
    1714
    1815
    19 # Compiler, tools, and interference rules.
    20 !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:  # add all common rules here
     24    $(MAKE_CMD) -f pe.mak $@
     25    $(MAKE_CMD) -f pec.mak $@
    2126
    2227
    23 # Flag overloads and local macros.
    24 CLEANEXTRAS = $(PDWIN32_BIN)\$(TARGET).exe
     28# don't have to make deps more than once.
     29dep:
     30    $(MAKE_CMD) -f pe.mak $@
    2531
    2632
    27 # Object files. All objects should be prefixed with $(OBJDIR)!
    28 OBJS = $(OBJDIR)\pe.obj
    29 OBJS1= $(OBJDIR)\pec.obj
    30 
    31 # Target name - name of the dll without extention and path.
    32 TARGET  = pe
    33 TARGET1 = pec
    34 
    35 # All rule - build objs, target dll, copies dll to bin and makes libs.
    36 all:    $(OBJDIR) \
    37         $(OBJDIR)\$(TARGET).exe \
    38         $(PDWIN32_BIN)\$(TARGET).exe \
    39         $(OBJDIR)\$(TARGET1).exe \
    40         $(PDWIN32_BIN)\$(TARGET1).exe
    41 
    42 
    43 # Lib rule - dummy rule.
     33# dummy rule.
    4434lib:
    4535
    4636
    47 # Exe rule - builds the target exe.
    48 $(OBJDIR)\$(TARGET).exe: $(OBJS) $(OBJDIR)\$(TARGET).lrf
    49     $(LD2) $(LD2FLAGS_ODINCRT) @$(OBJDIR)\$(TARGET).lrf
     37#
     38# Do not includes the common rules.
     39#
    5040
    51 $(OBJDIR)\$(TARGET1).exe: $(OBJS1) $(OBJDIR)\$(TARGET1).lrf
    52     $(LD2) $(LD2FLAGS_ODINCRT) @$(OBJDIR)\$(TARGET1).lrf
    53 
    54 $(PDWIN32_BIN)\$(TARGET1).exe: $(OBJDIR)\$(TARGET1).exe
    55     cd $(OBJDIR)
    56     $(MAPSYM) $(TARGET1).map
    57     cd ..\..
    58     $(CP) $(OBJDIR)\$(TARGET1).sym $(PDWIN32_BIN)
    59     $(CP) $** $@
    60     -$(CP) $** $(@D)..\..\$(@F)
    61     -$(CP) $(OBJDIR)\$(TARGET1).sym $(@D)..\..
    62 
    63 $(OBJDIR)\pec.obj:   pe.cpp
    64     $(CC) -C $(CXXFLAGS) -DCOMMAND_LINE_VERSION -Fo$@ pe.cpp
    65 
    66 # Linker file - creates the parameter file passed on to the linker.
    67 $(OBJDIR)\$(TARGET).lrf: makefile
    68     @echo Creating file <<$@
    69 /OUT:$(OBJDIR)\$(TARGET).exe
    70 /MAP:$(OBJDIR)\$(TARGET).map
    71 /PMTYPE:pm
    72 /STACK:0x100000
    73 /NOBASE
    74 $(OBJS)
    75 os2386.lib
    76 <<keep
    77 
    78 
    79 $(OBJDIR)\$(TARGET1).lrf: makefile
    80     @echo Creating file <<$@
    81 /OUT:$(OBJDIR)\$(TARGET1).exe
    82 /MAP:$(OBJDIR)\$(TARGET1).map
    83 /PMTYPE:vio
    84 /STACK:0x100000
    85 /NOBASE
    86 $(OBJS1)
    87 os2386.lib
    88 <<keep
    89 
    90 # Dep rule - makes depenencies for C, C++ and Asm files.
    91 dep:
    92     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    93         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    94 
    95 
    96 # Includes the common rules.
    97 !include $(PDWIN32_INCLUDE)/pdwin32.post
    98 
Note: See TracChangeset for help on using the changeset viewer.