source: trunk/include/pdwin32.post@ 4295

Last change on this file since 4295 was 4288, checked in by bird, 25 years ago

Make the clean-rule omittable.

File size: 2.3 KB
RevLine 
[4288]1# $Id: pdwin32.post,v 1.11 2000-09-21 11:17:28 bird 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'.
[4288]13# Define NOCLEAN to exclude the clean rule. (Remember to make your own!)
[3032]14#
[3019]15
16
[3032]17# Copy library rule.
18!ifndef ORGTARGET
[3019]19$(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
[3032]20!else
21$(PDWIN32_LIB)\$(ORGTARGET).lib: $(ORGTARGET).lib
22!endif
[3019]23 $(CP) $** $@
24
[3032]25
26# Copy dll rule.
27!ifndef EXETARGET
28$(PDWIN32_BIN)\$(TARGET).dll: $(OBJDIR)\$(TARGET).dll
29!else
30$(PDWIN32_BIN)\$(TARGET).exe: $(OBJDIR)\$(TARGET).exe
31!endif
[3480]32 cd $(OBJDIR)
[3531]33 $(MAPSYM) $(TARGET).map
[3480]34 cd ..\..
35 $(CP) $(OBJDIR)\$(TARGET).sym $(PDWIN32_BIN)
[3032]36 $(CP) $** $@
[3038]37 $(CP) $** $(@D)..\..\$(@F)
[3480]38 $(CP) $(OBJDIR)\$(TARGET).sym $(@D)..\..
[3032]39
40
41!ifndef NOTEXPDEF
42# make library from the <>exp.def file.
43!ifndef ORGTARGET
[3019]44$(TARGET).LIB: $(TARGET)exp.def
[3032]45!else
46$(ORGTARGET).LIB: $(ORGTARGET)exp.def
47!endif
48 $(IMPLIB) $(IMPLIBFLAGS) $@ $**
[3019]49 $(CP) $@ $(PDWIN32_LIB)
50
[3032]51
52# make the <>exp.def file.
53!ifndef ORGTARGET
[3019]54$(TARGET)exp.def: $(TARGET).def
[3032]55!else
56$(ORGTARGET)exp.def: $(ORGTARGET).def
57!endif
[3019]58 $(IMPDEF) $** $@
[3032]59!endif
[3019]60
[3032]61
62# Create the object directory.
[3019]63$(OBJDIR):
[3032]64 @if not exist bin $(MKDIR) bin
65 @if not exist $(OBJDIR) $(MKDIR) $(OBJDIR)
[3019]66
[3032]67
68#
69# General clean rule. To clean more add it to CLEANEXTRAS!
70#
[4288]71!ifndef NOCLEAN
[3032]72!ifndef CLEAN2
[3019]73clean:
[3032]74!else
75clean: clean2
76!endif
[3053]77 $(RM) *.LIB *.res *.map *.pch \
78!if "$(OBJDIR)" != ""
79 $(OBJDIR)\* \
80!endif
[3032]81!ifndef LOCALCLEAN
82 $(PDWIN32_LIB)\$(TARGET).LIB \
83!ifndef EXETARGET
84 $(PDWIN32_BIN)\$(TARGET).dll $(TARGET)exp.def *.dll \
85!else
86 $(PDWIN32_BIN)\$(TARGET).exe *.exe \
87!endif
88 $(CLEANEXTRAS)
89!else
90 $(CLEANEXTRAS)
91!endif
[4288]92!endif
[3032]93
94
[3055]95#
96# Include the .depend file.
[3531]97# If the depend file don't exists we'll complain about it.
[3055]98#
[3032]99!ifndef NODEP
[3064]100! if [$(EXISTS) .depend] == 0
[3055]101! include .depend
[3064]102! else
103! if [$(ECHO) .depend doesn't exist]
104! endif
105! endif
[3032]106!endif
Note: See TracBrowser for help on using the repository browser.