Changeset 3031 for trunk/src/mpr


Ignore:
Timestamp:
Mar 7, 2000, 12:39:20 AM (26 years ago)
Author:
bird
Message:

Makefiles are updated to new style.
Odin32 resource files are renamed to *.orc and most have changed name to avoid
name clashes for object files.

Location:
trunk/src/mpr
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mpr/makefile

    r2712 r3031  
    1 # $Id: makefile,v 1.12 2000-02-09 23:46:58 bird Exp $
     1# $Id: makefile,v 1.13 2000-03-06 23:38:41 bird Exp $
    22
    33#
     
    77#
    88
     9# Directory macros.
    910PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
    12 PDWIN32_TOOLS = ..\..\tools\bin
     11PDWIN32_LIB     = ..\..\lib
     12PDWIN32_BIN     = ..\..\$(OBJDIR)
     13PDWIN32_TOOLS   = ..\..\tools\bin
    1314
    1415
     16# Compiler, tools, and interference rules.
    1517!include $(PDWIN32_INCLUDE)/pdwin32.mk
    1618
     19
     20# Flag overloads and local macros.
     21CLEANEXTRAS = mprrsrc.asm
    1722
    1823CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
     
    2025
    2126
     27# Object files. All objects should be prefixed with $(OBJDIR)!
     28OBJS = \
     29$(OBJDIR)\mpr.obj \
     30$(OBJDIR)\mprrsrc.obj \
     31$(PDWIN32_LIB)/dllentry.obj
     32
     33
     34# Target name - name of the dll without extention and path.
    2235TARGET = mpr
    2336
    24 OBJS =  mpr.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2537
    26 all: $(TARGET).dll $(TARGET).lib
     38# All rule - build objs, target dll, copies dll to bin and makes libs.
     39all:    $(OBJDIR) \
     40        $(OBJDIR)\$(TARGET).dll \
     41        $(PDWIN32_BIN)\$(TARGET).dll \
     42        lib
    2743
    2844
    29 $(TARGET).dll: $(OBJS) $(TARGET).def
    30     $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31           $(PDWIN32_LIB)/kernel32.lib \
    32           $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    33           OS2386.LIB $(RTLLIB_O)
    34     $(CP) $@ $(PDWIN32_BIN)
     45# Lib rule - build importlibrary (and evt. other libs)
     46lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    3547
    3648
    37 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    38 
    39 $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
    40     $(CP) $** $@
    41 
    42 $(TARGET).lib: $(TARGET)exp.def
    43     $(IMPLIB) $(IMPLIBFLAGS) $@ $(TARGET)exp.def
    44     $(CP) $@ $(PDWIN32_LIB)
    45 
    46 $(TARGET)exp.def: $(TARGET).def
    47     $(IMPDEF) $** $@
    48 
    49 resource.asm: $(TARGET).rc
    50     $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     49# Dll rule - builds the target dll.
     50$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
     51    $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
    5152
    5253
     54# Linker file - creates the parameter file passed on to the linker.
     55$(OBJDIR)\$(TARGET).lrf: makefile
     56    @echo Creating file <<$(OBJDIR)\$(@B).lrf
     57/OUT:$(OBJDIR)\$(TARGET).dll
     58/MAP:$(OBJDIR)\$(TARGET).map
     59$(OBJS)
     60$(PDWIN32_LIB)/kernel32.lib
     61$(PDWIN32_LIB)/user32.lib
     62$(PDWIN32_LIB)/odincrt.lib
     63OS2386.LIB
     64$(RTLLIB_O)
     65$(TARGET).def
     66<<keep
     67
     68
     69
     70# Dep rule - makes depenencies for C, C++ and Asm files.
    5371dep:
    5472    $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    5573        *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    5674
    57 !ifndef NODEP
    58 !include .depend
    59 !endif
     75# Includes the common rules.
     76!include $(PDWIN32_INCLUDE)/pdwin32.post
    6077
    61 
    62 clean:
    63     $(RM) *.obj *.lib *.dll *~ *.map *.pch \
    64         $(PDWIN32_BIN)\$(TARGET).dll $(PDWIN32_LIB)\$(TARGET).lib \
    65         resource.asm $(TARGET)exp.def
    66 
Note: See TracChangeset for help on using the changeset viewer.