Ignore:
Timestamp:
Sep 28, 2000, 5:16:25 AM (25 years ago)
Author:
bird
Message:

Support for new makefile style.
Changed watcom. Nows uses UNIX compatible mode rather than M$.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/pdwin32.wat.post

    r4288 r4334  
    1 # $Id: pdwin32.wat.post,v 1.2 2000-09-21 11:17:28 bird Exp $
     1# $Id: pdwin32.wat.post,v 1.3 2000-09-28 03:16:24 bird Exp $
    22#
    33# Odin32 API
     
    1313# Define NOCLEAN to exclude the clean rule. (Remember to make your own!)
    1414#
     15# New style: (define NEW_STYLE)
     16# Define NO_ALL_RULE to not make default all rule.
     17# 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.
     20# Define NO_LNKFILE_RULE to not make default link-file rule.
     21# Define NO_DEP_RULE to not make dependencies rule.
     22# Define NO_CLEAN_RULE to not make clean rule (same as NOCLEAN - use this!).
     23#
     24
     25
     26!ifdef NEW_STYLE
     27!ifndef EXETARGET
     28
     29
     30# All rule - build objs, target dll, copies target to bin and makes libs.
     31!ifndef NO_ALL_RULE
     32all:    $(OBJDIR) \
     33        $(OBJDIR)\$(TARGET).dll \
     34        $(PDWIN32_BIN)\$(TARGET).dll \
     35        lib
     36!endif
     37
     38
     39# Lib rule - build importlibrary (and evt. other libs)
     40!ifndef NO_LIB_RULE
     41lib:    $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
     42!endif
     43
     44
     45# Dll rule - builds the target dll.
     46!ifndef NO_DLL_RULE
     47$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
     48    $(LD2) @$(OBJDIR)\$(TARGET).lrf
     49!endif
     50
     51
     52# Linker file - creates the parameter file passed on to the linker.
     53!ifndef NO_LNKFILE_RULE
     54$(OBJDIR)\$(TARGET).lrf: makefile  $(PDWIN32_INCLUDE)\pdwin32.wat.post
     55    @$(RM) $@
     56    @echo Creating file <<$@
     57$(LD2FLAGS)
     58name $(OBJDIR)\$(TARGET).dll
     59option map=$(OBJDIR)\$(TARGET).map
     60file    {$(OBJS)}
     61library {$(LIBS)}
     62<<keep
     63# $(TARGET).def
     64# $(TARGET).map
     65!endif
     66
     67
     68# Dep rule - makes depenencies for C, C++ and Asm files.
     69!ifndef NO_DEP_RULE
     70dep:
     71    $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
     72        *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
     73!endif
     74
     75!else # !ifndef EXETARGET
     76
     77
     78# All rule - build objs, target exe, copies target to bin.
     79!ifndef NO_ALL_RULE
     80all:    $(OBJDIR) \
     81        $(OBJDIR)\$(TARGET).exe \
     82        $(PDWIN32_BIN)\$(TARGET).exe
     83!endif
     84
     85
     86# Lib rule - dummy rule
     87!ifndef NO_LIB_RULE
     88lib:
     89!endif
     90
     91
     92# Exe rule - builds the target exe.
     93!ifndef NO_EXE_RULE
     94$(OBJDIR)\$(TARGET).exe: $(OBJSNOOBJDIR) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
     95    $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
     96!endif
     97
     98
     99# Linker file - creates the parameter file passed on to the linker.
     100!ifndef NO_LNKFILE_RULE
     101$(OBJDIR)\$(TARGET).lrf: makefile  $(PDWIN32_INCLUDE)\pdwin32.wat.post
     102    @echo Creating file <<$@
     103/OUT:$(OBJDIR)\$(TARGET).exe
     104/MAP:$(OBJDIR)\$(TARGET).map
     105$(OBJS)
     106$(LIBS)
     107$(TARGET).def
     108<<keep
     109!endif
     110
     111
     112# Dep rule - makes depenencies for C, C++ and Asm files.
     113!ifndef NO_DE_PRULE
     114dep:
     115    $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
     116        *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
     117!endif
     118
     119
     120!endif # EXETARGET
     121!endif # NEW_STYLE
     122
     123
    15124
    16125
     
    35144    $(CP) $(OBJDIR)\$(TARGET).sym $(PDWIN32_BIN)
    36145    $(CP) $** $@
    37     $(CP) $** $(@D)..\..\$(@F)
    38     $(CP) $(OBJDIR)\$(TARGET).sym $(@D)..\..
     146    -$(CP) $** $(@D)..\..\$(@F)
     147    -$(CP) $(OBJDIR)\$(TARGET).sym $(@D)..\..
    39148
    40149
     
    70179#
    71180!ifndef NOCLEAN
     181!ifndef NO_CLEAN_RULE
    72182!ifndef CLEAN2
    73183clean: .SYMBOLIC
     
    75185clean:  clean2
    76186!endif
    77     $(RM) *.LIB *.res *.map *.pch \
     187    $(RM) *.LIB *.res *.map *.pch *.orc_asm \
    78188!if "$(OBJDIR)" != ""
    79189     $(OBJDIR)\* \
     
    91201!endif
    92202!endif
    93 
    94 
     203!endif
     204
     205
Note: See TracChangeset for help on using the changeset viewer.