home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / live / usr / X11R6 / lib / X11 / config / Win32.rules < prev    next >
Text File  |  1999-09-03  |  16KB  |  529 lines

  1. XCOMM platform:  $XConsortium: Win32.rules /main/49 1996/12/02 14:12:47 kaleb $
  2.  
  3. #define HasSharedLibraries YES
  4. #define NeedLibInsideFlag YES
  5. #define SharedLibXaw NO
  6. #define SharedLibXmu NO
  7. #define SharedLibXt NO
  8. #define SharedDataSeparation NO
  9. #define SharedCodeDef /**/
  10. #define SharedLibraryDef /**/
  11. #define ShLibIncludeFile <WinLib.tmpl>
  12. #define SharedLibraryLoadFlags -dll
  13. #define PositionIndependentCFlags /**/
  14.  
  15. .c.obj:
  16.     $(CC) -c $*.c @<<
  17.     $(CFLAGS)
  18. <<
  19.  
  20. #if HasCplusplus
  21. .CCsuf.obj:
  22.     $(CXX) -c $*.CCsuf @<<
  23.     $(CFLAGS)
  24. <<
  25. #endif
  26.  
  27. #define ProgramTargetName(target) target.exe
  28.  
  29. #define RunProgram(progvar,options) $(progvar:/=\) options
  30.  
  31. #define RemoveFile(file) if exist file $(RM) file
  32.  
  33. #define RemoveFiles(files) @$(MAKE) $(MFLAGS) -f <<            @@\
  34. .SUFFIXES:                                @@\
  35.                                     @@\
  36. all: files                                @@\
  37.     !for %%i in ( Avoid.Error $$** ) do if exist %%i $(RM) %%i    @@\
  38.                                     @@\
  39. Avoid.Error files:                            @@\
  40. <<
  41.  
  42. #define MakeDir(dir) -$(MKDIRHIER) dir
  43.  
  44. #define ObjectCompile(options) RemoveFile($@)                @@\
  45.     $(CC) -c $*.c @<<                        @@\
  46.     $(CFLAGS) options                        @@\
  47. <<
  48.  
  49. #define LibObjCompile(dir,options) RemoveFiles($@ dir\$@)        @@\
  50.     $(CC) -c  $*.c @<<                        @@\
  51.     $(CCOPTIONS) $(ALLDEFINES) options                @@\
  52. <<                                    @@\
  53.     $(MV) $@ dir\$@
  54.  
  55. #define BuildIncludesTop(srclist,dstsubdir,dstupdir)            @@\
  56. includes:: srclist                            @@\
  57.     MakeDir($(BUILDINCDIR:/=\))                    @@\
  58.     @$(MAKE) $(MFLAGS) -f <<                    @@\
  59. .SUFFIXES:                                @@\
  60.                                     @@\
  61. all: srclist                                @@\
  62.     cd $(BUILDINCDIR:/=\)                        @@\
  63.     !RemoveFile($$**)                        @@\
  64.     !$(LN) $(BUILDINCTOP:/=\)\$(CURRENT_DIR:/=\)\$$** .        @@\
  65.                                     @@\
  66. Avoid.Error srclist:                            @@\
  67. <<
  68.  
  69. #define BuildIncludes(srclist,dstsubdir,dstupdir)            @@\
  70. XVARdef0 = $(BUILDINCDIR)/dstsubdir                    @@\
  71. XVARdef1 = $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)            @@\
  72.                                     @@\
  73. includes:: srclist                            @@\
  74.     MakeDir($(XVARuse0:/=\))                    @@\
  75.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  76. .SUFFIXES:                                @@\
  77.                                     @@\
  78. all: srclist                                @@\
  79.     cd $(XVARuse0:/=\)                        @@\
  80.     !RemoveFile($$**)                        @@\
  81.     !$(LN) $(XVARuse1:/=\)\$$** .                    @@\
  82.                                     @@\
  83. Avoid.Error srclist:                            @@\
  84. <<
  85.  
  86. #define LinkFileList(step,list,dir,sub)                    @@\
  87. XVARdef0 = dir                                @@\
  88. XVARdef1 = sub                                @@\
  89. XVARdef2 = list                                @@\
  90.                                     @@\
  91. step:: $(XVARuse2:/=\)                            @@\
  92.     cd $(XVARuse0:/=\)                        @@\
  93.     !RemoveFile($**)                        @@\
  94.     !$(LN) $(XVARuse1:/=\)\\$** .
  95.  
  96. #define LinkRule(program,options,objects,libraries) \
  97. $(CCLINK) Concat(-Fe,program) options objects libraries $(EXTRA_LOAD_FLAGS)
  98.  
  99. #define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs)    @@\
  100. XVARdef0 = objects                            @@\
  101.                                     @@\
  102. ProgramTargetName(program): $(XVARuse0:.o=.obj) deplibs            @@\
  103.     RemoveTargetProgram($@)                        @@\
  104.     LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),locallibs $(LDLIBS) syslibs) @@\
  105.                                     @@\
  106. clean::                                    @@\
  107.     RemoveFile(ProgramTargetName(program))
  108.  
  109. #define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib)    @@\
  110. ProgramTargetName(program): $(objs:.o=.obj) $(deplib)            @@\
  111.     RemoveTargetProgram($@)                        @@\
  112.     LinkRule($@,$(LDOPTIONS),$(objs:.o=.obj),locallib $(LDLIBS) syslib) @@\
  113.                                     @@\
  114. InstallProgram(program,$(BINDIR))                    @@\
  115. InstallManPage(program,$(MANDIR))
  116.  
  117. #define ComplexProgramTarget(program)                    @@\
  118. PROGRAM = ProgramTargetName(program)                    @@\
  119.                                     @@\
  120. AllTarget(ProgramTargetName(program))                    @@\
  121.                                     @@\
  122. ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  123.                                     @@\
  124. DependTarget()                                @@\
  125. LintTarget()                                @@\
  126.                                     @@\
  127. clean::                                    @@\
  128.     RemoveFile($(PROGRAM))
  129.  
  130. #define ComplexProgramTarget_1(program,locallib,syslib)            @@\
  131. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)                    @@\
  132. SRCS = $(SRCS1) $(SRCS2) $(SRCS3)                    @@\
  133. PROGRAM1 = ProgramTargetName(program)                    @@\
  134.                                     @@\
  135. AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3))                @@\
  136.                                     @@\
  137. ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)    @@\
  138.                                     @@\
  139. DependTarget()                                @@\
  140. LintTarget()                                @@\
  141.                                     @@\
  142. clean::                                    @@\
  143.     for %%i in ($(PROGRAMS)) do $(RM) ProgramTargetName(%%i)
  144.  
  145. #define ComplexProgramTarget_2(program,locallib,syslib)            @@\
  146. PROGRAM2 = ProgramTargetName(program)                    @@\
  147.                                     @@\
  148. ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
  149.  
  150. #define ComplexProgramTarget_3(program,locallib,syslib)            @@\
  151. PROGRAM3 = ProgramTargetName(program)                    @@\
  152.                                     @@\
  153. ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
  154.  
  155. #define MoveToBakFile(file) -@if exist file $(MV) file file.bak
  156.  
  157. #define RMoveToBakFile(file) -RemoveFile(file.bak)            @@\
  158.     -@if exist file $(MV) file file.bak
  159.  
  160. #define InstallMultipleDestFlags(step,list,dest,flags)            @@\
  161. XVARdef0 = $(DESTDIR)dest                        @@\
  162.                                     @@\
  163. step:: list                                @@\
  164.     MakeDir($(XVARuse0:/=\))                    @@\
  165.     !$(INSTALL) $(INSTALLFLAGS) flags $** $(XVARuse0:/=\)
  166.  
  167. #define    CleanTarget()                            @@\
  168. clean::                                    @@\
  169.     RemoveFiles(FilesToClean ExtraFilesToClean)
  170.  
  171. #define LibraryTargetName(libname)libname.lib
  172.  
  173. #define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.lib)
  174.  
  175. #define MakeLibrary(libname,objlist) $(AR) @<<                @@\
  176. -out:libname objlist                            @@\
  177. <<
  178.  
  179. #define LinkSourceFile(src,dir)                        @@\
  180. XVARdef0 = dir/src                            @@\
  181.                                     @@\
  182. src:  $(XVARuse0:/=\)                            @@\
  183.     RemoveFile($@)                            @@\
  184.     $(LN) $? $@                            @@\
  185.                                     @@\
  186. includes:: src                                @@\
  187.                                     @@\
  188. depends:: src                                @@\
  189.                                     @@\
  190. clean::                                    @@\
  191.     RemoveFile(src)
  192.  
  193. #define LinkFile(tofile,fromfile)                    @@\
  194. XVARdef0 = fromfile                            @@\
  195. tofile:: $(XVARuse0:/=\)                        @@\
  196.     RemoveFile($@)                            @@\
  197.     $(LN) $? $@                            @@\
  198.                                     @@\
  199. includes:: tofile                            @@\
  200.                                     @@\
  201. depend:: tofile                                @@\
  202.                                     @@\
  203. clean::                                    @@\
  204.     RemoveFile(tofile)
  205.  
  206.  
  207. #define    NormalLibraryTarget(libname,objlist)                @@\
  208. AllTarget(LibraryTargetName(libname))                    @@\
  209.                                     @@\
  210. XVARdef0 = objlist                            @@\
  211.                                     @@\
  212. LibraryTargetName(libname): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  213.     RemoveFile($@)                            @@\
  214.     MakeLibrary($@,$(XVARuse0:.o=.obj))                @@\
  215.     LinkBuildLibrary($@)
  216.  
  217. #define    NormalLibraryTarget2(libname,objlist1,objlist2)            @@\
  218. NormalLibraryTarget(libname,objlist1 objlist2)
  219.  
  220. #define    NormalLibraryTarget3(libname,objlist1,objlist2,objlist3)    @@\
  221. NormalLibraryTarget(libname,objlist1 objlist2 objlist3)
  222.  
  223. #define    NormalDepLibraryTarget(libname,deplist,objlist)            @@\
  224. AllTarget(LibraryTargetName(libname))                    @@\
  225.                                     @@\
  226. XVARdef0 = deplist                            @@\
  227. XVARdef1 = objlist                            @@\
  228. XVARdef2 = $(XVARuse1:/=\)                        @@\
  229.                                     @@\
  230. LibraryTargetName(libname): $(XVARuse0:/=\) $(EXTRALIBRARYDEPS)        @@\
  231.     RemoveFile($@)                            @@\
  232.     MakeLibrary($@,$(XVARuse2:.o=.obj))                @@\
  233.     LinkBuildLibrary($@)
  234.  
  235. #define    ProfiledLibraryTarget(libname,objlist)                @@\
  236. AllTarget(LibraryTargetNameSuffix(libname,_p))                @@\
  237.                                     @@\
  238. XVARdef0 = objlist                            @@\
  239.                                     @@\
  240. LibraryTargetNameSuffix(libname,_p): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  241.     RemoveFile($@)                            @@\
  242.     cd profiled                            @@\
  243.     MakeLibrary(..\$@,$(XVARuse0:.o=.obj))                @@\
  244.     cd ..
  245.  
  246. #define    DebuggedLibraryTarget(libname,objlist)                @@\
  247. AllTarget(LibraryTargetNameSuffix(libname,_d))                @@\
  248.                                     @@\
  249. XVARdef0 = objlist                            @@\
  250.                                     @@\
  251. LibraryTargetNameSuffix(libname,_d): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS)    @@\
  252.     RemoveFile($@)                            @@\
  253.     cd debugger                            @@\
  254.     MakeLibrary(..\$@,$(XVARuse0:.o=.obj))                @@\
  255.     cd ..
  256.  
  257. #ifndef UseInstalled
  258. #define ImakeDependency(target)                        @@\
  259. target:: ProgramTargetName($(IMAKE))                    @@\
  260.                                     @@\
  261. ProgramTargetName($(IMAKE)):                        @@\
  262.     <<tmp.bat                            @@\
  263.     cd $(IMAKESRC:/=\)                        @@\
  264.     if exist Makefile $(MAKE) all                    @@\
  265.     if not exist Makefile $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" @@\
  266. <<
  267. #endif
  268.  
  269. #ifndef UseInstalled
  270. #define DependDependency()                         @@\
  271. depend:: ProgramTargetName($(DEPEND))                    @@\
  272.                                     @@\
  273. ProgramTargetName($(DEPEND)):                        @@\
  274.     <<tmp.bat                            @@\
  275.     cd $(DEPENDSRC:/=\)                        @@\
  276.     $(MAKE)                                @@\
  277. <<
  278. #endif
  279.  
  280. #define    DependTarget()                            @@\
  281. DependDependency()                            @@\
  282.                                     @@\
  283. depend::                                @@\
  284.     $(DEPEND:/=\) @<<                        @@\
  285. $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)        @@\
  286. <<
  287.  
  288. #define    DependTarget3(srcs1,srcs2,srcs3)                @@\
  289. DependDependency()                            @@\
  290.                                     @@\
  291. depend::                                @@\
  292.     $(DEPEND:/=\) @<<                        @@\
  293. $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 srcs2 srcs3    @@\
  294. <<
  295.  
  296. #define ForceSubdirs(dirs)                        @@\
  297. Avoid.Error dirs: FRC                            @@\
  298.     @cd $@                                @@\
  299.     @echo making all in $(CURRENT_DIR)/$@...            @@\
  300.     $(MAKE) $(MFLAGS) PassCDebugFlags all                @@\
  301.     cd ..                                @@\
  302.                                     @@\
  303. FRC:
  304.  
  305. #define MakeMakeSubdirs(dirs,target)                    @@\
  306. XVARdef0 = dirs                                @@\
  307. XVARdef1 = $$                                @@\
  308.                                     @@\
  309. target::                                @@\
  310.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  311. .SUFFIXES:                                @@\
  312.                                     @@\
  313. all: $(XVARuse0:/=\)                            @@\
  314.                                     @@\
  315. Avoid.Error $(XVARuse0:/=\):                        @@\
  316.     cd $(XVARuse1)@                            @@\
  317.     RMoveToBakFile(Makefile)                    @@\
  318.     ImakeSubCmdHelper -DTOPDIR=../$(TOP) -DCURDIR=$(CURRENT_DIR)/$(XVARuse1)@ @@\
  319.     $(MAKE) $(MFLAGS) Makefiles                    @@\
  320.     cd ..                                @@\
  321. <<
  322.  
  323. #ifdef UseInstalled
  324. # define ImakeSubCmdHelper $(IMAKE_CMD)
  325. #else
  326. # define ImakeSubCmdHelper ..\$(IMAKE) -I../$(IRULESRC) $(IMAKE_DEFINES)
  327. #endif
  328.  
  329. #define NamedTargetSubdirs(name,dirs,verb,flags,subname)        @@\
  330. XVARdef0 = dirs                                @@\
  331. XVARdef1 = $$                                @@\
  332.                                     @@\
  333. name::                                    @@\
  334.     @$(MAKE) -A $(MFLAGS) -f <<                    @@\
  335. .SUFFIXES:                                @@\
  336.                                     @@\
  337. all: $(XVARuse0:/=\)                            @@\
  338.                                     @@\
  339. Avoid.Error $(XVARuse0:/=\):                        @@\
  340.     cd $(XVARuse1)@                            @@\
  341.     @echo verb in $(CURRENT_DIR)/$(XVARuse1)@...            @@\
  342.     $(MAKE) $(MFLAGS) flags subname                    @@\
  343.     cd ..                                @@\
  344. <<
  345.  
  346. #define UnsharedLibReferences(varname,libname,libsource)        @@\
  347. Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,libsource/,libname.lib) @@\
  348. Concat(varname,LIB) = LoaderLibPrefix _Use(libname.lib,$(Concat3(DEP,varname,LIB))) @@\
  349. LintLibReferences(varname,libname,libsource)
  350.  
  351. #define SharedLibReferences(varname,libname,libsource,revname,rev)    @@\
  352. revname = rev                                @@\
  353. UnsharedLibReferences(varname,libname,libsource)
  354.  
  355. #define    SubdirLibraryRule(objlist)                    @@\
  356. XVARdef0 = objlist                            @@\
  357.                                     @@\
  358. all:: DONE                                @@\
  359.                                     @@\
  360. DONE: $(XVARuse0:.o=.obj)                        @@\
  361.     RemoveFile($@)                            @@\
  362.     echo - > $@                            @@\
  363.                                     @@\
  364. clean::                                    @@\
  365.     RemoveFile(DONE)
  366.  
  367. #define CppScriptTarget(dst,src,defs,deplist)                @@\
  368. dst::                                    @@\
  369.     @echo sorry, unable to make $@
  370.  
  371. #define CppFileTarget(dst,src,defs,deplist)                @@\
  372. XFAKEVAR = X                                @@\
  373. dst::  src deplist                            @@\
  374.     RemoveFile($@)                            @@\
  375.     $(PREPROCESSCMD) -I. <<CppTmpFile.c @<< >$@            @@\
  376.     XCOMM define $(XFAKEVAR)COMM XCOMM                @@\
  377.     XCOMM include <src>                        @@\
  378. <<                                    @@\
  379.     defs                                @@\
  380. <<                                    @@\
  381.                                     @@\
  382. clean::                                    @@\
  383.     RemoveFiles(dst)
  384.  
  385. #define InstallNamedTarget(step,srcname,flags,dest,dstname)        @@\
  386. XVARdef0 = $(DESTDIR)dest                        @@\
  387.                                     @@\
  388. step:: srcname                                @@\
  389.     MakeDir($(XVARuse0:/=\))                    @@\
  390.     $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
  391.  
  392. #define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname)    @@\
  393. XVARdef0 = $(DESTDIR)dest                        @@\
  394.                                     @@\
  395. step:: srcname                                @@\
  396.     MakeDir($(XVARuse0:/=\))                    @@\
  397.     @if exist $(XVARuse0:/=\)\\dstname echo Not overwriting existing $(XVARuse0:/=\)\\dstname @@\
  398.     if not exist $(XVARuse0:/=\)\\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
  399.  
  400.  
  401. #define    InstallLibrary(libname,dest)                    @@\
  402. InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),dest)
  403.  
  404. #define    InstallScript(program,dest) /**/
  405.  
  406. #define    InstallNamedProg(srcname,dstname,dest)                @@\
  407. install:: srcname                            @@\
  408.     @echo sorry, unable to install srcname
  409.  
  410. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  411. InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
  412. InstallTarget(install,libname.dll,$(INSTLIBFLAGS),dest)
  413.  
  414. #define    InstallSharedLibraryData(libname,rev,dest)
  415.  
  416. #define MakeDLL(libname,solist) $(LD) @<<                @@\
  417. SharedLibraryLoadFlags -out:libname.dll libname.exp solist        @@\
  418. <<
  419.  
  420. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  421. AllTarget(libname.dll)                            @@\
  422.                                     @@\
  423. CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
  424.                                     @@\
  425. XVARdef0 = solist                            @@\
  426.                                     @@\
  427. LibraryTargetName(libname): $(XVARuse0:.o=.obj) libname.def $(EXTRALIBRARYDEPS)    @@\
  428.     RemoveFile($@)                            @@\
  429.     MakeLibrary($@,-def:libname.def $(XVARuse0:.o=.obj))        @@\
  430.     LinkBuildLibrary($@)                        @@\
  431.     RemoveFile(libname.dll)                        @@\
  432.     MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
  433.     LinkBuildDLL(libname.dll)                    @@\
  434.                                     @@\
  435. libname.dll: LibraryTargetName(libname) $(EXTRALIBRARYDEPS)        @@\
  436.     RemoveFile(libname.dll)                        @@\
  437.     MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
  438.     LinkBuildDLL(libname.dll)                    @@\
  439.                                     @@\
  440. clean::                                    @@\
  441.     RemoveFile(LibraryTargetName(libname))                @@\
  442.     RemoveFile(libname.dll)
  443.  
  444. #define SharedLibraryDataTarget(libname,rev,salist)
  445.  
  446. #define ObjectCplusplusCompile(options) RemoveFile($@)            @@\
  447.     $(CXX) -c $*.CCsuf @<<                        @@\
  448.     $(CFLAGS) options                        @@\
  449. <<
  450.  
  451. #define CplusplusLinkRule LinkRule
  452.  
  453. #define CplusplusProgramTargetHelper ProgramTargetHelper
  454.  
  455. #ifndef ComplexCplusplusProgramTarget
  456. #define    ComplexCplusplusProgramTarget(program)                @@\
  457.         PROGRAM = ProgramTargetName(program)                @@\
  458.                                     @@\
  459. AllTarget(ProgramTargetName(program))                    @@\
  460.                                     @@\
  461. CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
  462.                                     @@\
  463. DependTarget()                                @@\
  464. LintTarget()                                @@\
  465.                                     @@\
  466. clean::                                    @@\
  467.     RemoveFile(ProgramTargetName(program))
  468. #endif /* ComplexCplusplusProgramTarget */
  469.  
  470. #ifndef UseInstalled
  471. # define LinkBuildDLL(binary) MakeDir($(BUILDBINDIR:/=\))        @@\
  472.     RemoveFile(Concat($(BUILDBINDIR:/=\)\,binary))            @@\
  473.     cd $(BUILDBINDIR:/=\) && $(LN) Concat($(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\,binary) .
  474.  
  475. # ifdef LinkBuildBinary
  476. #  undef LinkBuildBinary
  477. # endif
  478. # define LinkBuildBinary(binary)                    @@\
  479. all:: $(BUILDBINDIR)\ProgramTargetName(binary) ProgramTargetName(binary) @@\
  480.                                     @@\
  481. $(BUILDBINDIR)\ProgramTargetName(binary): ProgramTargetName(binary)    @@\
  482.     MakeDir($(BUILDBINDIR:/=\))                    @@\
  483.     RemoveFile($(BUILDBINDIR:/=\)\ProgramTargetName(binary)))    @@\
  484.     cd $(BUILDBINDIR:/=\) && $(LN) $(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\ProgramTargetName(binary) .
  485.  
  486. # ifdef LinkBuildLibrary
  487. #  undef LinkBuildLibrary
  488. # endif
  489. # define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR:/=\))        @@\
  490.     RemoveFile(Concat($(BUILDLIBDIR:/=\)\,lib))            @@\
  491.     cd $(BUILDLIBDIR:/=\) && $(LN) Concat($(BUILDLIBTOP:/=\)\$(CURRENT_DIR:/=\)\,lib) .
  492.  
  493. #endif
  494.  
  495. #ifndef ProjectUnsharedLibReferences
  496. #define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
  497. Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,buildlibdir/,libname.lib)    @@\
  498. Concat(varname,LIB) = $(Concat3(DEP,varname,LIB))            @@\
  499. LintLibReferences(varname,libname,libsource)
  500. #endif
  501.  
  502.  
  503. /*
  504.  * ServerTargetWithFlags - generate rules to compile, link, and relink a server
  505.  */
  506. #ifndef ServerTargetWithFlags
  507. #define    ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
  508. XVARdef0 = objects                            @@\
  509.                                     @@\
  510. AllTarget(ProgramTargetName(server))                    @@\
  511. ProgramTargetName(server): subdirs $(XVARuse0:.o=.obj) libs        @@\
  512.     MoveToBakFile($@)                        @@\
  513.     LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
  514.                                     @@\
  515. Concat(load,server):                            @@\
  516.     MoveToBakFile(ProgramTargetName(server))            @@\
  517.     LinkRule(ProgramTargetName(server),$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
  518.                                     @@\
  519. loadX:: Concat(load,server)                        @@\
  520.                                     @@\
  521. ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
  522. ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
  523.                                     @@\
  524. InstallProgramWithFlags(server,$(BINDIR),flags)                @@\
  525.                                     @@\
  526. clean::                                    @@\
  527.     RemoveFile(ProgramTargetName(server))
  528. #endif /* ServerTargetWithFlags */
  529.