1 | # $Id: pdwin32.post,v 1.10 2000-05-13 14:46:21 bird Exp $
|
---|
2 | #
|
---|
3 | # Odin32 API
|
---|
4 | #
|
---|
5 | # Common dll makefile rules (must be included at the last line of the makefile)
|
---|
6 | #
|
---|
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 | #
|
---|
14 |
|
---|
15 |
|
---|
16 | # Copy library rule.
|
---|
17 | !ifndef ORGTARGET
|
---|
18 | $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
|
---|
19 | !else
|
---|
20 | $(PDWIN32_LIB)\$(ORGTARGET).lib: $(ORGTARGET).lib
|
---|
21 | !endif
|
---|
22 | $(CP) $** $@
|
---|
23 |
|
---|
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 | cd $(OBJDIR)
|
---|
32 | $(MAPSYM) $(TARGET).map
|
---|
33 | cd ..\..
|
---|
34 | $(CP) $(OBJDIR)\$(TARGET).sym $(PDWIN32_BIN)
|
---|
35 | $(CP) $** $@
|
---|
36 | $(CP) $** $(@D)..\..\$(@F)
|
---|
37 | $(CP) $(OBJDIR)\$(TARGET).sym $(@D)..\..
|
---|
38 |
|
---|
39 |
|
---|
40 | !ifndef NOTEXPDEF
|
---|
41 | # make library from the <>exp.def file.
|
---|
42 | !ifndef ORGTARGET
|
---|
43 | $(TARGET).LIB: $(TARGET)exp.def
|
---|
44 | !else
|
---|
45 | $(ORGTARGET).LIB: $(ORGTARGET)exp.def
|
---|
46 | !endif
|
---|
47 | $(IMPLIB) $(IMPLIBFLAGS) $@ $**
|
---|
48 | $(CP) $@ $(PDWIN32_LIB)
|
---|
49 |
|
---|
50 |
|
---|
51 | # make the <>exp.def file.
|
---|
52 | !ifndef ORGTARGET
|
---|
53 | $(TARGET)exp.def: $(TARGET).def
|
---|
54 | !else
|
---|
55 | $(ORGTARGET)exp.def: $(ORGTARGET).def
|
---|
56 | !endif
|
---|
57 | $(IMPDEF) $** $@
|
---|
58 | !endif
|
---|
59 |
|
---|
60 |
|
---|
61 | # Create the object directory.
|
---|
62 | $(OBJDIR):
|
---|
63 | @if not exist bin $(MKDIR) bin
|
---|
64 | @if not exist $(OBJDIR) $(MKDIR) $(OBJDIR)
|
---|
65 |
|
---|
66 |
|
---|
67 | #
|
---|
68 | # General clean rule. To clean more add it to CLEANEXTRAS!
|
---|
69 | #
|
---|
70 | !ifndef CLEAN2
|
---|
71 | clean:
|
---|
72 | !else
|
---|
73 | clean: clean2
|
---|
74 | !endif
|
---|
75 | $(RM) *.LIB *.res *.map *.pch \
|
---|
76 | !if "$(OBJDIR)" != ""
|
---|
77 | $(OBJDIR)\* \
|
---|
78 | !endif
|
---|
79 | !ifndef LOCALCLEAN
|
---|
80 | $(PDWIN32_LIB)\$(TARGET).LIB \
|
---|
81 | !ifndef EXETARGET
|
---|
82 | $(PDWIN32_BIN)\$(TARGET).dll $(TARGET)exp.def *.dll \
|
---|
83 | !else
|
---|
84 | $(PDWIN32_BIN)\$(TARGET).exe *.exe \
|
---|
85 | !endif
|
---|
86 | $(CLEANEXTRAS)
|
---|
87 | !else
|
---|
88 | $(CLEANEXTRAS)
|
---|
89 | !endif
|
---|
90 |
|
---|
91 |
|
---|
92 | #
|
---|
93 | # Include the .depend file.
|
---|
94 | # If the depend file don't exists we'll complain about it.
|
---|
95 | #
|
---|
96 | !ifndef NODEP
|
---|
97 | ! if [$(EXISTS) .depend] == 0
|
---|
98 | ! include .depend
|
---|
99 | ! else
|
---|
100 | ! if [$(ECHO) .depend doesn't exist]
|
---|
101 | ! endif
|
---|
102 | ! endif
|
---|
103 | !endif
|
---|