Changeset 4642 for trunk/include


Ignore:
Timestamp:
Nov 20, 2000, 5:58:15 AM (25 years ago)
Author:
bird
Message:

More changes and correction. Tried to sync watcom files.
New tool.

Location:
trunk/include
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/pdwin32.tools

    r4636 r4642  
    1 # $Id: pdwin32.tools,v 1.16 2000-11-19 23:53:46 bird Exp $
     1# $Id: pdwin32.tools,v 1.17 2000-11-20 04:58:14 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    1818!   endif
    1919!endif
     20
    2021
    2122# Check that PDWIN32_INCLUDE is set; set default if not set.
     
    3940DEPEND      = $(PDWIN32_TOOLS)\fastdep.exe -o$$(OBJDIR) -cy+
    4041CREATEPATH  = $(PDWIN32_TOOLS)\CreatePath.cmd
     42EXECEXCL    = $(PDWIN32_TOOLS)\ExecExcl.cmd
    4143
    4244#Svl: Remove this when everything has been converted to the new build rules
  • trunk/include/pdwin32.vac3.dbg

    r4636 r4642  
    1 # $Id: pdwin32.vac3.dbg,v 1.32 2000-11-19 23:53:47 bird Exp $
     1# $Id: pdwin32.vac3.dbg,v 1.33 2000-11-20 04:58:14 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    2828#
    2929CC     = icc
     30CXX    = icc
    3031AS     = alp
    31 CXX    = icc
    3232LD     = icc
    33 LD2    = ilink
     33LD2    = $(EXECEXCL) $(PDWIN32_TOOLS)\ilink.lock.lnk ilink
    3434IMPLIB = implib
    3535ILIB   = ilib
  • trunk/include/pdwin32.vac3.rel

    r4636 r4642  
    1 # $Id: pdwin32.vac3.rel,v 1.30 2000-11-19 23:53:47 bird Exp $
     1# $Id: pdwin32.vac3.rel,v 1.31 2000-11-20 04:58:14 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    3131CXX    = icc
    3232LD     = icc
    33 LD2    = ilink
     33LD2    = $(EXECEXCL) $(PDWIN32_TOOLS)\ilink.lock.lnk ilink
    3434IMPLIB = implib
    3535ILIB   = ilib
  • trunk/include/pdwin32.vac36.dbg

    r4636 r4642  
    1 # $Id: pdwin32.vac36.dbg,v 1.23 2000-11-19 23:53:47 bird Exp $
     1# $Id: pdwin32.vac36.dbg,v 1.24 2000-11-20 04:58:14 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    102102LD2FLAGS         = /nologo /noe /map /packcode /packdata /exepack:2 /dbgpack /nod /debug $(LD2TARGETFLAGS)
    103103LD2FLAGS_ODINCRT = /nologo /noe /map /packcode /packdata /exepack:2 /dbgpack      /debug $(LD2TARGETFLAGS)
    104 
     104!endif
  • trunk/include/pdwin32.wat.dbg

    r4401 r4642  
    1 # $Id: pdwin32.wat.dbg,v 1.5 2000-10-03 05:39:51 bird Exp $
     1# $Id: pdwin32.wat.dbg,v 1.6 2000-11-20 04:58:14 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    55#
    66#
     7#
    78
     9
     10#
     11# Library macros.
     12#
    813SOMLIB   = somtk.lib
    914RTLLIB   = clib3r.lib
    1015RTLLIB_O = clib3r.lib
    1116DLLENTRY = $(PDWIN32_LIB)\dllentry_watcom.obj
     17ODINCRT  = odincrtd
    1218
     19
     20#
     21# Object directory.
     22#
    1323OBJDIR   = .\bin\debug.wat
     24
    1425
    1526#
     
    2637OS2RC  = rc
    2738
    28 ODINCRT = odincrtd
    2939
    3040#
    3141# Tool Flags
    3242#
     43ASFLAGS          = -Mb -Sc -Sv:ALP +Od -D:DEBUG
     44IMPLIBFLAGS      = /nologo
     45ILIBFLAGS        = /quiet /nologo
     46RCFLAGS          = -s -I. -I$(%WATCOM)\include
     47OS2RCFLAGS       = -r -n
     48OS2RCLFLAGS      = -x2 -n
    3349
     50
     51#
    3452# Watcom compiler flags:
    3553# w4            warning level 4
     
    4765# fpi87         inline fpu instructions
    4866# hw            generate Watcom debug information
    49 CFLAGS           = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -br -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__WINE__ -DDEBUG -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    50 CXXFLAGS         = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -br -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__WINE__ -DDEBUG -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    51 CXXFLAGS_ODINCRT = -w4 -wcd=726 -e25 -od -d2 -hw -bm -bd -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -DDEBUG -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    52 CFLAGS_WIN32APP  = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -DDEBUG -D__WIN32OS2__ -D__i386__
    53 CXXFLAGS_WIN32APP= -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -DDEBUG -D__WIN32OS2__ -D__i386__
     67CFLAGS           = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -br -bt=os2 -zq -fp5 -fpi87
     68CXXFLAGS         = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -br -bt=os2 -zq -fp5 -fpi87
     69CXXFLAGS_ODINCRT = -w4 -wcd=726 -e25 -od -d2 -hw -bm -bd -mf -5r -bt=os2 -zq -fp5 -fpi87
     70CFLAGS_WIN32APP  = -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -bt=os2 -zq -fp5 -fpi87
     71CXXFLAGS_WIN32APP= -w4 -wcd=726 -e25 -od -d2 -hw -bm -mf -5r -bt=os2 -zq -fp5 -fpi87
    5472
     73CINCLUDES        = -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE)
     74CDEFINES_WIN32APP= -DDEBUG -D__WIN32OS2__ -D__i386__
     75CDEFINES_ODINCRT = -DDEBUG -D__WIN32OS2__ -D__i386__ -D__WINE__
     76CDEFINES         = -DDEBUG -D__WIN32OS2__ -D__i386__ -D__WINE__ -DTCPV40HDRS -DCOMCTL32UNDOC \
    5577!ifdef DEBUGALL
    56 CFLAGS           += -DDEBUG_ENABLELOG_LEVEL2
    57 CXXFLAGS         += -DDEBUG_ENABLELOG_LEVEL2
     78                   -DDEBUG_ENABLELOG_LEVEL2 \
     79!endif
     80!ifdef NODEBUGINFO
     81                   -DDEFAULT_LOGGING_OFF
    5882!endif
    5983
     
    6690!endif
    6791
    68 !ifdef EXETARGET
     92
     93#
     94# Linker flags.
     95#
    6996LDFLAGS          = option maxe=125, quiet, symfile, nodefaultlibs
    7097LDFLAGS_ODINCRT  = option maxe=125, quiet, symfile
    71 !else
    72 LDFLAGS          = option maxe=125, quiet, symfile, nodefaultlibs
    73 LDFLAGS_ODINCRT  = option maxe=125, quiet, symfile
    74 !endif
    75 
    76 ASFLAGS          = -Mb -Sc -Sv:ALP +Od
    77 IMPLIBFLAGS      = /nologo
    78 ILIBFLAGS        = /quiet /nologo
    79 RCFLAGS          = -s -I. -I$(%WATCOM)\include -I$(PDWIN32_INCLUDE) -I$(PDWIN32_INCLUDE)\win
    80 OS2RCFLAGS       = -r
    81 OS2RCLFLAGS      = -x2 -n
    8298
    8399!ifndef NODEBUGINFO
    84100LDFLAGS          += debug all
    85101LDFLAGS_ODINCRT  += debug all
    86 !else
    87 CFLAGS           += -DDEFAULT_LOGGING_OFF
    88 CXXFLAGS         += -DDEFAULT_LOGGING_OFF
    89102!endif
    90103
  • trunk/include/pdwin32.wat.post

    r4547 r4642  
    1 # $Id: pdwin32.wat.post,v 1.5 2000-11-01 01:34:19 bird Exp $
     1# $Id: pdwin32.wat.post,v 1.6 2000-11-20 04:58:14 bird Exp $
    22#
    33# Odin32 API
     
    99# Define NOTEXPDEF to remove the $(TARGET).lib and $(TARGET)exp.def rules.
    1010# Define EXETARGET to make an executable. (This also applies to pdwin32.mk.)
     11# Define LIBTARGET to make an internal library.
    1112# Define LOCALCLEAN if only the local directory is to be clean.
    1213# Define CLEAN2 to invoke a second clean rule named 'clean2'.
    1314# Define NOCLEAN to exclude the clean rule. (Remember to make your own!)
    1415#
    15 # New style: (define NEW_STYLE)
     16# New style: (!defined OLD_STYLE)
    1617# Define NO_ALL_RULE to not make default all rule.
    1718# Define NO_LIB_RULE to not make default lib rule.
    18 # Define NO_DLL_RULE to not make default dll rule.
    19 # Define NO_EXE_RULE to not make default exe rule.
     19# Define NO_MAIN_RULE to not make default main target rule.
    2020# Define NO_LNKFILE_RULE to not make default link-file rule.
    2121# Define NO_DEP_RULE to not make dependencies rule.
    2222# Define NO_CLEAN_RULE to not make clean rule (same as NOCLEAN - use this!).
     23# Define NO_INTERNAL_LIBS to not include libs rule for subdirectories.
     24# Define NO_MAIN_BIN_COPY to not copy the target and sym file to the main
     25#    binary directory. It is only copied to the compiler specific directory.
     26#    Main bin is /bin. Compiler specific bin is /bin/debug, /bin/debug.vac36, etc.
     27# Define ADDITIONAL_DEP to add dependencies rules.
     28#
     29# Define MAKEFILE if the name of the makefile isn't "makefile".
     30# Define DEFFILE to specify another file than $(TARGET).def or $(ORGTARGET).def.
     31#    Define this if your .exe file have a .def file.
     32# Define OS2RES as the names of the OS/2 .res file to create and link
     33#    with the target .dll or .exe.
     34# Define LIBS as a list of all the libraries to link
     35#    with the target .dll or .exe.
     36# Define SUBDIRS when you have subdirectories which should be made.
     37#    dep and lib supports this fully. The rule libs are added, since we assume you
     38#    makes internal libraries in the subdirectories. The libs rule is one of the
     39#    dependencies of the main target.
    2340#
    2441
    2542!ifndef TARGET_EXTENSION
    26 !ifdef EXETARGET
     43!   ifdef EXETARGET
    2744TARGET_EXTENSION=exe
    28 !else
     45!   else
     46!       ifdef LIBTARGET
     47TARGET_EXTENSION=lib
     48!       else
    2949TARGET_EXTENSION=dll
    30 !endif
    31 !endif
    32 
    33 
    34 !ifdef NEW_STYLE
     50!       endif
     51!   endif
     52!endif
     53
     54
     55!ifndef OLD_STYLE
     56
     57# Set default MAKEFILE if needed
     58!ifndef MAKEFILE
     59MAKEFILE = makefile
     60!endif
     61
     62# Set default ORGTARGET if needed.
     63!ifndef ORGTARGET
     64ORGTARGET=$(TARGET)
     65!endif
     66
     67# Set default DEFFILE if needed. (Currently for dlls only.)
     68!ifndef DEFFILE
     69!   ifndef EXETARGET
     70DEFFILE = $(ORGTARGET).def
     71!   endif
     72!endif
     73
     74# Set INTLIBS (interal) if SUBDIRS is defined and NO_INTERNAL_LIBS is undefined.
     75!ifdef SUBDIRS
     76!   ifndef NO_INTERNAL_LIBS
     77!       ifndef LIBTARGET
     78INTLIBS = libs
     79!       else
     80INTLIBS = libs_sub
     81!       endif
     82!   endif
     83!endif
     84
     85
     86!ifndef LIBTARGET
    3587!ifndef EXETARGET
    36 
    37 
    38 # All rule - build objs, target dll, copies target to bin and makes libs.
     88###############################################################################
     89# DLL Target
     90###############################################################################
     91
     92#
     93# Dll: All rule - build objs, target dll, copies target to bin and makes libs.
     94#
    3995!ifndef NO_ALL_RULE
    4096all:    $(OBJDIR) \
     97        $(INTLIBS) \
    4198        $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION) \
     99        $(OBJDIR)\$(TARGET).sym \
    42100        $(PDWIN32_BIN)\$(TARGET).$(TARGET_EXTENSION) \
     101        $(PDWIN32_BIN)\$(TARGET).sym \
    43102        lib
    44103!endif
    45104
    46 
    47 # Lib rule - build importlibrary (and evt. other libs)
     105#
     106# Dll: Lib rule - build importlibrary (and evt. other libs)
     107#
    48108!ifndef NO_LIB_RULE
    49 lib:    $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    50 !endif
    51 
    52 
    53 # Dll rule - builds the target dll.
    54 !ifndef NO_DLL_RULE
    55 $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION): $(OBJS) $(OBJDIR)\$(TARGET).lnk
    56     $(LD2) @$(OBJDIR)\$(TARGET).lnk
    57 !endif
    58 
    59 
    60 # Linker file - creates the parameter file passed on to the linker.
     109lib:    $(ORGTARGET).lib $(PDWIN32_LIB)\$(ORGTARGET).lib
     110!endif
     111
     112
     113#
     114# Dll: Main target rule - builds the target dll.
     115#
     116!ifndef NO_MAIN_RULE
     117$(OBJDIR)\$(TARGET).$(TARGET_EXTENSION): $(OBJS) $(OS2RES) $(DEFFILE) $(OBJDIR)\$(TARGET).lrf
     118    $(LD2) @$(OBJDIR)\$(TARGET).lrf
     119!ifdef OS2RES
     120    $(OS2RC) $(OS2RCLFLAGS) $(OS2RES) $@
     121!endif
     122!endif
     123
     124
     125#
     126# Dll: Linker file - creates the parameter file passed on to the linker.
     127#
    61128!ifndef NO_LNKFILE_RULE
    62 $(OBJDIR)\$(TARGET).lnk: makefile $(TARGET).def $(PDWIN32_INCLUDE)\pdwin32.wat.post
     129$(OBJDIR)\$(TARGET).lnk: makefile $(DEFFILE) $(PDWIN32_INCLUDE)\pdwin32.wat.post
    63130    $(RM) $(OBJDIR)\$(TARGET).lnk2 $@
    64     $(KDEF2WAT) $(TARGET).def $@ <<$(OBJDIR)\$(TARGET).lnk2
     131    $(KDEF2WAT) $(DEFFILE) $@ <<$(OBJDIR)\$(TARGET).lnk2
    65132$(LD2FLAGS)
    66133name $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION)
     
    72139
    73140
    74 # Dep rule - makes depenencies for C, C++ and Asm files.
    75 !ifndef NO_DEP_RULE
    76 dep:
    77     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    78         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    79 !endif
    80 
    81141!else # !ifndef EXETARGET
    82 
    83 
    84 # All rule - build objs, target exe, copies target to bin.
     142###############################################################################
     143# EXE Target
     144###############################################################################
     145
     146#
     147# Exe: All rule - build objs, target exe, copies target to bin.
     148#
    85149!ifndef NO_ALL_RULE
    86150all:    $(OBJDIR) \
     151        $(INTLIBS) \
    87152        $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION) \
    88         $(PDWIN32_BIN)\$(TARGET).$(TARGET_EXTENSION)
    89 !endif
    90 
    91 
    92 # Lib rule - dummy rule
     153        $(OBJDIR)\$(TARGET).sym \
     154        $(PDWIN32_BIN)\$(TARGET).$(TARGET_EXTENSION) \
     155        $(PDWIN32_BIN)\$(TARGET).sym
     156!endif
     157
     158#
     159# Exe: Lib rule - dummy rule
     160#
    93161!ifndef NO_LIB_RULE
    94162lib:
     
    96164
    97165
    98 # Exe rule - builds the target exe.
    99 !ifndef NO_EXE_RULE
    100 $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION): $(OBJSNOOBJDIR) $(TARGET).def $(OBJDIR)\$(TARGET).lnk
    101     $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lnk
    102 !endif
    103 
    104 
    105 # Linker file - creates the parameter file passed on to the linker.
     166#
     167# Exe: Main target rule - builds the target exe.
     168#
     169!ifndef NO_MAIN_RULE
     170$(OBJDIR)\$(TARGET).$(TARGET_EXTENSION): $(OBJS) $(OS2RES) $(DEFFILE) $(OBJDIR)\$(TARGET).lrf
     171    $(LD2) @$(OBJDIR)\$(TARGET).lrf
     172!ifdef OS2RES
     173    $(OS2RC) $(OS2RCLFLAGS) $(OS2RES) $@
     174!endif
     175!endif
     176
     177
     178#
     179# Exe: Linker file - creates the parameter file passed on to the linker.
     180#
    106181!ifndef NO_LNKFILE_RULE
    107 $(OBJDIR)\$(TARGET).lnk: makefile  $(PDWIN32_INCLUDE)\pdwin32.wat.post
     182$(OBJDIR)\$(TARGET).lnk: makefile  $(PDWIN32_INCLUDE)\pdwin32.wat.post $(DEFFILE)
    108183    $(RM) $(OBJDIR)\$(TARGET).lnk2 $@
    109     $(KDEF2WAT) $(TARGET).def $@ <<$(OBJDIR)\$(TARGET).lnk2
     184    $(KDEF2WAT) $(DEFFILE) $@ <<$(OBJDIR)\$(TARGET).lnk2
    110185$(LD2FLAGS)
    111186name $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION)
     
    116191!endif
    117192
    118 
    119 # Dep rule - makes depenencies for C, C++ and Asm files.
    120 !ifndef NO_DE_PRULE
    121 dep:
    122     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    123         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    124 !endif
    125 
    126 
    127 !endif # EXETARGET
    128 !endif # NEW_STYLE
    129 
    130 
    131 
    132 
    133 # Copy library rule.
    134 !ifndef ORGTARGET
    135 $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
    136 !else
     193!endif # !ifndef EXETARGET !else
     194!else # !ifndef LIBTARGET
     195###############################################################################
     196# LIB target (internal object library)
     197###############################################################################
     198
     199#
     200# Localcleanup is default for internal object libraries.
     201#
     202LOCALCLEAN = 1
     203
     204
     205#
     206# Lib: All rule - build objs and target library.
     207#
     208!ifndef NO_ALL_RULE
     209all:    $(OBJDIR) \
     210        $(INTLIBS) \
     211        $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION)
     212!endif
     213
     214
     215#
     216# Lib: Lib rule - dummy rule
     217#
     218!ifndef NO_LIB_RULE
     219lib:
     220!endif
     221
     222
     223#
     224# Lib: Internal library rule. Same as the all rule.
     225#
     226!ifndef NO_INTERNAL_LIBS
     227libs: all
     228!endif
     229
     230
     231#
     232# Lib: Main target rule - builds the target internal library.
     233#       (fixme)
     234!ifndef NO_MAIN_RULE
     235$(OBJDIR)\$(TARGET).$(TARGET_EXTENSION): $(OBJS)
     236    $(RM) $@
     237    $(ILIB) $(ILIBFLAGS) $@ @<<
     238$(OBJS:  =&^
     239)
     240$(OBJDIR)\$(@B).lst
     241<<
     242!endif
     243
     244
     245!endif # !ifndef LIBTARGET
     246
     247
     248###############################################################################
     249# Common rules for both exe and dll, new style
     250###############################################################################
     251
     252#
     253# Common (new): Dep rule - makes depenencies for C, C++ and Asm files.
     254#
     255!ifndef NO_DEP_RULE
     256dep: dep_internal $(ADDITIONAL_DEP)
     257dep_internal:
     258    $(DEPEND) $(CINCLUDES) *.c *.cpp *.h *.asm *.inc \
     259        *.rc *.dlg $(PDWIN32_INCLUDE)\*.h -robj *.orc
     260!ifdef SUBDIRS
     261    $(DODIRS) "$(SUBDIRS)"  $(MAKE_CMD) dep
     262!endif
     263!endif
     264
     265
     266#
     267# Common: Internal library rule. Make libraries in subdirectories.
     268#   For makefiles with subdirectories is common to have make libraries in subdirectories.
     269#
     270!ifndef NO_INTERNAL_LIBS
     271!ifdef INTLIBS
     272$(INTLIBS):
     273    $(DODIRS) "$(SUBDIRS)"  $(MAKE_CMD) libs
     274!endif
     275!endif
     276
     277!endif # OLD_STYLE
     278
     279###############################################################################
     280# Common rules for both exe and dll, old and new style.
     281###############################################################################
     282
     283#
     284# Common: Copy library rule.
     285#
    137286$(PDWIN32_LIB)\$(ORGTARGET).lib: $(ORGTARGET).lib
    138 !endif
     287    @if not exist $(@D) $(CREATEPATH) $(@D)
    139288    $(CP) $** $@
    140289
    141290
    142 # Copy dll rule.
     291#
     292# Common: Copy dll/exe rule.
     293#
    143294$(PDWIN32_BIN)\$(TARGET).$(TARGET_EXTENSION): $(OBJDIR)\$(TARGET).$(TARGET_EXTENSION)
     295    @if not exist $(@D) $(CREATEPATH) $(@D)
     296    $(CP) $** $@
     297!ifndef NO_MAIN_BIN_COPY
     298    -$(CP) $** $(@D)..\..\$(@F)
     299!endif
     300
     301
     302#
     303# Common: Copy sym rule.
     304#
     305$(PDWIN32_BIN)\$(TARGET).sym: $(OBJDIR)\$(TARGET).sym
     306    @if not exist $(@D) $(CREATEPATH) $(@D)
     307    $(CP) $** $@
     308!ifndef NO_MAIN_BIN_COPY
     309    -$(CP) $** $(@D)..\..\$(@F)
     310!endif
     311
     312
     313#
     314# Common: Make sym file rule.
     315#
     316$(OBJDIR)\$(TARGET).sym: $(OBJDIR)\$(TARGET).map
    144317    cd $(OBJDIR)
    145318    $(MAPSYM) $(TARGET).map
    146319    cd ..\..
    147     $(CP) $(OBJDIR)\$(TARGET).sym $(PDWIN32_BIN)
    148     $(CP) $** $@
    149     -$(CP) $** $(@D)..\..\$(@F)
    150     -$(CP) $(OBJDIR)\$(TARGET).sym $(@D)..\..
    151 
    152 
     320
     321
     322#
     323# Common: Make library from the <>exp.def or the <>.def file.
     324#
    153325!ifndef NOTEXPDEF
    154 # make library from the <>exp.def file.
    155 !ifndef ORGTARGET
    156 $(TARGET).LIB: $(TARGET)exp.def
     326$(ORGTARGET).lib: $(ORGTARGET)exp.def
     327    $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    157328!else
    158 $(ORGTARGET).LIB: $(ORGTARGET)exp.def
    159 !endif
     329$(TARGET).lib: $(DEFFILE)
    160330    $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    161     $(CP) $@ $(PDWIN32_LIB)
    162 
    163 
    164 # make the <>exp.def file.
    165 !ifndef ORGTARGET
    166 $(TARGET)exp.def: $(TARGET).def
    167 !else
    168 $(ORGTARGET)exp.def: $(ORGTARGET).def
    169 !endif
     331!endif
     332
     333
     334#
     335# Common: Make the <>exp.def file.
     336#
     337!ifndef NOTEXPDEF
     338$(ORGTARGET)exp.def: $(DEFFILE)
    170339    $(IMPDEF) $** $@
    171340!endif
    172341
    173342
    174 # Create the object directory.
     343#
     344# Common: Create the object directory.
     345#
    175346$(OBJDIR): .SYMBOLIC
    176     @if not exist bin $(MKDIR) bin
    177     @if not exist $(OBJDIR) $(MKDIR) $(OBJDIR)
    178 
    179 
    180 #
    181 # General clean rule. To clean more add it to CLEANEXTRAS!
     347    @if not exist $(OBJDIR) $(CREATEPATH) $(OBJDIR)
     348
     349
     350#
     351# Common: General clean rule. To clean more add it to CLEANEXTRAS!
    182352#
    183353!ifndef NOCLEAN
    184 !ifndef NO_CLEAN_RULE
    185354!ifndef CLEAN2
    186 clean: .SYMBOLIC
     355clean:
    187356!else
    188357clean:  clean2
    189358!endif
    190     $(RM) *.LIB *.res *.map *.pch *.orc_asm \
     359    $(RM) *.lib *.res *.map *.pch \
    191360!if "$(OBJDIR)" != ""
    192361     $(OBJDIR)\* \
    193362!endif
    194363!ifndef LOCALCLEAN
    195         $(PDWIN32_LIB)\$(TARGET).LIB \
    196         $(TARGET)exp.def \
     364        $(PDWIN32_LIB)\$(ORGTARGET).lib \
     365        $(ORGTARGET)exp.def \
    197366        $(PDWIN32_BIN)\$(TARGET).$(TARGET_EXTENSION) *.$(TARGET_EXTENSION) \
    198367        $(PDWIN32_BIN)\$(TARGET).sym *.sym \
     
    202371!endif
    203372!endif
    204 !endif
    205 
    206 
     373!ifdef SUBDIRS
     374    $(DODIRS) "$(SUBDIRS)"  $(MAKE_CMD) clean
     375!endif
     376
     377
     378#
     379# Common: Include the .depend file.
     380#   If the depend file don't exists we'll complain about it.
     381#
     382#!ifndef NODEP
     383#!   if [$(EXISTS) .depend] == 0
     384#!       include .depend
     385#!   else
     386#!       if [$(ECHO) .depend doesn't exist]
     387#!       endif
     388#!   endif
     389#!endif
     390
  • trunk/include/pdwin32.wat.rel

    r4401 r4642  
    1 # $Id: pdwin32.wat.rel,v 1.3 2000-10-03 05:39:51 bird Exp $
     1# $Id: pdwin32.wat.rel,v 1.4 2000-11-20 04:58:15 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    66#
    77
     8
     9#
     10# Library macros.
     11#
    812SOMLIB   = somtk.lib
    913RTLLIB   = clib3r.lib
    1014RTLLIB_O = clib3r.lib
    1115DLLENTRY = $(PDWIN32_LIB)\dllentry_watcom.obj
     16ODINCRT  = odincrtd
    1217
     18
     19#
     20# Object directory.
     21#
    1322OBJDIR   = .\bin\release.wat
     23
    1424
    1525#
     
    2636OS2RC  = rc
    2737
    28 ODINCRT = odincrtd
    2938
    3039#
    3140# Tool Flags
    3241#
     42ASFLAGS          = -Mb -Sc -Sv:ALP
     43IMPLIBFLAGS      = /nologo
     44ILIBFLAGS        = /quiet /nologo
     45RCFLAGS          = -s -I. -I$(%WATCOM)\include
     46OS2RCFLAGS       = -r -n
     47OS2RCLFLAGS      = -x2 -n
    3348
     49
     50#
    3451# Watcom compiler flags:
    3552# w4            warning level 4
     
    4865# fpi87         inline fpu instructions
    4966# hw            generate Watcom debug information
    50 CFLAGS           = -w4 -wcd=726 -e25 -od -bm -mf -s -5r -br -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__WINE__ -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    51 CXXFLAGS         = -w4 -wcd=726 -e25 -od -bm -mf -s -5r -br -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__WINE__ -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    52 CXXFLAGS_ODINCRT = -w4 -wcd=726 -e25 -od -bm -bd -s -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
    53 CFLAGS_WIN32APP  = -w4 -wcd=726 -e25 -od -bm -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__i386__
    54 CXXFLAGS_WIN32APP= -w4 -wcd=726 -e25 -od -bm -mf -5r -bt=os2 -zq -fp5 -fpi87 -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE) -D__WIN32OS2__ -D__i386__
    55 
    56 LDFLAGS          = option nodefaultlibs, maxe=25, q, symf
    57 LDFLAGS_ODINCRT  = option maxe=25, q, symf
    58 
    59 ASFLAGS          = -Mb -Sc -Sv:ALP +Od
    60 IMPLIBFLAGS      = /nologo
    61 ILIBFLAGS        = /quiet /nologo
    62 RCFLAGS          = -s -I. -I$(%WATCOM)\include -I$(PDWIN32_INCLUDE) -I$(PDWIN32_INCLUDE)\win
    63 OS2RCFLAGS       = -r
     67CFLAGS           = -w4 -wcd=726 -e25 -od -bm -mf -s -5r -br -bt=os2 -zq -fp5 -fpi87
     68CXXFLAGS         = -w4 -wcd=726 -e25 -od -bm -mf -s -5r -br -bt=os2 -zq -fp5 -fpi87
     69CXXFLAGS_ODINCRT = -w4 -wcd=726 -e25 -od -bm -bd -s -mf -5r -bt=os2 -zq -fp5 -fpi87
     70CFLAGS_WIN32APP  = -w4 -wcd=726 -e25 -od -bm -mf -5r -bt=os2 -zq -fp5 -fpi87
     71CXXFLAGS_WIN32APP= -w4 -wcd=726 -e25 -od -bm -mf -5r -bt=os2 -zq -fp5 -fpi87
     72CINCLUDES        = -i$(%WATCOM)\h -i$(PDWIN32_INCLUDE)\Win -i. -i$(PDWIN32_INCLUDE)
     73CDEFINES         = -D__WIN32OS2__ -D__WINE__ -D__i386__ -DTCPV40HDRS -DCOMCTL32UNDOC
     74CDEFINES_ODINCRT = -D__WIN32OS2__ -D__WINE__ -D__i386__
     75CDEFINES_WIN32APP= -D__WIN32OS2__ -D__i386__
    6476
    6577!ifdef EXETARGET
     
    7183!endif
    7284
     85
     86#
     87# Linker flags.
     88#
     89LDFLAGS          = option nodefaultlibs, maxe=25, q, symf
     90LDFLAGS_ODINCRT  = option maxe=25, q, symf
     91
    7392LD2FLAGS         = $(LDFLAGS)
    7493LD2FLAGS_ODINCRT = $(LDFLAGS_ODINCRT)
  • trunk/include/pdwin32.wat.tools

    r4401 r4642  
    1 # $Id: pdwin32.wat.tools,v 1.5 2000-10-03 05:39:51 bird Exp $
     1# $Id: pdwin32.wat.tools,v 1.6 2000-11-20 04:58:15 bird Exp $
    22# ODIN / win32os2 Project
    33#
     
    3434!endif
    3535
    36 MAKE_CMD    = $(MAKE_CMDLINE) -f makefile.os2
     36MAKE_CMD    = $(MAKE_CMDLINE) # -f makefile.os2 # What is this?
    3737
    3838#
     
    4747
    4848.c.obj:   # .AUTODEPEND
    49     $(CC) $(CFLAGS) -fo$(OBJDIR)\$^&.obj $^&.c
     49    $(CC) $(CFLAGS) $(CINCLUDES) $(CDEFINES) -fo$(OBJDIR)\$^&.obj $^&.c
    5050
    5151.cpp.obj: # .AUTODEPEND
    52     $(CXX) $(CXXFLAGS) -fo$(OBJDIR)\$^&.obj $^&.cpp
     52    $(CXX) $(CXXFLAGS) $(CINCLUDES) $(CDEFINES) -fo$(OBJDIR)\$^&.obj $^&.cpp
    5353
    5454.asm.obj:
     
    5656
    5757.orc.orc_asm:
    58     $(RC) $(RCFLAGS) -o $^&.orc_asm $^&.orc
     58    $(RC) $(RCFLAGS) $(CINCLUDES) -o $^&.orc_asm $^&.orc
    5959
    6060.orc_asm.obj:
     
    6262
    6363.orc.obj:
    64     $(RC) $(RCFLAGS) -o $(OBJDIR)\$^&.asm $^&.orc
     64    $(RC) $(RCFLAGS) $(CINCLUDES) -o $(OBJDIR)\$^&.asm $^&.orc
    6565    $(AS) $(ASFLAGS) -Fdo:$(OBJDIR) $(OBJDIR)\$^&.asm
    6666
    6767.rc.res:
    68     $(OS2RC) $(OS2RCFLAGS) $^&.rc
     68    $(OS2RC) $(OS2RCFLAGS) $(CINCLUDES:-I=-i ) $^&.rc
    6969
    70 
Note: See TracChangeset for help on using the changeset viewer.