TSPRJ.TXT 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. ! Project Predefined
  2. !! predefine TopSpeed compilers
  3. #set verbose=off
  4. !if cla
  5. #if %tsmode=claenv #and %verbose #then
  6. #if '%parent'='' #then
  7. #message 'Project file : (%prjname)'
  8. #else
  9. #message 'Project file : (%prjname) nested from (%parent)'
  10. #endif
  11. #if #exists %prjname%.red #then
  12. #if '%verbose' #then
  13. #message 'Redirection : (%prjname%.red)'
  14. #endif
  15. #file redirect %prjname%.red
  16. #endif
  17. #abort on
  18. #endif
  19. #declare_compiler cla=
  20. '#if "%%verbose" #then
  21. #message "Source : (%%src)"
  22. #endif
  23. #set make=%%remake_jpi
  24. #if %%make #then #rundll TSCLA %%src %%obj #endif
  25. #pragma link(%%obj)
  26. #set tscla=on'
  27. !end
  28. !if mod
  29. #declare_compiler mod=
  30. '#set make=%%remake_jpi
  31. #if %%make #then #rundll TSMOD %%src %%obj #endif
  32. #pragma link(%%obj)
  33. #set tsm2=on'
  34. !end
  35. !if pas
  36. #declare_compiler pas=
  37. '#set make=%%remake_jpi
  38. #if %%make #then #rundll TSPAS %%src %%obj #endif
  39. #pragma link(%%obj)
  40. #set tspas=on'
  41. #declare_compiler plg=
  42. '#set make=%%remake_jpi
  43. #if %%make #then #rundll TSPAS_LG %%src %%obj #endif
  44. #pragma link(%%obj)
  45. #set tspas=on'
  46. !end
  47. !if cpp
  48. #declare_compiler cpp=
  49. '#set make=%%remake_jpi
  50. #if %%make #then #rundll TSCPP %%src %%obj #endif
  51. #pragma link_option(decode=>on)
  52. #pragma link(%%obj)
  53. #set tsc=on #set tscpp=on'
  54. !! This declaration is overriden by the one below if TopSpeed C is installed
  55. #declare_compiler c=
  56. '#set make=%%remake_jpi
  57. #if %%make #then #rundll TSCPP %%src %%obj #endif
  58. #pragma link(%%obj)
  59. #set tsc=on'
  60. !end
  61. !if C
  62. #declare_compiler c=
  63. '#set make=%%remake_jpi
  64. #if %%make #then #rundll TSC %%src %%obj #endif
  65. #pragma link(%%obj)
  66. #set tsc=on'
  67. !end
  68. !if asm
  69. #declare_compiler a=
  70. '#set make=%%remake_jpi
  71. #if %%make #then #rundll TSASM %%src %%obj #endif
  72. #pragma link(%%obj)'
  73. !end
  74. !if masm
  75. #declare_compiler asm=
  76. '#set make=%%remake
  77. #if %%make #then
  78. #edit save %%src
  79. #expand %%src
  80. #set _masmsrc=%%opath
  81. #expand %%obj
  82. #set _masmobj=%%cpath
  83. #run "masm %%_masmsrc,%%_masmobj/MX/e; >masmtmp.$$$" no_window no_abort
  84. #file adderrors masmtmp.$$$
  85. #file delete masmtmp.$$$
  86. #endif
  87. #pragma link(%%obj)'
  88. !end
  89. #declare_compiler rc=
  90. '#if %%system=os2 #then
  91. #error "The TopSpeed Resource Compiler is for Windows only"
  92. #endif
  93. #split %%obj
  94. #set obj = %%name.res
  95. #set make=%%remake
  96. #if %%make #then
  97. #edit save %%src
  98. #run "tsrc %%src >rctmp.$$$" no_window no_abort
  99. #file adderrors rctmp.$$$
  100. #file delete rctmp.$$$
  101. #endif
  102. #pragma link(%%obj)'
  103. #if %action%=compile #then
  104. !! declarations to allow compilation of include files
  105. !if mod
  106. #declare_compiler def='#rundll TSMOD %%src %%obj'
  107. !end
  108. !if cpp
  109. #declare_compiler hpp='#rundll TSCPP %%src %%obj'
  110. #declare_compiler h='#rundll TSCPP %%src %%obj'
  111. !end
  112. !if C
  113. #declare_compiler h='#rundll TSC %%src %%obj'
  114. !end
  115. #endif
  116. !! End of compiler predefinition section
  117. !! =========================================================================
  118. ! Project Model
  119. !! The following lines are executed whenever the #model command is used
  120. !! in a project file.
  121. !if cla
  122. #if %tsmode=claenv #then
  123. #if #not '%parent'='' #then
  124. #set model=%mastermodel_
  125. #set system=%mastersystem_
  126. #endif
  127. #if '%verbose' #then
  128. #message 'System : %system %filetype'
  129. #message 'Model : %model %jpicall'
  130. #endif
  131. #endif
  132. !end
  133. #pragma call(near_call=>on,same_ds=>on,ds_eq_ss=>on,overlay=>off)
  134. #pragma data(far_ext=>off,near_ptr=>on,threshold=>65535,const_in_code=>off,ss_in_dgroup=>on,ds_dynamic=>off)
  135. #pragma define(_fdata=>off,_fcall=>off,_fptr=>off,_mthread=>off)
  136. #pragma link_option(map=>on,case=>on,pack=>on,oldexe=>off,prot_mode=>off,overlay=>off)
  137. !! C/C++ Predefined Macro Names
  138. #pragma define(__OS2__=>off,__MSDOS__=>off)
  139. #if %system=dos #then #pragma define(__MSDOS__=>on) #endif
  140. #if %system=os2 #then #pragma define(__OS2__=>on) #endif
  141. #pragma define(M_I86SM=>off,M_I86CM=>off,M_I86MM=>off,M_I86LM=>off,M_I86XM=>off,M_I86TM=>off,M_I86MTM=>off,M_I86OM=>off,M_I86DM=>off)
  142. !! defines used by library source files
  143. #pragma define(_ENV=>off,_WINDOWS=>off,_WINDLL=>off,_OVL=>off,_DLL=>off)
  144. #if %system=win #then #pragma define(_WINDOWS=>on) #endif
  145. #if %model=overlay #then #pragma define(_OVL=>on) #endif
  146. #if %model=dynalink #then #pragma define(_DLL=>on) #endif
  147. !! Target Operating System
  148. #pragma define(_DOS=>off,_OS2=>off,_WIN=>off,_XTD=>off)
  149. #if %system=dos #then
  150. #if (%model=extended) #or (%model=extendmt) #then
  151. #pragma define(_OS2=>on,_XTD=>on)
  152. #else
  153. #pragma define(_DOS=>on)
  154. #endif
  155. #elsif %system=os2 #then
  156. #pragma define(_OS2=>on)
  157. #elsif %system=win #then
  158. #pragma define(_WIN=>on)
  159. #endif
  160. #if "%system"="" #then
  161. #error "#model not preceded by #system"
  162. !if smallmodel
  163. #elsif %model=small #then
  164. #set M=S
  165. #pragma define(M_I86SM=>on)
  166. !end
  167. !if compactmodel
  168. #elsif %model=compact #then
  169. #set M=C
  170. #pragma call(ds_eq_ss=>off)
  171. #pragma data(near_ptr=>off,threshold=>32767,ss_in_dgroup=>off)
  172. #pragma define(_fptr=>on)
  173. #pragma define(M_I86CM=>on)
  174. !end
  175. !if mediummodel
  176. #elsif %model=medium #then
  177. #set M=M
  178. #pragma call(near_call=>off)
  179. #pragma define(_fcall=>on)
  180. #pragma define(M_I86MM=>on)
  181. !end
  182. !if largemodel
  183. #elsif %model=large #then
  184. #set M=L
  185. #pragma call(near_call=>off,ds_eq_ss=>off),data(near_ptr=>off,threshold=>32767,ss_in_dgroup=>off)
  186. #pragma define(_fcall=>on,_fptr=>on)
  187. #pragma define(M_I86LM=>on)
  188. !end
  189. !if xlargemodel
  190. #elsif %model=xlarge #then
  191. #if #not %system=win #then
  192. #set M=X
  193. #pragma call(near_call=>off,same_ds=>off,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,const_in_code=>on,ss_in_dgroup=>off,ds_dynamic=>on)
  194. #pragma define(_fcall=>on,_fdata=>on,_fptr=>on)
  195. #pragma define(M_I86XM=>on)
  196. #else
  197. #error "Extra-large model not available for Windows programs"
  198. #endif
  199. !end
  200. !if mthreadmodel
  201. #elsif %model=mthread #then
  202. #if #not %system=win #then
  203. #set M=T
  204. #pragma call(near_call=>off,same_ds=>off,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,const_in_code=>on,ss_in_dgroup=>off,ds_dynamic=>on)
  205. #pragma define(_fcall=>on, _fdata=>on,_fptr=>on,_mthread=>on)
  206. #pragma define(M_I86TM=>on,M_I86MTM=>on)
  207. #else
  208. #error "Multi-thread model not available for Windows programs"
  209. #endif
  210. !end
  211. !if overlaymodel
  212. #elsif %model=overlay #then
  213. #if %system=dos #then
  214. #set M=O
  215. #pragma call(near_call=>off,same_ds=>off,overlay=>on,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,const_in_code=>off,ss_in_dgroup=>off,ds_dynamic=>on)
  216. #pragma define(_fcall=>on,_fdata=>on,_fptr=>on,_mthread=>on)
  217. #pragma define(M_I86OM=>on)
  218. #else
  219. #error "Overlay model not available for %system programs"
  220. #endif
  221. !end
  222. !if dynalinkmodel
  223. #elsif %model=dynalink #then
  224. #if #not %system=win #then
  225. #set M=D
  226. #pragma call(near_call=>off,same_ds=>off,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,ss_in_dgroup=>off,ds_dynamic=>on)
  227. #if %system=dos #then
  228. #pragma call(overlay=>on)
  229. #else
  230. #pragma data(const_in_code=>on)
  231. #endif
  232. #pragma define(_fcall=>on,_fdata=>on,_fptr=>on,_mthread=>on)
  233. #pragma define(M_I86DM=>on)
  234. #pragma link_option(smart_method=>off)
  235. #else
  236. #error "Dynalink model not available for Windows programs"
  237. #endif
  238. !end
  239. !if extendedmodel
  240. #elsif %model=extended #then
  241. #if %system=dos #then
  242. #set M=X
  243. #pragma call(near_call=>off,same_ds=>off,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,const_in_code=>on,ss_in_dgroup=>off,ds_dynamic=>on)
  244. #pragma define(_fcall=>on,_fdata=>on,_fptr=>on)
  245. #pragma define(M_I86XM=>on,__MSDOS__=>off,__OS2__=>on)
  246. #else
  247. #error "Extended model only available for DOS programs"
  248. #endif
  249. !end
  250. !if extendmtmodel
  251. #elsif %model=extendmt #then
  252. #if %system=dos #then
  253. #set M=T
  254. #pragma call(near_call=>off,same_ds=>off,ds_eq_ss=>off),data(far_ext=>on,near_ptr=>off,const_in_code=>on,ss_in_dgroup=>off,ds_dynamic=>on)
  255. #pragma define(_fcall=>on,_fdata=>on,_fptr=>on,_mthread=>on)
  256. #pragma define(M_I86TM=>on,M_I86MTM=>on,__MSDOS__=>off,__OS2__=>on)
  257. #else
  258. #error "Extendmt model only available for DOS programs"
  259. #endif
  260. !end
  261. #else
  262. #error "Unrecognized argument %model"
  263. #endif
  264. #if "%jpicall"="" #then #set jpicall=jpi #endif
  265. #if %jpicall=jpi #then
  266. #if %system=win #then
  267. #pragma call(standard_float=>on)
  268. #pragma call(reg_saved=>(ax,bx,cx,dx,si,di,ds,st1,st2))
  269. #pragma call(reg_param=>(ax,bx,cx,dx))
  270. #pragma call(reg_return=>(ax,dx))
  271. #else
  272. #pragma call(standard_float=>off)
  273. #pragma call(reg_saved=>(ax,bx,cx,dx,si,di,ds,st1,st2))
  274. #pragma call(reg_param=>(ax,bx,cx,dx,st0,st6,st5,st4,st3))
  275. #pragma call(reg_return=>(ax,dx,st0))
  276. #endif
  277. #pragma call(standard_conv=>off,opt_var_arg=>on)
  278. #if %model=overlay #or (%model=dynalink #and %system=dos) #then
  279. #pragma call(opt_var_arg=>off)
  280. #endif
  281. #set C=_
  282. #pragma define(_jpicall=>on)
  283. #elsif %jpicall=stack #then
  284. #pragma call(reg_saved=>(si,di,ds,st1,st2))
  285. #pragma call(reg_param=>())
  286. #pragma call(reg_return=>(ax,dx))
  287. #pragma call(standard_conv=>on,standard_float=>on,opt_var_arg=>off)
  288. #set C=F
  289. #pragma define(_jpicall=>off)
  290. #else
  291. #error "Unrecognized argument %jpicall"
  292. #endif
  293. #if %system=win #then
  294. #set O=W
  295. #pragma link_option(pack=>off,windows=>on,emul=>winfloat.obj),call(windows=>on)
  296. #elsif %system=dos #then
  297. !if extendedmodel | extendmtmodel
  298. #if %model=extended #or %model=extendmt #then
  299. #set O=X
  300. #pragma optimize(cpu=>286),call(windows=>off)
  301. #pragma link_option(pack=>off,extended=>on,prot_mode=>on,emul=>x_emul.obj)
  302. #else
  303. !end
  304. #set O=R
  305. #pragma link_option(oldexe=>on,pack=>off,emul=>r_emul.obj),call(windows=>off)
  306. #pragma optimize(cpu=>86)
  307. !if extendedmodel | extendmtmodel
  308. #endif
  309. !end
  310. #elsif %system=os2 #then
  311. #set O=P
  312. #pragma optimize(cpu=>286),call(windows=>off),link_option(prot_mode=>on,emul=>p_emul.obj)
  313. #else
  314. #error "Unknown argument to #system: %system"
  315. #endif
  316. !if cla
  317. #if '%parent'='' #then -- #and %tsmode=claenv ?
  318. #set mastermodel_=%model
  319. #set mastersystem_=%system
  320. #endif
  321. !end
  322. !! End of Project model section
  323. !! =========================================================================
  324. ! Project Link
  325. !! The following lines are executed whenever a #link command is executed in
  326. !! a project file
  327. #autocompile
  328. #pragma save
  329. !! Calculate lfiletype - the type of file being made for this #link only
  330. !! Default is the filetype specified by #system (%filetype)
  331. #if "%filetype"="" #then
  332. #set filetype=exe
  333. #endif
  334. #split %link_arg
  335. #if "%ext"="" #then
  336. #set lfiletype_=%filetype
  337. #set ext=%filetype
  338. #elsif (%ext=exe) #or (%ext=dll) #or (%ext=lib) #then
  339. #set lfiletype_=%ext
  340. #else
  341. #set lfiletype_=%filetype
  342. #endif
  343. !! Calculate any additional libraries or object files that need to be linked
  344. #if #not %lfiletype_=lib #then
  345. #if %system=win #then
  346. #if %lfiletype_=dll #then
  347. #compile initwdll.a
  348. #pragma linkfirst(initwdll.obj)
  349. #elsif %filetype=exe #then
  350. #if "%tsm2" #or "%tspas" #then
  351. #compile initmwin.a
  352. #pragma linkfirst(initmwin.obj)
  353. #else
  354. #compile initwin.a
  355. #pragma linkfirst(initwin.obj)
  356. #endif
  357. #else
  358. #error "Unknown argument to #system: %filetype"
  359. #endif
  360. #else
  361. #if %lfiletype_=dll #then
  362. #pragma linkfirst(initdll.obj)
  363. #elsif %lfiletype_=exe #then
  364. #if (#not ("%tsc" #or "%tscpp" #or "%tscla")) #and (%system = dos)
  365. #and (("%model"=xlarge) #or ("%model"=mthread)) #then
  366. #pragma linkfirst(initnew.obj)
  367. #elsif "%pm_api" #and (%system=os2) #then
  368. #pragma link_option(pm=>on,non_pm=>off)
  369. #pragma linkfirst(initpm.obj)
  370. #else
  371. #pragma linkfirst(initexe.obj)
  372. #endif
  373. #if (%system=os2) #then
  374. #if "%pm_compat" #then
  375. #pragma link_option(pm=>on,non_pm=>on)
  376. #elsif "%pm_noncompat" #then
  377. #pragma link_option(pm=>off,non_pm=>on)
  378. #endif
  379. #endif
  380. #else
  381. #error "Unknown argument to #system: %filetype"
  382. #endif
  383. #endif
  384. !! calculate required libraries
  385. #set prefix_="%O%%M%%C%"
  386. #if %%model = 'extended' #then
  387. #set clapfx_ = 'DES'
  388. #else
  389. #set clapfx_ = 'D%M%V'
  390. #endif
  391. #if "%tscla" #then
  392. #pragma link(%clapfx_%cla.lib)
  393. #set tsc=on
  394. !! tsc on picks appropriate m2/pascal libraries if mixed with clarion
  395. #elsif (%lfiletype_=dll) #and (%system=win) #then
  396. #pragma link(%prefix_%comd.lib)
  397. #else
  398. #pragma link(%prefix_%com.lib)
  399. #endif
  400. #if "%tsc" #and #not "%tscla" #then
  401. #pragma link(%prefix_%clib.lib)
  402. #endif
  403. #if "%tscpp" #then
  404. #if (%model=dynalink) #or (%system=win) #then
  405. #set CPPprefix_="%O%%M%%C%"
  406. #else
  407. #set CPPprefix_="C%M%%C%"
  408. #endif
  409. #pragma link(%CPPprefix_%slib.lib)
  410. #if "%usertool" #then
  411. #pragma link(%CPPprefix_%rtool.lib)
  412. #endif
  413. #if "%usermath" #then
  414. #pragma link(%CPPprefix_%rmath.lib)
  415. #endif
  416. #endif
  417. #if "%tsm2" #then
  418. #pragma link(%prefix_%m2.lib)
  419. #if "%tsc" #then
  420. #pragma link(%prefix_%mlibc.lib)
  421. #if "%cwindow"=jpi #then
  422. #pragma link(%prefix_%wind.lib)
  423. #endif
  424. #else
  425. #pragma link(%prefix_%mlib.lib)
  426. #endif
  427. #endif
  428. #if "%tspas" #then
  429. #if %model=dynalink #then
  430. #if "%tsc" #then
  431. #pragma link(%prefix_%pasc.lib)
  432. #elsif "%tsm2" #then
  433. #pragma link(%prefix_%pasm.lib)
  434. #else
  435. #pragma link(%prefix_%pas.lib)
  436. #endif
  437. #else
  438. #pragma link(%prefix_%pas.lib)
  439. #endif
  440. #if "%tsc" #then
  441. #pragma link(%prefix_%mlibc.lib)
  442. #if "%cwindow"=jpi #then
  443. #pragma link(%prefix_%wind.lib)
  444. #endif
  445. #elsif "%tsm2" #then
  446. #pragma link(%prefix_%mlib.lib)
  447. #else
  448. #pragma link(%prefix_%plib.lib)
  449. #endif
  450. #pragma link_option(case=>off)
  451. #endif
  452. #if "%cgraph"=jpi #then
  453. #pragma link(%prefix_%graph.lib)
  454. #elsif "%cgraph"=borland #then
  455. #pragma link(graphics.lib)
  456. #endif
  457. #if ("%cwindow"=jpi) #and #not("%tsm2" #or "%tspas") #then
  458. #pragma link(%prefix_%wind.lib)
  459. #elsif "%cwindow"=borland #then
  460. #pragma link(%prefix_%borw.lib)
  461. #endif
  462. #if "%system"=os2 #then
  463. #if "%pm_api" #then
  464. #pragma link(pmjpi.lib,os2jpi.lib)
  465. #else
  466. #pragma link(os2jpi.lib)
  467. #endif
  468. #elsif (%model=overlay) #or (%model=dynalink) #then
  469. #pragma link(loader.lib)
  470. #endif
  471. #endif
  472. !! Now do the link
  473. #if (%ext=dll) #then
  474. #pragma link_option(smart_method=>off)
  475. #if (%system=dos) #then
  476. #if #not ((%model=overlay) #or (%model=dynalink) #or (%model=extended) #or
  477. (%model=extendmt)) #then
  478. #error "DOS DLLs must use overlay, dynalink or extended model"
  479. #endif
  480. #elsif (%system=os2) #then
  481. #if #not ((%model=xlarge) #or (%model=mthread) #or (%model=dynalink)) #then
  482. #error "OS2 DLLs must use xlarge, mthread or dynalink model"
  483. #endif
  484. #endif
  485. #endif
  486. #if "%ext%"=lib #then
  487. #dolink %name%.%ext%
  488. #elsif (%model=extended) #or (%model=extendmt) #then
  489. #if "%ext%"=dll #then
  490. #if #not "%manual_export" #then
  491. #if #not "%exports"=="" #then
  492. #set expname=%name%.exp
  493. #mkexp %expname xoverlay.exp %exports
  494. #endif
  495. #if #not "%expname"=="" #then
  496. #implib %name%.lib %expname
  497. #elsif #exists %name%.exp #then
  498. #implib %name%.lib %name%.exp
  499. #else
  500. #implib %name%.lib
  501. #endif
  502. #endif
  503. #else
  504. #if %model=extendmt #then
  505. #pragma link_option(stub=>xloadmt.exe)
  506. #else
  507. #pragma link_option(stub=>xload.exe)
  508. #endif
  509. #endif
  510. #pragma link_option(map=>on,oldexe=>off)
  511. #dolink %name%.%ext%
  512. #elsif ("%model"=overlay) #or ((%system=dos) #and ("%model"=dynalink)) #then
  513. #if "%ext%"=dll #then
  514. #if #not "%manual_export" #then
  515. #if #not "%exports"=="" #then
  516. #set expname=%name%.exp
  517. #mkexp %expname roverlay.exp %exports
  518. #endif
  519. #if #not "%expname"=="" #then
  520. #implib %name%.lib %expname
  521. #elsif #exists %name%.exp #then
  522. #implib %name%.lib %name%.exp
  523. #else
  524. #implib %name%.lib
  525. #endif
  526. #endif
  527. #else
  528. #pragma link_option(stub=>ovlload.exe)
  529. #endif
  530. #pragma link_option(map=>on,oldexe=>off,overlay=>on)
  531. #dolink %name%.%ext%
  532. #message "link complete"
  533. #if %make #then
  534. #set ovrexe_=%name%.%ext%
  535. #set ovrmap_=%name%.map
  536. #if #exists %name%.exp #then
  537. #set ovrexp_=%name%.exp
  538. #else
  539. #set ovrexp_=overlay.exp
  540. #endif
  541. #exemod %ovrexe_ %ovrexp_ %ovrmap_
  542. #endif
  543. #elsif (%system=os2) #and ("%ext%"=dll) #then
  544. #if #not "%manual_export" #then
  545. #if #exists %name%.exp #then
  546. #implib %name%.lib %name%.exp
  547. #else
  548. #implib %name%.lib
  549. #endif
  550. #endif
  551. #pragma link_option(map=>on,oldexe=>off)
  552. #dolink %name%.%ext%
  553. #message "link complete"
  554. #elsif %system = win #then
  555. #set link_arg=%name%.%ext%
  556. #set winexp_=%name%.exp
  557. #set winexe_=%name%.%ext%
  558. #set winlib_=%name%.lib
  559. #set winmap_=%name%.map
  560. #implib %winlib_ %winexp_
  561. #pragma link_option(map=>on,oldexe=>off,windows=>on,export=>on)
  562. #pragma link(windows.lib)
  563. #dolink %link_arg
  564. #message "link complete"
  565. #if "%make" #then
  566. #exemod %winexe_ %winexp_ %winmap_
  567. #endif
  568. #else
  569. #dolink %name%.%ext%
  570. #endif
  571. !! Reset macros indicating what libraries are required
  572. #set tsc=off
  573. #set tscpp=off
  574. #set tspas=off
  575. #set tsm2=off
  576. #set tscla=off
  577. #set cwindow=""
  578. #set cgraph=""
  579. #set pm_api=""
  580. #set pm_compat=""
  581. #set pm_noncompat=""
  582. #set manual_export=""
  583. #pragma restore
  584. !! End of Project Link section
  585. ! Project End
  586. !! =========================================================================
  587.