source: trunk/make/link_dll.in@ 327

Last change on this file since 327 was 243, checked in by umoeller, 23 years ago

New build system, multimedia, other misc fixes.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1#
2# Required input:
3#
4# -- MODULESTEM
5#
6# -- MODULESDIR
7#
8# -- COPYTODIR (optional)
9#
10# -- BLDLEVELNAME (optional)
11#
12# -- RESOURCE_SOURCES
13#
14# -- either LINKOBJS or OBJS
15#
16
17!ifdef COPYTODIR
18
19ALLTARGET = $(COPYTODIR)\$(MODULESTEM).dll
20
21$(COPYTODIR)\$(MODULESTEM).dll: $(MODULESDIR)\$(@B).dll
22!ifdef XWP_UNLOCK_MODULES
23 $(RUN_UNLOCK) $@
24!endif
25 $(COPY) $(MODULESDIR)\$(@B).dll $(COPYTODIR)
26 $(COPY) $(MODULESDIR)\$(@B).sym $(COPYTODIR)
27
28!else
29
30ALLTARGET = $(MODULESDIR)\$(MODULESTEM).dll
31
32!endif
33
34!ifdef BLDLEVELNAME
35!ifndef MODULEDEF
36MODULEDEF = $(MODULESTEM).def
37!endif
38
39# update DEF file if buildlevel has changed
40$(MODULEDEF): $(BLDLEVEL_H)
41 @echo ### Updating $(@F) from "$(BLDLEVEL_H)"
42 $(RUN_BLDLEVEL) $@ $(BLDLEVEL_H) $(BLDLEVELNAME)
43!endif
44
45!undef DEPEND_RES
46
47!ifdef RESOURCE_SOURCES
48$(OUTPUTDIR)\$(MODULESTEM).res: $(RESOURCE_SOURCES)
49 @echo ### [$@]: Recreating res $(@F)
50 $(RC) -r $(@B).rc $(OUTPUTDIR)\$(@B).res
51DEPEND_RES = $(OUTPUTDIR)\$(MODULESTEM).res
52!endif
53
54#
55# now go link... if $(LINKOBJS) is defined, use that,
56# otherwise use $(OBJS)
57#
58
59!ifndef LINKOBJS
60LINKOBJS = $(OBJS)
61!endif
62
63$(MODULESDIR)\$(MODULESTEM).dll: $(LINKOBJS) $(MODULEDEF) $(DEPEND_RES)
64 @echo ### [$@]: Linking $(@F)
65 $(LINK) @<<
66/OUT:$@ $(MODULEDEF) $(LINKOBJS) $(PMPRINTF_LIB)
67<<KEEP
68!ifdef DEPEND_RES
69 @echo ### [$@]: Appending $(@B).res
70 $(RC) $(OUTPUTDIR)\$(@B).res $@
71!endif
72!ifdef XWP_OUTPUT_ROOT_DRIVE
73 @$(XWP_OUTPUT_ROOT_DRIVE)
74!endif
75 @cd $(MODULESDIR)
76 $(RUN_MAPSYM) $(@B).map
77!ifdef CVS_WORK_ROOT_DRIVE
78 @$(CVS_WORK_ROOT_DRIVE)
79!endif
80 @cd $(CURRENT_DIR)
81!ifdef RAISEBUILD
82 @echo ### [$@]: Raising build number
83 @cmd.exe /c tools\raisebld.cmd include\build.h
84!endif
85
Note: See TracBrowser for help on using the repository browser.