[3064] | 1 | # $Id: pdwin32.post,v 1.8 2000-03-09 19:41:20 sandervl Exp $
|
---|
[3019] | 2 | #
|
---|
[3032] | 3 | # Odin32 API
|
---|
[3019] | 4 | #
|
---|
[3032] | 5 | # Common dll makefile rules (must be included at the last line of the makefile)
|
---|
[3019] | 6 | #
|
---|
[3032] | 7 | # If ORGTARGET is defined it is used to generate the importlibrary.
|
---|
| 8 | #
|
---|
| 9 | # Define NOTEXPDEF to remove the $(TARGET).lib and $(TARGET)exp.def rules.
|
---|
| 10 | # Define EXETARGET to make an executable. (This also applies to pdwin32.mk.)
|
---|
| 11 | # Define LOCALCLEAN if only the local directory is to be clean.
|
---|
| 12 | # Define CLEAN2 to invoke a second clean rule named 'clean2'.
|
---|
| 13 | #
|
---|
[3019] | 14 |
|
---|
| 15 |
|
---|
[3032] | 16 | # Copy library rule.
|
---|
| 17 | !ifndef ORGTARGET
|
---|
[3019] | 18 | $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
|
---|
[3032] | 19 | !else
|
---|
| 20 | $(PDWIN32_LIB)\$(ORGTARGET).lib: $(ORGTARGET).lib
|
---|
| 21 | !endif
|
---|
[3019] | 22 | $(CP) $** $@
|
---|
| 23 |
|
---|
[3032] | 24 |
|
---|
| 25 | # Copy dll rule.
|
---|
| 26 | !ifndef EXETARGET
|
---|
| 27 | $(PDWIN32_BIN)\$(TARGET).dll: $(OBJDIR)\$(TARGET).dll
|
---|
| 28 | !else
|
---|
| 29 | $(PDWIN32_BIN)\$(TARGET).exe: $(OBJDIR)\$(TARGET).exe
|
---|
| 30 | !endif
|
---|
| 31 | $(CP) $** $@
|
---|
[3038] | 32 | $(CP) $** $(@D)..\..\$(@F)
|
---|
[3032] | 33 |
|
---|
| 34 |
|
---|
| 35 | !ifndef NOTEXPDEF
|
---|
| 36 | # make library from the <>exp.def file.
|
---|
| 37 | !ifndef ORGTARGET
|
---|
[3019] | 38 | $(TARGET).LIB: $(TARGET)exp.def
|
---|
[3032] | 39 | !else
|
---|
| 40 | $(ORGTARGET).LIB: $(ORGTARGET)exp.def
|
---|
| 41 | !endif
|
---|
| 42 | $(IMPLIB) $(IMPLIBFLAGS) $@ $**
|
---|
[3019] | 43 | $(CP) $@ $(PDWIN32_LIB)
|
---|
| 44 |
|
---|
[3032] | 45 |
|
---|
| 46 | # make the <>exp.def file.
|
---|
| 47 | !ifndef ORGTARGET
|
---|
[3019] | 48 | $(TARGET)exp.def: $(TARGET).def
|
---|
[3032] | 49 | !else
|
---|
| 50 | $(ORGTARGET)exp.def: $(ORGTARGET).def
|
---|
| 51 | !endif
|
---|
[3019] | 52 | $(IMPDEF) $** $@
|
---|
[3032] | 53 | !endif
|
---|
[3019] | 54 |
|
---|
[3032] | 55 |
|
---|
| 56 | # Create the object directory.
|
---|
[3019] | 57 | $(OBJDIR):
|
---|
[3032] | 58 | @if not exist bin $(MKDIR) bin
|
---|
| 59 | @if not exist $(OBJDIR) $(MKDIR) $(OBJDIR)
|
---|
[3019] | 60 |
|
---|
[3032] | 61 |
|
---|
| 62 | #
|
---|
| 63 | # General clean rule. To clean more add it to CLEANEXTRAS!
|
---|
| 64 | #
|
---|
| 65 | !ifndef CLEAN2
|
---|
[3019] | 66 | clean:
|
---|
[3032] | 67 | !else
|
---|
| 68 | clean: clean2
|
---|
| 69 | !endif
|
---|
[3053] | 70 | $(RM) *.LIB *.res *.map *.pch \
|
---|
| 71 | !if "$(OBJDIR)" != ""
|
---|
| 72 | $(OBJDIR)\* \
|
---|
| 73 | !endif
|
---|
[3032] | 74 | !ifndef LOCALCLEAN
|
---|
| 75 | $(PDWIN32_LIB)\$(TARGET).LIB \
|
---|
| 76 | !ifndef EXETARGET
|
---|
| 77 | $(PDWIN32_BIN)\$(TARGET).dll $(TARGET)exp.def *.dll \
|
---|
| 78 | !else
|
---|
| 79 | $(PDWIN32_BIN)\$(TARGET).exe *.exe \
|
---|
| 80 | !endif
|
---|
| 81 | $(CLEANEXTRAS)
|
---|
| 82 | !else
|
---|
| 83 | $(CLEANEXTRAS)
|
---|
| 84 | !endif
|
---|
| 85 |
|
---|
| 86 |
|
---|
[3055] | 87 | #
|
---|
| 88 | # Include the .depend file.
|
---|
| 89 | # If the depend file don't exists we'll make it!
|
---|
| 90 | #
|
---|
[3032] | 91 | !ifndef NODEP
|
---|
[3064] | 92 | ! if [$(EXISTS) .depend] == 0
|
---|
[3055] | 93 | ! include .depend
|
---|
[3064] | 94 | ! else
|
---|
| 95 | ! if [$(ECHO) .depend doesn't exist]
|
---|
| 96 | ! endif
|
---|
| 97 | ! endif
|
---|
[3032] | 98 | !endif
|
---|