Changeset 3031 for trunk/src/odincrt


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/odincrt/makefile

    r2712 r3031  
    1 # $Id: makefile,v 1.16 2000-02-09 23:46:59 bird Exp $
     1# $Id: makefile,v 1.17 2000-03-06 23:38:49 bird Exp $
    22
    33#
    4 # PD-Win32 API
     4# Odin32 API
    55#
    66#       odincrt.dll makefile
    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
     15
     16# Compiler, tools, and interference rules.
    1417!include $(PDWIN32_INCLUDE)/pdwin32.mk
    1518
    16 CXXFLAGS = $(CXXFLAGS_ODINCRT) -I$(PDWIN32_INCLUDE)
     19
     20# Flag overloads and local macros.
     21CLEANEXTRAS = lz32rsrc.asm
     22NOTEXPDEF   = 1
     23
     24CXXFLAGS    = $(CXXFLAGS_ODINCRT)
    1725IMPLIBFLAGS = $(IMPLIBFLAGS) /NOIgnoreCase
    1826
     27!ifdef VAC36
     28RUNTIMELIBDEF   = odin36.def
     29!else
     30RUNTIMELIBDEF   = odincrt.def
     31!endif
     32
     33
     34# Object files. All objects should be prefixed with $(OBJDIR)!
     35OBJS = \
     36$(OBJDIR)\odincrt.obj \
     37$(OBJDIR)\initterm.obj \
     38$(OBJDIR)\malloc.obj \
     39$(OBJDIR)\string.obj \
     40$(OBJDIR)\file.obj
     41
     42
     43# Target name - name of the dll without extention and path.
    1944TARGET = odincrt
    2045
    21 !ifdef VAC36
    22 RUNTIMELIBDEF=odin36.def
    23 !else
    24 RUNTIMELIBDEF=odincrt.def
    25 !endif
    2646
    27 OBJS =  odincrt.obj initterm.obj malloc.obj string.obj file.obj
     47# All rule - build objs, target dll, copies dll to bin and makes libs.
     48all:    $(OBJDIR) \
     49        $(OBJDIR)\$(TARGET).dll \
     50        $(PDWIN32_BIN)\$(TARGET).dll \
     51        lib
    2852
    29 all: $(TARGET).dll $(TARGET).lib
    30 
    31 $(TARGET).dll: $(OBJS) $(RUNTIMELIBDEF)
    32     $(LD) $(LDFLAGS_ODINCRT) -Fm -Fe$@ $(OBJS) $(RUNTIMELIBDEF) $(SOMLIB)
    33     $(CP) $@ $(PDWIN32_BIN)
     53# Lib rule - build importlibrary (and evt. other libs)
     54lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    3455
    3556
    36 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    37 
    38 $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
    39     $(CP) $** $@
    40 
     57# ImpLib rule - build importlibrary (and evt. other libs)
    4158$(TARGET).lib: $(TARGET).def
    4259    $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    43     $(CP) $@ $(PDWIN32_LIB)
    4460
    4561
     62# Dll rule - builds the target dll.
     63$(OBJDIR)\$(TARGET).dll: $(OBJS) $(RUNTIMELIBDEF) $(OBJDIR)\$(TARGET).lrf
     64    $(LD2) $(LD2FLAGS_ODINCRT) @$(OBJDIR)\$(TARGET).lrf
     65
     66
     67# Linker file - creates the parameter file passed on to the linker.
     68$(OBJDIR)\$(TARGET).lrf: makefile
     69    @echo Creating file <<$@
     70/OUT:$(OBJDIR)\$(TARGET).dll
     71/MAP:$(OBJDIR)\$(TARGET).map
     72$(OBJS)
     73$(RUNTIMELIBDEF)
     74<<keep
     75
     76
     77# Dep rule - makes depenencies for C, C++ and Asm files.
    4678dep:
    4779    $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    4880        *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    4981
    50 !ifndef NODEP
    51 !include .depend
    52 !endif
    5382
     83# Includes the common rules.
     84!include $(PDWIN32_INCLUDE)/pdwin32.post
    5485
    55 clean:
    56     $(RM) *.obj *.lib *.dll *.map *.pch \
    57         $(PDWIN32_BIN)\$(TARGET).dll $(PDWIN32_LIB)\$(TARGET).lib
    58 
Note: See TracChangeset for help on using the changeset viewer.