Template.stopgap.pp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. //
  2. // Template.stopgap.pp
  3. //
  4. // This file defines the set of output files that will be generated to
  5. // support our old-style Makefile system. It is intended to aid as a
  6. // transition to the new system.
  7. //
  8. //////////////////////////////////////////////////////////////////////
  9. #if $[eq $[DIR_TYPE], src]
  10. //////////////////////////////////////////////////////////////////////
  11. // For a source directory, build a Makefile, Makefile.install, and a
  12. // Makefile.target for each target.
  13. #define submakes $[TARGET(static_lib_target):%=%.a] $[TARGET(lib_target noinst_lib_target):%=%.so] $[TARGET(sed_bin_target bin_target noinst_bin_target test_bin_target)]
  14. #define install $[TARGET(static_lib_target):%=%.a] $[TARGET(lib_target noinst_lib_target):%=%.so] $[TARGET(sed_bin_target bin_target noinst_bin_target)]
  15. // This map variable lets us identify which metalib, if any, is
  16. // including each library built here.
  17. #map module COMPONENT_LIBS(*/metalib_target)
  18. // Now iterate through the libraries we're building and see which ones
  19. // actually *are* being included in a metalib. For each one that is,
  20. // we install the appropriate deferred file.
  21. #define deferred
  22. #forscopes lib_target
  23. #define metalib $[module $[TARGET],$[TARGET]]
  24. #if $[ne $[metalib],]
  25. #set deferred $[deferred] Deferred.$[metalib].lib$[TARGET].so
  26. #endif
  27. #end lib_target
  28. // Get the full set of libraries we depend on.
  29. #call get_depend_libs
  30. // Also get the targets we'll be installing.
  31. #define install_libs $[sort $[TARGET(lib_target):%=lib%.so] $[TARGET(static_lib_target):%=lib%.a] $[INSTALL_LIBS]]
  32. #define install_bin $[sort $[TARGET(bin_target)] $[INSTALL_BIN]]
  33. #define install_scripts $[sort $[INSTALL_SCRIPTS(static_lib_target lib_target bin_target)] $[TARGET(sed_bin_target)] $[INSTALL_SCRIPTS]]
  34. #define install_headers $[sort $[INSTALL_HEADERS(static_lib_target lib_target bin_target)] $[INSTALL_HEADERS]]
  35. #define install_data $[sort $[INSTALL_DATA(static_lib_target lib_target sed_bin_target bin_target)] $[INSTALL_DATA]]
  36. // Collect the set of interrogate database files we'll install,
  37. // possibly one for each library we build.
  38. #define install_igatedb
  39. #if $[HAVE_PYTHON]
  40. #forscopes lib_target
  41. #if $[ne $[IGATESCAN],]
  42. #set install_igatedb $[install_igatedb] lib$[TARGET].in
  43. #endif
  44. #end lib_target
  45. #endif
  46. #output Makefile
  47. #format makefile
  48. #### Meta Makefile.
  49. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  50. ################################# DO NOT EDIT ###########################
  51. #### Sub make targets (extension of sub Makefile, eg 'foo' for Makefile.foo):
  52. SUBMAKES = $[submakes]
  53. #### List the minimal set of sub makes on the list above required to install.
  54. INSTALL = $[install]
  55. #### Location of sub Makefiles.
  56. MAKEDIR = .
  57. #### The action is here.
  58. include $(DTOOL)/inc/Makefile.meta.rules
  59. #### Sub-make build order dependencies:
  60. # foo: bar
  61. #end Makefile
  62. #output Makefile.install
  63. #format makefile
  64. #### Installation makefile
  65. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  66. ################################# DO NOT EDIT ###########################
  67. # Note: This file is included by the project-wide Makefile so the current
  68. # directory is the project root. Also, commented-out fields are optional.
  69. #### Package name and location (if not src/all/$(PACKAGE)):
  70. PACKAGE = $[DIRNAME]
  71. PKGROOT = $[PATH]
  72. ifneq (,$(PACKAGE))
  73. #### Package dependencies (USESOTHER needs relative paths from project root):
  74. USESLIBS = $[depend_libs]
  75. # USESINCLUDE =
  76. # USESOTHER =
  77. #### Installed files:
  78. LIBS = $[install_libs]
  79. DEFERRED = $[deferred]
  80. INCLUDE = $[install_headers]
  81. BINS = $[install_bin]
  82. SCRIPTS = $[install_scripts]
  83. # SS =
  84. # STK =
  85. # MODELS =
  86. ETC = $[install_data]
  87. IGATEDB =$[install_igatedb]
  88. # DOC =
  89. # MAN =
  90. # FONTS =
  91. # ICONS =
  92. # APPDEFAULTS =
  93. # TCL =
  94. # TELEUSE =
  95. # SHADERS =
  96. #### Other files to be installed (use relative pathname from project root):
  97. #if $[ne $[INSTALL_PARSER_INC],]
  98. PARSER_INC = $[INSTALL_PARSER_INC]
  99. SRC_PARSER_INC = $(addprefix $(PKGROOT)/,$(PARSER_INC))
  100. INST_PARSER_INC = $(addprefix inc/parser-inc/,$(PARSER_INC))
  101. OTHER = $(INST_PARSER_INC)
  102. #else
  103. # OTHER =
  104. #endif
  105. #### Where the action happens.
  106. include $(DTOOL)/inc/Makefile.install.rules
  107. #### Install actions for OTHER files (source must be in $(PKGROOT)):
  108. # [ installed file ] : $(PKGROOT)/[ source file ] # Files must have same name
  109. # $(INSTALL) # Copies from source to dest
  110. #
  111. # [ installed file ] : $(PKGROOT)/[ source file ]
  112. # $(MKINSTALL) # Also makes directory if needed
  113. #if $[ne $[INSTALL_PARSER_INC],]
  114. $(INST_PARSER_INC) : inc/parser-inc/% : $(PKGROOT)/%
  115. $(MKINSTALL)
  116. #endif
  117. #### Other install/uninstall actions:
  118. # install-$(PKGROOT): #Add dependencies here
  119. # Add actions here
  120. #
  121. # uninstall-$(PKGROOT): #Add dependencies here
  122. # Add actions here
  123. #### Sub-package Makefile.install inclusions:
  124. # include foo/Makefile.install
  125. endif
  126. #end Makefile.install
  127. // Now generate a suitable Makefile for each library target.
  128. #forscopes lib_target noinst_lib_target
  129. // Again, is this library included in a metalib? If so, output the
  130. // appropriate deferred rules.
  131. #define metalib $[module $[TARGET],$[TARGET]]
  132. // We might need to define a BUILDING_ symbol for win32. We use the
  133. // BUILDING_DLL variable name, defined typically in the metalib, for
  134. // this; but in some cases, where the library isn't part of a metalib,
  135. // we define BUILDING_DLL directly for the target.
  136. #define building_var $[BUILDING_DLL]
  137. #if $[ne $[metalib],]
  138. #set building_var $[module $[BUILDING_DLL],$[TARGET]]
  139. #endif
  140. // Get the full set of sources for this target.
  141. #call get_sources
  142. #call get_libs
  143. // Which files will we interrogate, if any?
  144. #if $[HAVE_PYTHON]
  145. #if $[ne $[IGATESCAN],]
  146. #if $[eq $[IGATESCAN],all]
  147. #define igatescan $[filter-out %.I %.lxx %.yxx %.N,$[sources]]
  148. #else
  149. #define igatescan $[IGATESCAN]
  150. #endif
  151. #endif
  152. #endif
  153. #output Makefile.$[TARGET].so
  154. #format makefile
  155. #### Makefile for DSO's. Any fields commented out are optional.
  156. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  157. ################################# DO NOT EDIT ###########################
  158. #### Target's name:
  159. TARGET = lib$[TARGET].so
  160. DEFERRED_TARGET = $[metalib]
  161. # Standard .o file conversion information.
  162. #### Lex files
  163. LFILES = $[filter %.lxx,$[sources]]
  164. LEX = flex
  165. LFLAGS = $[LFLAGS] $[YACC_PREFIX:%=-P%] -olex.yy.c
  166. LEXTENSION = cxx
  167. #### Yacc files
  168. YFILES = $[filter %.yxx,$[sources]]
  169. YACC = bison
  170. YFLAGS = -y -d $[patsubst %,--name-prefix=%,$[YACC_PREFIX]]
  171. YEXTENSION = cxx
  172. #### C files
  173. CFILES = $[filter %.c,$[sources]]
  174. CFLAGS = $[building_var:%=-D%] $[alt_cflags] $[CFLAGS]
  175. #### C++ files
  176. C++FILES = $[filter %.cxx,$[sources]]
  177. C++FLAGS = $[building_var:%=-D%] $[alt_cflags] $[C++FLAGS]
  178. # USETEMPLATES = TRUE
  179. # PTREPOSITORY = # Specify only if you want a specific name
  180. #### Interrogate info
  181. IGATESCAN = $[igatescan]
  182. IGATEFLAGS = $[alt_ipath]
  183. # IGATEFILE = # Specify only if you want a specific name
  184. #### Additional search directories for C/C++ header files:
  185. IPATH = $[alt_ipath]
  186. #### Location to put .o files:
  187. # ODIR =
  188. #### Source file dependencies (unnecessary with clearmake)
  189. # foo.c: foo.h
  190. #### Other files and lib. Include $(ODIR) in any .o names.
  191. # OFILES =
  192. WHEN_NO_DEFER_LIBS = $[when_no_defer:%=-l%]
  193. WHEN_DEFER_LIBS = $[when_defer:%=-l%]
  194. LIBS = $[when_either:%=-l%]
  195. SYSLIBS = $[patsubst %.lib,%.lib,%,-l%,$[unique $[alt_libs]]]
  196. #### Additional search directories for lib:
  197. LPATH = $[alt_lpath]
  198. #### Other linker flags.
  199. #if $[ne $[alt_ld],]
  200. LD = $[alt_ld]
  201. #endif
  202. # LDFLAGS =
  203. #### Pull in standard .o make variables
  204. include $(DTOOL)/inc/Makefile.o.vars
  205. #### The .o action is here.
  206. include $(DTOOL)/inc/Makefile.o.rules
  207. #### Pull in standard binary make variables.
  208. include $(DTOOL)/inc/Makefile.bin.vars
  209. #### The .so action is here.
  210. include $(DTOOL)/inc/Makefile.so.rules
  211. #end Makefile.$[TARGET].so
  212. #end lib_target noinst_lib_target
  213. // Also generate a suitable Makefile for each static library target.
  214. #forscopes static_lib_target
  215. // Get the full set of sources for this target.
  216. #call get_sources
  217. #call get_libs
  218. #output Makefile.$[TARGET].a
  219. #format makefile
  220. #### Makefile for archive libraries. Any fields commented out are optional.
  221. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  222. ################################# DO NOT EDIT ###########################
  223. #### Target's name:
  224. TARGET = lib$[TARGET].a
  225. # Standard .o file conversion information.
  226. #### Lex files
  227. LFILES = $[filter %.lxx,$[sources]]
  228. LEX = flex
  229. LFLAGS = $[LFLAGS] $[YACC_PREFIX:%=-P%] -olex.yy.c
  230. LEXTENSION = yy.cxx
  231. # LSUBST =
  232. #### Yacc files
  233. YFILES = $[filter %.yxx,$[sources]]
  234. YACC = bison
  235. YFLAGS = -y -d $[patsubst %,--name-prefix=%,$[YACC_PREFIX]]
  236. YEXTENSION = tab.cxx
  237. # YSUBST =
  238. #### C files
  239. CFILES = $[filter %.c,$[sources]]
  240. CFLAGS = $[building_var:%=-D%] $[alt_cflags] $[CFLAGS]
  241. #### C++ files
  242. C++FILES = $[filter %.cxx,$[sources]]
  243. C++FLAGS = $[building_var:%=-D%] $[alt_cflags] $[C++FLAGS]
  244. # USETEMPLATES = TRUE
  245. # PTREPOSITORY = # Specify only if you want a specific name
  246. #### Additional search directories for C/C++ header files:
  247. IPATH = $[alt_ipath]
  248. #### Location to put .o files:
  249. # ODIR =
  250. #### Source file dependencies (unnecessary with clearmake)
  251. # foo.c: foo.h
  252. #### Other .o files.
  253. # OFILES =
  254. #### Libs and flags for template instantiation.
  255. WHEN_NO_DEFER_LIBS = $[when_no_defer:%=-l%]
  256. WHEN_DEFER_LIBS = $[when_defer:%=-l%]
  257. LIBS = $[when_either:%=-l%]
  258. SYSLIBS = $[patsubst %.lib,%.lib,%,-l%,$[unique $[alt_libs]]]
  259. #### Additional search directories for lib:
  260. LPATH = $[alt_lpath]
  261. #### Archiver flags
  262. # ARFLAGS =
  263. #### Pull in standard .o make variables
  264. include $(DTOOL)/inc/Makefile.o.vars
  265. #### The .o action is here.
  266. include $(DTOOL)/inc/Makefile.o.rules
  267. #### Pull in standard binary make variables.
  268. include $(DTOOL)/inc/Makefile.bin.vars
  269. #### The .a action is here.
  270. include $(DTOOL)/inc/Makefile.a.rules
  271. #end Makefile.$[TARGET].a
  272. #end static_lib_target
  273. // And also generate a suitable Makefile for each binary target.
  274. #forscopes bin_target noinst_bin_target test_bin_target
  275. // Get the full set of sources for this target.
  276. #call get_sources
  277. #call get_libs
  278. #output Makefile.$[TARGET]
  279. #format makefile
  280. #### Makefile for binaries. Any fields commented out are optional.
  281. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  282. ################################# DO NOT EDIT ###########################
  283. #### Target's name:
  284. TARGET = $[TARGET]
  285. # Standard .o file conversion information.
  286. #### Lex files
  287. LFILES = $[filter %.lxx,$[sources]]
  288. LEX = flex
  289. LFLAGS = $[LFLAGS] $[YACC_PREFIX:%=-P%] -olex.yy.c
  290. LEXTENSION = yy.cxx
  291. # LSUBST =
  292. #### Yacc files
  293. YFILES = $[filter %.yxx,$[sources]]
  294. YACC = bison
  295. YFLAGS = -y -d $[patsubst %,--name-prefix=%,$[YACC_PREFIX]]
  296. YEXTENSION = tab.cxx
  297. # YSUBST =
  298. #### C files
  299. CFILES = $[filter %.c,$[sources]]
  300. CFLAGS = $[building_var:%=-D%] $[alt_cflags] $[CFLAGS]
  301. #### C++ files
  302. C++FILES = $[filter %.cxx,$[sources]]
  303. C++FLAGS = $[building_var:%=-D%] $[alt_cflags] $[C++FLAGS]
  304. #### Additional search directories for C/C++ header files:
  305. IPATH = $[alt_ipath]
  306. #### Location to put .o files:
  307. # ODIR =
  308. #### Source file dependencies (unnecessary with clearmake)
  309. # foo.c: foo.h
  310. #### Other files and lib. Include $(ODIR) in any .o names.
  311. # OFILES =
  312. WHEN_NO_DEFER_LIBS = $[when_no_defer:%=-l%]
  313. WHEN_DEFER_LIBS = $[when_defer:%=-l%]
  314. LIBS = $[when_either:%=-l%]
  315. SYSLIBS = $[patsubst %.lib,%.lib,%,-l%,$[unique $[alt_libs]]]
  316. #### Additional search directories for lib:
  317. LPATH = $[alt_lpath]
  318. #### Other linker flags.
  319. #if $[ne $[alt_ld],]
  320. LD = $[alt_ld]
  321. #endif
  322. # LDFLAGS =
  323. #### Pull in standard .o make variables
  324. include $(DTOOL)/inc/Makefile.o.vars
  325. #### The .o action is here.
  326. include $(DTOOL)/inc/Makefile.o.rules
  327. #### Pull in standard binary make variables.
  328. include $(DTOOL)/inc/Makefile.bin.vars
  329. #### The bin action is here.
  330. include $(DTOOL)/inc/Makefile.bin.rules
  331. #end Makefile.$[TARGET]
  332. #end bin_target noinst_bin_target test_bin_target
  333. // Finally, generate the special scripts from the sed_bin_targets. Hopefully
  334. // there won't be too many of these in the tree, since these are fairly
  335. // Unix-specific.
  336. #forscopes sed_bin_target
  337. #output Makefile.$[TARGET]
  338. #format makefile
  339. #### This is a special makefile just to generate the $[TARGET] script.
  340. $[TARGET] : $[SOURCE]
  341. sed $[COMMAND] $^ >$@
  342. chmod +x $@
  343. clean :
  344. cleanall :
  345. rm -f $[TARGET]
  346. #end Makefile.$[TARGET]
  347. #end sed_bin_target
  348. //////////////////////////////////////////////////////////////////////
  349. #elif $[eq $[DIR_TYPE], metalib]
  350. //////////////////////////////////////////////////////////////////////
  351. // A metalib directory is similar to a regular source directory,
  352. // but a little simpler.
  353. #define submakes $[TARGET(metalib_target):%=%.so]
  354. // This map variable lets us identify which metalib, if any, is
  355. // including each library built here.
  356. #map module COMPONENT_LIBS(*/metalib_target)
  357. // Get the full set of libraries we depend on.
  358. #call get_depend_libs
  359. // Also get the targets we'll be installing.
  360. #define install_libs $[TARGET(metalib_target):%=lib%.so]
  361. #define install_headers $[INSTALL_HEADERS(metalib_target)]
  362. #define install_data $[INSTALL_DATA(metalib_target)]
  363. #output Makefile
  364. #format makefile
  365. #### Meta Makefile.
  366. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  367. ################################# DO NOT EDIT ###########################
  368. #### Sub make targets (extension of sub Makefile, eg 'foo' for Makefile.foo):
  369. SUBMAKES = $[submakes]
  370. #### List the minimal set of sub makes on the list above required to install.
  371. INSTALL = $[submakes]
  372. #### Location of sub Makefiles.
  373. MAKEDIR = .
  374. #### The action is here.
  375. include $(DTOOL)/inc/Makefile.meta.rules
  376. #### Sub-make build order dependencies:
  377. # foo: bar
  378. #end Makefile
  379. #output Makefile.install
  380. #format makefile
  381. #### Installation makefile
  382. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  383. ################################# DO NOT EDIT ###########################
  384. # Note: This file is included by the project-wide Makefile so the current
  385. # directory is the project root. Also, commented-out fields are optional.
  386. #### Package name and location (if not src/all/$(PACKAGE)):
  387. PACKAGE = $[DIRNAME]
  388. PKGROOT = $[PATH]
  389. ifneq (,$(PACKAGE))
  390. #### Package dependencies (USESOTHER needs relative paths from project root):
  391. USESLIBS = $[depend_libs]
  392. # USESINCLUDE =
  393. # USESOTHER =
  394. #### Installed files:
  395. LIBS = $[install_libs]
  396. INCLUDE = $[install_headers]
  397. # BINS =
  398. # SS =
  399. # STK =
  400. # MODELS =
  401. # ETC =
  402. # DOC =
  403. # MAN =
  404. # FONTS =
  405. # ICONS =
  406. # APPDEFAULTS =
  407. # TCL =
  408. # TELEUSE =
  409. # SHADERS =
  410. #### Other files to be installed (use relative pathname from project root):
  411. # OTHER =
  412. #### Where the action happens.
  413. include $(DTOOL)/inc/Makefile.install.rules
  414. #### Install actions for OTHER files (source must be in $(PKGROOT)):
  415. # [ installed file ] : $(PKGROOT)/[ source file ] # Files must have same name
  416. # $(INSTALL) # Copies from source to dest
  417. #
  418. # [ installed file ] : $(PKGROOT)/[ source file ]
  419. # $(MKINSTALL) # Also makes directory if needed
  420. #### Other install/uninstall actions:
  421. # install-$(PKGROOT): #Add dependencies here
  422. # Add actions here
  423. #
  424. # uninstall-$(PKGROOT): #Add dependencies here
  425. # Add actions here
  426. #### Sub-package Makefile.install inclusions:
  427. # include foo/Makefile.install
  428. endif
  429. #end Makefile.install
  430. // Now generate a suitable Makefile for each metalib target.
  431. #forscopes metalib_target
  432. #define building_var $[BUILDING_DLL]
  433. // Get the full set of sources for this target.
  434. #call get_sources
  435. #call get_libs
  436. #if $[HAVE_PYTHON]
  437. #map components TARGET(*/lib_target */noinst_lib_target)
  438. #if $[ne $[components $[IGATESCAN],$[COMPONENT_LIBS]],]
  439. #define igatemscan $[TARGET]
  440. #endif
  441. #endif
  442. #output Makefile.$[TARGET].so
  443. #format makefile
  444. #### Makefile for DSO's. Any fields commented out are optional.
  445. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  446. ################################# DO NOT EDIT ###########################
  447. #### Target's name:
  448. TARGET = lib$[TARGET].so
  449. # Standard .o file conversion information.
  450. #### Lex files
  451. LFILES = $[filter %.lxx,$[sources]]
  452. LEX = flex
  453. LFLAGS = $[LFLAGS] $[YACC_PREFIX:%=-P%] -olex.yy.c
  454. LEXTENSION = yy.cxx
  455. # LSUBST =
  456. #### Yacc files
  457. YFILES = $[filter %.yxx,$[sources]]
  458. YACC = bison
  459. YFLAGS = -y -d $[patsubst %,--name-prefix=%,$[YACC_PREFIX]]
  460. YEXTENSION = tab.cxx
  461. # YSUBST =
  462. #### C files
  463. CFILES = $[filter %.c,$[sources]]
  464. CFLAGS = $[building_var:%=-D%] $[alt_cflags] $[CFLAGS]
  465. #### C++ files
  466. C++FILES = $[filter %.cxx,$[sources]]
  467. C++FLAGS = $[building_var:%=-D%] $[alt_cflags] $[C++FLAGS]
  468. # USETEMPLATES = TRUE
  469. # PTREPOSITORY = # Specify only if you want a specific name
  470. #### Interrogate info
  471. # IGATESCAN =
  472. # IGATEFLAGS =
  473. # IGATEFILE = # Specify only if you want a specific name
  474. IGATEMSCAN = $[igatemscan]
  475. #### Pull in deferred-target files built in other packages
  476. DEFERRED_FILES = $[TARGET]
  477. #### Additional search directories for C/C++ header files:
  478. IPATH = $[alt_ipath]
  479. #### Location to put .o files:
  480. # ODIR =
  481. #### Source file dependencies (unnecessary with clearmake)
  482. # foo.c: foo.h
  483. #### Other files and lib. Include $(ODIR) in any .o names.
  484. # OFILES =
  485. WHEN_NO_DEFER_LIBS = $[when_no_defer:%=-l%]
  486. WHEN_DEFER_LIBS = $[when_defer:%=-l%]
  487. LIBS = $[when_either:%=-l%]
  488. SYSLIBS = $[patsubst %.lib,%.lib,%,-l%,$[unique $[alt_libs]]]
  489. #### Additional search directories for lib:
  490. LPATH = $[alt_lpath]
  491. #### Other linker flags.
  492. #if $[ne $[alt_ld],]
  493. LD = $[alt_ld]
  494. #endif
  495. # LDFLAGS =
  496. #### Pull in standard .o make variables
  497. include $(DTOOL)/inc/Makefile.o.vars
  498. #### The .o action is here.
  499. include $(DTOOL)/inc/Makefile.o.rules
  500. #### Pull in standard binary make variables.
  501. include $(DTOOL)/inc/Makefile.bin.vars
  502. #### The .so action is here.
  503. include $(DTOOL)/inc/Makefile.so.rules
  504. #end Makefile.$[TARGET].so
  505. #end metalib_target
  506. //////////////////////////////////////////////////////////////////////
  507. #elif $[eq $[DIR_TYPE], group]
  508. //////////////////////////////////////////////////////////////////////
  509. // This is a group directory: a directory above a collection of source
  510. // directories, e.g. $DTOOL/src. We don't need to output anything in
  511. // this directory.
  512. //////////////////////////////////////////////////////////////////////
  513. #elif $[eq $[DIR_TYPE], toplevel]
  514. //////////////////////////////////////////////////////////////////////
  515. // This is the toplevel directory, e.g. $DTOOL. Here we build the
  516. // root makefile and also synthesize the dtool_config.h (or whichever
  517. // file) we need.
  518. #output Makefile
  519. #format makefile
  520. #### Generated automatically by $[PROGRAM] $[PROGVER] from $[SOURCEFILE].
  521. ################################# DO NOT EDIT ###########################
  522. # Specify project name and project root directory.
  523. CTPROJECT = $[PACKAGE]
  524. CTPROJROOT = $($[upcase $[PACKAGE]])
  525. include $(DTOOL)/inc/Makefile.project.vars
  526. // Iterate through all of our known source files. Each src and
  527. // metalib type file gets its corresponding Makefile.install listed
  528. // here. However, we test for $[DIR_TYPE] of toplevel, because the
  529. // source directories typically don't define their own DIR_TYPE
  530. // variable, and they end up inheriting this one dynamically.
  531. #forscopes */
  532. #if $[or $[eq $[DIR_TYPE], src],$[eq $[DIR_TYPE], metalib],$[and $[eq $[DIR_TYPE], toplevel],$[ne $[DIRNAME],top]]]
  533. #if $[build_directory]
  534. include $[PATH]/Makefile.install
  535. #endif
  536. #endif
  537. #end */
  538. #end Makefile
  539. // If there is a file called LocalSetup.pp in the package's top
  540. // directory, then invoke that. It might contain some further setup
  541. // instructions.
  542. #sinclude $[TOPDIRPREFIX]LocalSetup.stopgap.pp
  543. #sinclude $[TOPDIRPREFIX]LocalSetup.pp
  544. //////////////////////////////////////////////////////////////////////
  545. #endif // DIR_TYPE