ide_support.cxx 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391
  1. //
  2. // "$Id: ide_support.cxx 8049 2010-12-17 10:43:41Z manolo $"
  3. //
  4. // IDE and Build File generation for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 2010 by Matthias Melcher.
  7. //
  8. // This library is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU Library General Public
  10. // License as published by the Free Software Foundation; either
  11. // version 2 of the License, or (at your option) any later version.
  12. //
  13. // This library is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. // Library General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Library General Public
  19. // License along with this library; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. // USA.
  22. //
  23. // Please report all bugs and problems on the following page:
  24. //
  25. // http://www.fltk.org/str.php
  26. //
  27. /*
  28. IDE SUPPORT IN FLUID
  29. One of the biggest issues in maintaining FLTK has been the maintenance of build
  30. environments. Users are confused when new features of FLTK ar not available
  31. yet for their platform, and may never be unless a volunteer updates and
  32. maintains the corresponding IDE support.
  33. "ide support" will generate sets of IDE files for all supported build
  34. environments, including Makefiles and CMake. Ading a new source file to the
  35. FLTK build tree is as easy as adding the file to the database and
  36. running Fluid.
  37. This module will give Fluid the power to create a database for FLTK based
  38. projects. By linking further IDE support modules, the database can be used
  39. to create IDE build files for many platforms, compilers, and development
  40. environments.
  41. This module creates a database specifically for the FLTK project itself. A
  42. user interface shold be created to create databases for arbitrary projects.
  43. > fluid -fltkdb <filename> # creates the fltk database
  44. DATABASE FORMAT
  45. The database is constructed using Fl_Preferences. Objects in the database are
  46. defined by using a UUID as the group name. References to objects are done using
  47. the same UUID as a value. The mandatory structure is defined in the first block
  48. below. When writing IDE files, additional optional key/value pairs may be
  49. generated. Their key should be marked by a unique prefix.
  50. Standard database format:
  51. /projectName: # name of the project (FLTK)
  52. /ide/ # contains IDE specific data
  53. /targets/ # contains various groups for differen target types
  54. /./libs/ # targets that will be buildt as libraries
  55. /././UUID/ # [multiple] description of a library target
  56. /./././sources/ # all source files required to build the library
  57. /././././UUID/ # [multiple] description of this dependency
  58. /./././././refUUID: # reference to file definitin in /files/
  59. /./././libs/ # all libraries required to build the library
  60. /././././.... # see /targets/libs/UUID/sources/...
  61. /./././fluid/ # all Fluid UI defs required to build the library
  62. /././././.... # see /targets/libs/UUID/sources/...
  63. /./././externals/ # all external libraries required to build the library
  64. /././././.... # see /targets/libs/UUID/sources/...
  65. /./././deps/ # all dependencies on other targets in this project
  66. /././././.... # see /targets/libs/UUID/sources/...
  67. /./apps/ # full blown applications
  68. /././UUID/ # [multiple] description of a application target
  69. /./././... # see /targets/libs/UUID/...
  70. /./tests/ # smaller test applications
  71. /././UUID/ # [multiple] description of a test app target
  72. /./././... # see /targets/libs/UUID/...
  73. /files/ # more information on al referenced files
  74. /./UUID/ # [multiple] description of a file
  75. /././pathAndName: # path and file name relative to the archive root
  76. Xcode3 IDE FILES: see ide_xcode.cxx
  77. VISUALC 2005 IDE FILES: not yet implemented
  78. VISUALC 2008 IDE FILES: not yet implemented
  79. VISUALC 2010 IDE FILES: not yet implemented
  80. CMAKE FILES: not yet implemented
  81. MAKEFILE SYSTEM: not yet implemented
  82. others: not yet implemented
  83. */
  84. #include "ide_support.h"
  85. #include <FL/Fl.H>
  86. #include <FL/fl_ask.H>
  87. #include <FL/Fl_Widget.H>
  88. #include <FL/filename.H>
  89. #include "Fl_Type.h"
  90. /*
  91. * Read a UUID from a database entry. If none exists, create one in the database.
  92. */
  93. void fl_getUUID(Fl_Preferences &db, const char *key, char *buffer) {
  94. db.get(key, buffer, "", 37);
  95. if (buffer[0]==0) {
  96. strcpy(buffer, Fl_Preferences::newUUID());
  97. db.set(key, buffer);
  98. }
  99. }
  100. /*
  101. * Read an Xcode ID from a database entry. If none exists, create one in the database.
  102. * The Xcode ID contains 24 bytes of hexadecimal chracters.
  103. */
  104. void fl_getXCID(Fl_Preferences &db, const char *key, char *buffer) {
  105. db.get(key, buffer, "", 25);
  106. if (buffer[0]==0) {
  107. const char *uuid = Fl_Preferences::newUUID();
  108. // A UUID comes in blocks of 8, 4, 4, 4, and 12 characters
  109. unsigned int i0, i1, i2, i3, i4, i5;
  110. sscanf(uuid, "%8x-%4x-%4x-%4x-%4x%8x", &i0, &i1, &i2, &i3, &i4, &i5);
  111. sprintf(buffer, "%8.8X%4.4X%4.4X%8.8X", i0, i1^i2, i3^i4, i5);
  112. db.set(key, buffer);
  113. }
  114. }
  115. /* A preferences node with some additional functionality */
  116. Fl_IDE_Prefs::Fl_IDE_Prefs(Fl_Preferences &parent, const char *name)
  117. : Fl_Preferences(parent, name) {
  118. }
  119. Fl_IDE_Prefs::Fl_IDE_Prefs(Fl_Preferences &parent, int ix)
  120. : Fl_Preferences(parent, ix) {
  121. }
  122. Fl_IDE_Prefs::Fl_IDE_Prefs(Fl_Preferences::ID id)
  123. : Fl_Preferences(id) {
  124. }
  125. Fl_Preferences::ID Fl_IDE_Prefs::find_by_name(const char *name) {
  126. int i, n = groups();
  127. for (i=0; i<n; i++) {
  128. Fl_Preferences p(this, i);
  129. if (strcmp(name, p.name())==0) return p.id();
  130. }
  131. return 0;
  132. }
  133. Fl_Preferences::ID Fl_IDE_Prefs::find_by_key(const char *key, const char *value) {
  134. int i, n = groups();
  135. for (i=0; i<n; i++) {
  136. Fl_Preferences p(this, i);
  137. char *v;
  138. p.get(key, v, "");
  139. if (strcmp(value, v)==0) { free(v); return p.id(); }
  140. free(v);
  141. }
  142. return 0;
  143. }
  144. Fl_Preferences::ID Fl_IDE_Prefs::add_with_key(const char *key, const char *value, const char *uuid) {
  145. Fl_Preferences::ID ret = find_by_key(key, value);
  146. if (!ret) {
  147. if (!uuid) uuid = Fl_Preferences::newUUID();
  148. Fl_Preferences p(this, uuid);
  149. p.set(key, value);
  150. ret = p.id();
  151. }
  152. return ret;
  153. }
  154. Fl_Target_Prefs::Fl_Target_Prefs(Fl_Preferences::ID id)
  155. : Fl_IDE_Prefs(id) {
  156. }
  157. Fl_Preferences::ID Fl_Target_Prefs::add_source(Fl_IDE_Prefs &fdb, const char *pathAndName) {
  158. Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
  159. Fl_IDE_Prefs p(*this, "sources");
  160. Fl_Preferences::ID id = p.add_with_key("refUUID", file.name());
  161. Fl_Preferences ref(id);
  162. ref.set("(filename)", pathAndName);
  163. return id;
  164. }
  165. Fl_Preferences::ID Fl_Target_Prefs::add_header(Fl_IDE_Prefs &fdb, const char *pathAndName) {
  166. Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
  167. Fl_IDE_Prefs p(*this, "headers");
  168. Fl_Preferences::ID id = p.add_with_key("refUUID", file.name());
  169. Fl_Preferences ref(id);
  170. ref.set("(filename)", pathAndName);
  171. return id;
  172. }
  173. Fl_Preferences::ID Fl_Target_Prefs::add_fl(Fl_IDE_Prefs &fdb, const char *pathAndName) {
  174. Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
  175. Fl_IDE_Prefs p(*this, "fl");
  176. Fl_Preferences::ID id = p.add_with_key("refUUID", file.name());
  177. Fl_Preferences ref(id);
  178. ref.set("(filename)", pathAndName);
  179. return id;
  180. }
  181. Fl_Preferences::ID Fl_Target_Prefs::depends_on(Fl_IDE_Prefs &dep) {
  182. Fl_IDE_Prefs p(*this, "deps");
  183. return p.add_with_key("refUUID", dep.name());
  184. }
  185. Fl_Preferences::ID Fl_Target_Prefs::add_lib(Fl_IDE_Prefs &lib) {
  186. this->depends_on(lib);
  187. Fl_IDE_Prefs p(*this, "libs");
  188. return p.add_with_key("refUUID", lib.name());
  189. }
  190. Fl_Preferences::ID Fl_Target_Prefs::add_external_lib(Fl_IDE_Prefs &fdb, const char *pathAndName) {
  191. Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
  192. Fl_IDE_Prefs p(*this, "externals");
  193. Fl_Preferences::ID id = p.add_with_key("refUUID", file.name());
  194. Fl_Preferences ref(id);
  195. ref.set("(filename)", pathAndName);
  196. return id;
  197. }
  198. Fl_File_Prefs::Fl_File_Prefs(Fl_Preferences &parent, const char *name)
  199. : Fl_Preferences(parent, name) {
  200. }
  201. Fl_File_Prefs::Fl_File_Prefs(Fl_Preferences &parent, int ix)
  202. : Fl_Preferences(parent, ix) {
  203. }
  204. Fl_File_Prefs::Fl_File_Prefs(Fl_Preferences::ID id)
  205. : Fl_Preferences(id) {
  206. }
  207. const char *Fl_File_Prefs::filePath() {
  208. char pan[1024]; get("pathAndName", pan, "DBERROR/DBERROR.DBERR", 1024);
  209. strcpy(pPath, pan);
  210. char *name = (char*)fl_filename_name(pPath);
  211. if (name) *name = 0;
  212. return pPath;
  213. }
  214. const char *Fl_File_Prefs::fileName() {
  215. char pan[1024]; get("pathAndName", pan, "DBERROR/DBERROR.DBERR", 1024);
  216. char *name = (char*)fl_filename_name(pan);
  217. if (name) {
  218. strcpy(pName, name);
  219. } else {
  220. strcpy(pName, pan);
  221. }
  222. char *ext = (char*)fl_filename_ext(pName);
  223. if (ext) *ext = 0;
  224. return pName;
  225. }
  226. const char *Fl_File_Prefs::fullName() {
  227. char pan[1024]; get("pathAndName", pan, "DBERROR/DBERROR.DBERR", 1024);
  228. char *name = (char*)fl_filename_name(pan);
  229. if (name) {
  230. strcpy(pFullName, name);
  231. } else {
  232. strcpy(pFullName, pan);
  233. }
  234. return pFullName;
  235. }
  236. const char *Fl_File_Prefs::fileExt() {
  237. char pan[1024]; get("pathAndName", pan, "DBERROR/DBERROR.DBERR", 1024);
  238. char *ext = (char*)fl_filename_ext(pan);
  239. if (ext) strcpy(pExt, ext);
  240. else pExt[0] = 0;
  241. return pExt;
  242. }
  243. void xcode_only(Fl_Preferences::ID id) {
  244. Fl_Preferences p(id);
  245. p.set("only", "xcode");
  246. }
  247. char with_xcode(Fl_Preferences::ID id) {
  248. Fl_Preferences p(id);
  249. if (p.entryExists("only")) {
  250. char os[16];
  251. p.get("only", os, "xcode", 15);
  252. return (strcmp(os, "xcode")==0);
  253. } else {
  254. return 1;
  255. }
  256. }
  257. void visualc_only(Fl_Preferences::ID id) {
  258. Fl_Preferences p(id);
  259. p.set("only", "visualc");
  260. }
  261. char with_visualc(Fl_Preferences::ID id) {
  262. Fl_Preferences p(id);
  263. if (p.entryExists("only")) {
  264. char os[16];
  265. p.get("only", os, "visualc", 15);
  266. return (strcmp(os, "visualc")==0);
  267. } else {
  268. return 1;
  269. }
  270. }
  271. void makefile_only(Fl_Preferences::ID id) {
  272. Fl_Preferences p(id);
  273. p.set("only", "makefile");
  274. }
  275. char with_makefile(Fl_Preferences::ID id) {
  276. Fl_Preferences p(id);
  277. if (p.entryExists("only")) {
  278. char os[16];
  279. p.get("only", os, "makefile", 15);
  280. return (strcmp(os, "makefile")==0);
  281. } else {
  282. return 1;
  283. }
  284. }
  285. //==============================================================================
  286. int create_new_database(const char *filename)
  287. {
  288. Fl_Preferences *db = new Fl_Preferences(filename, "fltk.org", 0);
  289. // TODO: we do not clear the database anymore! This shoudl keep UUID's
  290. // consistent and reduce the size of check-ins. When removing items from
  291. // the db, we have to do that manually!
  292. //db->clear();
  293. db->set("databaseFormat", "FLUID_IDE_DB");
  294. db->set("databaseVersion", "1.0");
  295. db->set("projectName", "fltk");
  296. db->set("projectVersion", "1.3.0");
  297. Fl_Preferences targets_db(db, "targets");
  298. Fl_IDE_Prefs files_db(*db, "files");
  299. // --- create libraries
  300. Fl_IDE_Prefs libs_db(targets_db, "libs");
  301. Fl_Target_Prefs fltk_lib(libs_db.add_with_key("name", "fltk")); {
  302. fltk_lib.add_source(files_db, "src/Fl.cxx");
  303. fltk_lib.add_source(files_db, "src/Fl_Adjuster.cxx");
  304. fltk_lib.add_source(files_db, "src/Fl_Bitmap.cxx");
  305. fltk_lib.add_source(files_db, "src/Fl_Box.cxx");
  306. fltk_lib.add_source(files_db, "src/Fl_Browser.cxx");
  307. fltk_lib.add_source(files_db, "src/Fl_Browser_.cxx");
  308. fltk_lib.add_source(files_db, "src/Fl_Browser_load.cxx");
  309. fltk_lib.add_source(files_db, "src/Fl_Button.cxx");
  310. fltk_lib.add_source(files_db, "src/Fl_Chart.cxx");
  311. fltk_lib.add_source(files_db, "src/Fl_Check_Browser.cxx");
  312. fltk_lib.add_source(files_db, "src/Fl_Check_Button.cxx");
  313. fltk_lib.add_source(files_db, "src/Fl_Choice.cxx");
  314. fltk_lib.add_source(files_db, "src/Fl_Clock.cxx");
  315. fltk_lib.add_source(files_db, "src/Fl_Color_Chooser.cxx");
  316. fltk_lib.add_source(files_db, "src/Fl_Counter.cxx");
  317. fltk_lib.add_source(files_db, "src/Fl_Device.cxx");
  318. fltk_lib.add_source(files_db, "src/Fl_Dial.cxx");
  319. fltk_lib.add_source(files_db, "src/Fl_Double_Window.cxx");
  320. fltk_lib.add_source(files_db, "src/Fl_File_Browser.cxx");
  321. fltk_lib.add_source(files_db, "src/Fl_File_Chooser.cxx");
  322. fltk_lib.add_source(files_db, "src/Fl_File_Chooser2.cxx");
  323. fltk_lib.add_source(files_db, "src/Fl_File_Icon.cxx");
  324. fltk_lib.add_source(files_db, "src/Fl_File_Input.cxx");
  325. fltk_lib.add_source(files_db, "src/Fl_Group.cxx");
  326. fltk_lib.add_source(files_db, "src/Fl_Help_View.cxx");
  327. fltk_lib.add_source(files_db, "src/Fl_Image.cxx");
  328. fltk_lib.add_source(files_db, "src/Fl_Input.cxx");
  329. fltk_lib.add_source(files_db, "src/Fl_Input_.cxx");
  330. fltk_lib.add_source(files_db, "src/Fl_Light_Button.cxx");
  331. fltk_lib.add_source(files_db, "src/Fl_Menu.cxx");
  332. fltk_lib.add_source(files_db, "src/Fl_Menu_.cxx");
  333. fltk_lib.add_source(files_db, "src/Fl_Menu_Bar.cxx");
  334. fltk_lib.add_source(files_db, "src/Fl_Menu_Button.cxx");
  335. fltk_lib.add_source(files_db, "src/Fl_Menu_Window.cxx");
  336. fltk_lib.add_source(files_db, "src/Fl_Menu_add.cxx");
  337. fltk_lib.add_source(files_db, "src/Fl_Menu_global.cxx");
  338. fltk_lib.add_source(files_db, "src/Fl_Multi_Label.cxx");
  339. fltk_lib.add_source(files_db, "src/Fl_Native_File_Chooser.cxx");
  340. fltk_lib.add_source(files_db, "src/Fl_Overlay_Window.cxx");
  341. fltk_lib.add_source(files_db, "src/Fl_Pack.cxx");
  342. fltk_lib.add_source(files_db, "src/Fl_Paged_Device.cxx");
  343. fltk_lib.add_source(files_db, "src/Fl_Pixmap.cxx");
  344. fltk_lib.add_source(files_db, "src/Fl_Positioner.cxx");
  345. fltk_lib.add_source(files_db, "src/Fl_Printer.cxx");
  346. fltk_lib.add_source(files_db, "src/Fl_Preferences.cxx");
  347. fltk_lib.add_source(files_db, "src/Fl_Progress.cxx");
  348. fltk_lib.add_source(files_db, "src/Fl_Repeat_Button.cxx");
  349. fltk_lib.add_source(files_db, "src/Fl_Return_Button.cxx");
  350. fltk_lib.add_source(files_db, "src/Fl_Roller.cxx");
  351. fltk_lib.add_source(files_db, "src/Fl_Round_Button.cxx");
  352. fltk_lib.add_source(files_db, "src/Fl_Scroll.cxx");
  353. fltk_lib.add_source(files_db, "src/Fl_Scrollbar.cxx");
  354. fltk_lib.add_source(files_db, "src/Fl_Shared_Image.cxx");
  355. fltk_lib.add_source(files_db, "src/Fl_Single_Window.cxx");
  356. fltk_lib.add_source(files_db, "src/Fl_Slider.cxx");
  357. fltk_lib.add_source(files_db, "src/Fl_Sys_Menu_Bar.cxx");
  358. fltk_lib.add_source(files_db, "src/Fl_Table.cxx");
  359. fltk_lib.add_source(files_db, "src/Fl_Table_Row.cxx");
  360. fltk_lib.add_source(files_db, "src/Fl_Tabs.cxx");
  361. fltk_lib.add_source(files_db, "src/Fl_Text_Buffer.cxx");
  362. fltk_lib.add_source(files_db, "src/Fl_Text_Display.cxx");
  363. fltk_lib.add_source(files_db, "src/Fl_Text_Editor.cxx");
  364. fltk_lib.add_source(files_db, "src/Fl_Tile.cxx");
  365. fltk_lib.add_source(files_db, "src/Fl_Tiled_Image.cxx");
  366. fltk_lib.add_source(files_db, "src/Fl_Tooltip.cxx");
  367. fltk_lib.add_source(files_db, "src/Fl_Tree.cxx");
  368. fltk_lib.add_source(files_db, "src/Fl_Tree_Item.cxx");
  369. fltk_lib.add_source(files_db, "src/Fl_Tree_Item_Array.cxx");
  370. fltk_lib.add_source(files_db, "src/Fl_Tree_Prefs.cxx");
  371. fltk_lib.add_source(files_db, "src/Fl_Valuator.cxx");
  372. fltk_lib.add_source(files_db, "src/Fl_Value_Input.cxx");
  373. fltk_lib.add_source(files_db, "src/Fl_Value_Output.cxx");
  374. fltk_lib.add_source(files_db, "src/Fl_Value_Slider.cxx");
  375. fltk_lib.add_source(files_db, "src/Fl_Widget.cxx");
  376. fltk_lib.add_source(files_db, "src/Fl_Window.cxx");
  377. fltk_lib.add_source(files_db, "src/Fl_Window_fullscreen.cxx");
  378. fltk_lib.add_source(files_db, "src/Fl_Window_hotspot.cxx");
  379. fltk_lib.add_source(files_db, "src/Fl_Window_iconize.cxx");
  380. fltk_lib.add_source(files_db, "src/Fl_Wizard.cxx");
  381. fltk_lib.add_source(files_db, "src/Fl_XBM_Image.cxx");
  382. fltk_lib.add_source(files_db, "src/Fl_XPM_Image.cxx");
  383. fltk_lib.add_source(files_db, "src/Fl_abort.cxx");
  384. fltk_lib.add_source(files_db, "src/Fl_add_idle.cxx");
  385. fltk_lib.add_source(files_db, "src/Fl_arg.cxx");
  386. fltk_lib.add_source(files_db, "src/Fl_compose.cxx");
  387. fltk_lib.add_source(files_db, "src/Fl_display.cxx");
  388. fltk_lib.add_source(files_db, "src/Fl_get_key.cxx");
  389. fltk_lib.add_source(files_db, "src/Fl_get_system_colors.cxx");
  390. fltk_lib.add_source(files_db, "src/Fl_grab.cxx");
  391. fltk_lib.add_source(files_db, "src/Fl_lock.cxx");
  392. fltk_lib.add_source(files_db, "src/Fl_own_colormap.cxx");
  393. fltk_lib.add_source(files_db, "src/Fl_visual.cxx");
  394. fltk_lib.add_source(files_db, "src/Fl_x.cxx");
  395. fltk_lib.add_source(files_db, "src/cmap.cxx");
  396. fltk_lib.add_source(files_db, "src/filename_absolute.cxx");
  397. fltk_lib.add_source(files_db, "src/filename_expand.cxx");
  398. fltk_lib.add_source(files_db, "src/filename_ext.cxx");
  399. fltk_lib.add_source(files_db, "src/filename_isdir.cxx");
  400. fltk_lib.add_source(files_db, "src/filename_list.cxx");
  401. fltk_lib.add_source(files_db, "src/filename_match.cxx");
  402. fltk_lib.add_source(files_db, "src/filename_setext.cxx");
  403. fltk_lib.add_source(files_db, "src/fl_arc.cxx");
  404. fltk_lib.add_source(files_db, "src/fl_arci.cxx");
  405. fltk_lib.add_source(files_db, "src/fl_ask.cxx");
  406. fltk_lib.add_source(files_db, "src/fl_boxtype.cxx");
  407. fltk_lib.add_source(files_db, "src/fl_call_main.c");
  408. fltk_lib.add_source(files_db, "src/fl_color.cxx");
  409. fltk_lib.add_source(files_db, "src/fl_cursor.cxx");
  410. fltk_lib.add_source(files_db, "src/fl_curve.cxx");
  411. fltk_lib.add_source(files_db, "src/fl_diamond_box.cxx");
  412. fltk_lib.add_source(files_db, "src/fl_dnd.cxx");
  413. fltk_lib.add_source(files_db, "src/fl_draw.cxx");
  414. fltk_lib.add_source(files_db, "src/fl_draw_image.cxx");
  415. fltk_lib.add_source(files_db, "src/fl_draw_pixmap.cxx");
  416. fltk_lib.add_source(files_db, "src/fl_encoding_latin1.cxx");
  417. fltk_lib.add_source(files_db, "src/fl_encoding_mac_roman.cxx");
  418. fltk_lib.add_source(files_db, "src/fl_engraved_label.cxx");
  419. fltk_lib.add_source(files_db, "src/fl_file_dir.cxx");
  420. fltk_lib.add_source(files_db, "src/fl_font.cxx");
  421. fltk_lib.add_source(files_db, "src/fl_gtk.cxx");
  422. fltk_lib.add_source(files_db, "src/fl_labeltype.cxx");
  423. fltk_lib.add_source(files_db, "src/fl_line_style.cxx");
  424. fltk_lib.add_source(files_db, "src/fl_open_uri.cxx");
  425. fltk_lib.add_source(files_db, "src/fl_oval_box.cxx");
  426. fltk_lib.add_source(files_db, "src/fl_overlay.cxx");
  427. fltk_lib.add_source(files_db, "src/fl_overlay_visual.cxx");
  428. fltk_lib.add_source(files_db, "src/fl_plastic.cxx");
  429. fltk_lib.add_source(files_db, "src/fl_read_image.cxx");
  430. fltk_lib.add_source(files_db, "src/fl_rect.cxx");
  431. fltk_lib.add_source(files_db, "src/fl_round_box.cxx");
  432. fltk_lib.add_source(files_db, "src/fl_rounded_box.cxx");
  433. fltk_lib.add_source(files_db, "src/fl_scroll_area.cxx");
  434. fltk_lib.add_source(files_db, "src/fl_set_font.cxx");
  435. fltk_lib.add_source(files_db, "src/fl_set_fonts.cxx");
  436. fltk_lib.add_source(files_db, "src/fl_shadow_box.cxx");
  437. fltk_lib.add_source(files_db, "src/fl_shortcut.cxx");
  438. fltk_lib.add_source(files_db, "src/fl_show_colormap.cxx");
  439. fltk_lib.add_source(files_db, "src/fl_symbols.cxx");
  440. fltk_lib.add_source(files_db, "src/fl_utf.c");
  441. fltk_lib.add_source(files_db, "src/fl_utf8.cxx");
  442. fltk_lib.add_source(files_db, "src/fl_vertex.cxx");
  443. fltk_lib.add_source(files_db, "src/flstring.c");
  444. fltk_lib.add_source(files_db, "src/numericsort.c");
  445. fltk_lib.add_source(files_db, "src/ps_image.cxx");
  446. fltk_lib.add_source(files_db, "src/scandir.c");
  447. fltk_lib.add_source(files_db, "src/screen_xywh.cxx");
  448. fltk_lib.add_source(files_db, "src/vsnprintf.c");
  449. fltk_lib.add_source(files_db, "src/xutf8/case.c");
  450. fltk_lib.add_source(files_db, "src/xutf8/is_right2left.c");
  451. fltk_lib.add_source(files_db, "src/xutf8/is_spacing.c");
  452. xcode_only(fltk_lib.add_source(files_db, "src/Fl_cocoa.mm"));
  453. xcode_only(fltk_lib.add_source(files_db, "src/Fl_Quartz_Printer.mm"));
  454. xcode_only(fltk_lib.add_source(files_db, "src/Fl_Native_File_Chooser_MAC.mm"));
  455. fltk_lib.add_header(files_db, "FL/Enumerations.H");
  456. fltk_lib.add_header(files_db, "FL/Fl.H");
  457. fltk_lib.add_header(files_db, "FL/Fl_Adjuster.H");
  458. fltk_lib.add_header(files_db, "FL/Fl_Bitmap.H");
  459. fltk_lib.add_header(files_db, "FL/Fl_Box.H");
  460. fltk_lib.add_header(files_db, "FL/Fl_Browser.H");
  461. fltk_lib.add_header(files_db, "FL/Fl_Browser_.H");
  462. fltk_lib.add_header(files_db, "FL/Fl_Button.H");
  463. fltk_lib.add_header(files_db, "FL/Fl_Cairo.H");
  464. fltk_lib.add_header(files_db, "FL/Fl_Cairo_Window.H");
  465. fltk_lib.add_header(files_db, "FL/Fl_Chart.H");
  466. fltk_lib.add_header(files_db, "FL/Fl_Check_Browser.H");
  467. fltk_lib.add_header(files_db, "FL/Fl_Check_Button.H");
  468. fltk_lib.add_header(files_db, "FL/Fl_Choice.H");
  469. fltk_lib.add_header(files_db, "FL/Fl_Clock.H");
  470. fltk_lib.add_header(files_db, "FL/Fl_Color_Chooser.H");
  471. fltk_lib.add_header(files_db, "FL/Fl_Counter.H");
  472. fltk_lib.add_header(files_db, "FL/Fl_Device.H");
  473. fltk_lib.add_header(files_db, "FL/Fl_Dial.H");
  474. fltk_lib.add_header(files_db, "FL/Fl_Double_Window.H");
  475. fltk_lib.add_header(files_db, "FL/Fl_Export.H");
  476. fltk_lib.add_header(files_db, "FL/Fl_File_Browser.H");
  477. fltk_lib.add_header(files_db, "FL/Fl_File_Chooser.H");
  478. fltk_lib.add_header(files_db, "FL/Fl_File_Icon.H");
  479. fltk_lib.add_header(files_db, "FL/Fl_File_Input.H");
  480. fltk_lib.add_header(files_db, "FL/Fl_Fill_Dial.H");
  481. fltk_lib.add_header(files_db, "FL/Fl_Fill_Slider.H");
  482. fltk_lib.add_header(files_db, "FL/Fl_Float_Input.H");
  483. fltk_lib.add_header(files_db, "FL/Fl_FormsBitmap.H");
  484. fltk_lib.add_header(files_db, "FL/Fl_FormsPixmap.H");
  485. fltk_lib.add_header(files_db, "FL/Fl_Free.H");
  486. fltk_lib.add_header(files_db, "FL/Fl_Group.H");
  487. fltk_lib.add_header(files_db, "FL/Fl_Hold_Browser.H");
  488. fltk_lib.add_header(files_db, "FL/Fl_Hor_Fill_Slider.H");
  489. fltk_lib.add_header(files_db, "FL/Fl_Hor_Nice_Slider.H");
  490. fltk_lib.add_header(files_db, "FL/Fl_Hor_Slider.H");
  491. fltk_lib.add_header(files_db, "FL/Fl_Hor_Value_Slider.H");
  492. fltk_lib.add_header(files_db, "FL/Fl_Image.H");
  493. fltk_lib.add_header(files_db, "FL/Fl_Input.H");
  494. fltk_lib.add_header(files_db, "FL/Fl_Input_.H");
  495. fltk_lib.add_header(files_db, "FL/Fl_Input_Choice.H");
  496. fltk_lib.add_header(files_db, "FL/Fl_Int_Input.H");
  497. fltk_lib.add_header(files_db, "FL/Fl_Light_Button.H");
  498. fltk_lib.add_header(files_db, "FL/Fl_Line_Dial.H");
  499. fltk_lib.add_header(files_db, "FL/Fl_Menu.H");
  500. fltk_lib.add_header(files_db, "FL/Fl_Menu_.H");
  501. fltk_lib.add_header(files_db, "FL/Fl_Menu_Bar.H");
  502. fltk_lib.add_header(files_db, "FL/Fl_Menu_Button.H");
  503. fltk_lib.add_header(files_db, "FL/Fl_Menu_Item.H");
  504. fltk_lib.add_header(files_db, "FL/Fl_Menu_Window.H");
  505. fltk_lib.add_header(files_db, "FL/Fl_Multi_Browser.H");
  506. fltk_lib.add_header(files_db, "FL/Fl_Multi_Label.H");
  507. fltk_lib.add_header(files_db, "FL/Fl_Multiline_Input.H");
  508. fltk_lib.add_header(files_db, "FL/Fl_Multiline_Output.H");
  509. fltk_lib.add_header(files_db, "FL/Fl_Native_File_Chooser.H");
  510. fltk_lib.add_header(files_db, "FL/Fl_Nice_Slider.H");
  511. fltk_lib.add_header(files_db, "FL/Fl_Object.H");
  512. fltk_lib.add_header(files_db, "FL/Fl_Output.H");
  513. fltk_lib.add_header(files_db, "FL/Fl_Overlay_Window.H");
  514. fltk_lib.add_header(files_db, "FL/Fl_Pack.H");
  515. fltk_lib.add_header(files_db, "FL/Fl_Paged_Device.H");
  516. fltk_lib.add_header(files_db, "FL/Fl_Pixmap.H");
  517. fltk_lib.add_header(files_db, "FL/Fl_Plugin.H");
  518. fltk_lib.add_header(files_db, "FL/Fl_Positioner.H");
  519. fltk_lib.add_header(files_db, "FL/Fl_Preferences.H");
  520. fltk_lib.add_header(files_db, "FL/Fl_Printer.H");
  521. fltk_lib.add_header(files_db, "FL/Fl_Progress.H");
  522. fltk_lib.add_header(files_db, "FL/Fl_RGB_Image.H");
  523. fltk_lib.add_header(files_db, "FL/Fl_Radio_Button.H");
  524. fltk_lib.add_header(files_db, "FL/Fl_Radio_Light_Button.H");
  525. fltk_lib.add_header(files_db, "FL/Fl_Radio_Round_Button.H");
  526. fltk_lib.add_header(files_db, "FL/Fl_Repeat_Button.H");
  527. fltk_lib.add_header(files_db, "FL/Fl_Return_Button.H");
  528. fltk_lib.add_header(files_db, "FL/Fl_Roller.H");
  529. fltk_lib.add_header(files_db, "FL/Fl_Round_Button.H");
  530. fltk_lib.add_header(files_db, "FL/Fl_Round_Clock.H");
  531. fltk_lib.add_header(files_db, "FL/Fl_Scroll.H");
  532. fltk_lib.add_header(files_db, "FL/Fl_Scrollbar.H");
  533. fltk_lib.add_header(files_db, "FL/Fl_Secret_Input.H");
  534. fltk_lib.add_header(files_db, "FL/Fl_Select_Browser.H");
  535. fltk_lib.add_header(files_db, "FL/Fl_Shared_Image.H");
  536. fltk_lib.add_header(files_db, "FL/Fl_Simple_Counter.H");
  537. fltk_lib.add_header(files_db, "FL/Fl_Single_Window.H");
  538. fltk_lib.add_header(files_db, "FL/Fl_Slider.H");
  539. fltk_lib.add_header(files_db, "FL/Fl_Spinner.H");
  540. fltk_lib.add_header(files_db, "FL/Fl_Sys_Menu_Bar.H");
  541. fltk_lib.add_header(files_db, "FL/Fl_Table.H");
  542. fltk_lib.add_header(files_db, "FL/Fl_Table_Row.H");
  543. fltk_lib.add_header(files_db, "FL/Fl_Tabs.H");
  544. fltk_lib.add_header(files_db, "FL/Fl_Text_Buffer.H");
  545. fltk_lib.add_header(files_db, "FL/Fl_Text_Display.H");
  546. fltk_lib.add_header(files_db, "FL/Fl_Text_Editor.H");
  547. fltk_lib.add_header(files_db, "FL/Fl_Tile.H");
  548. fltk_lib.add_header(files_db, "FL/Fl_Tiled_Image.H");
  549. fltk_lib.add_header(files_db, "FL/Fl_Timer.H");
  550. fltk_lib.add_header(files_db, "FL/Fl_Toggle_Button.H");
  551. fltk_lib.add_header(files_db, "FL/Fl_Toggle_Light_Button.H");
  552. fltk_lib.add_header(files_db, "FL/Fl_Toggle_Round_Button.H");
  553. fltk_lib.add_header(files_db, "FL/Fl_Tooltip.H");
  554. fltk_lib.add_header(files_db, "FL/Fl_Tree.H");
  555. fltk_lib.add_header(files_db, "FL/Fl_Tree_Item.H");
  556. fltk_lib.add_header(files_db, "FL/Fl_Tree_Item_Array.H");
  557. fltk_lib.add_header(files_db, "FL/Fl_Tree_Prefs.H");
  558. fltk_lib.add_header(files_db, "FL/Fl_Valuator.H");
  559. fltk_lib.add_header(files_db, "FL/Fl_Value_Input.H");
  560. fltk_lib.add_header(files_db, "FL/Fl_Value_Output.H");
  561. fltk_lib.add_header(files_db, "FL/Fl_Value_Slider.H");
  562. fltk_lib.add_header(files_db, "FL/Fl_Widget.H");
  563. fltk_lib.add_header(files_db, "FL/Fl_Window.H");
  564. fltk_lib.add_header(files_db, "FL/Fl_Wizard.H");
  565. fltk_lib.add_header(files_db, "FL/Fl_XBM_Image.H");
  566. fltk_lib.add_header(files_db, "FL/Fl_XPM_Image.H");
  567. fltk_lib.add_header(files_db, "FL/Xutf8.h");
  568. fltk_lib.add_header(files_db, "FL/dirent.h");
  569. fltk_lib.add_header(files_db, "FL/filename.H");
  570. fltk_lib.add_header(files_db, "FL/fl_ask.H");
  571. fltk_lib.add_header(files_db, "FL/fl_draw.H");
  572. fltk_lib.add_header(files_db, "FL/fl_message.H");
  573. fltk_lib.add_header(files_db, "FL/fl_show_colormap.H");
  574. fltk_lib.add_header(files_db, "FL/fl_show_input.H");
  575. fltk_lib.add_header(files_db, "FL/fl_types.h");
  576. fltk_lib.add_header(files_db, "FL/fl_utf8.h");
  577. fltk_lib.add_header(files_db, "FL/mac.H");
  578. fltk_lib.add_header(files_db, "FL/math.h");
  579. fltk_lib.add_header(files_db, "FL/names.h");
  580. fltk_lib.add_header(files_db, "FL/win32.H");
  581. fltk_lib.add_header(files_db, "FL/x.H");
  582. xcode_only(fltk_lib.add_external_lib(files_db, "/System/Library/Frameworks/AudioToolbox.framework"));
  583. }
  584. Fl_Target_Prefs fltk_gl_lib(libs_db.add_with_key("name", "fltk_gl")); {
  585. fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Choice.cxx");
  586. fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Device_Plugin.cxx");
  587. fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Overlay.cxx");
  588. fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Window.cxx");
  589. fltk_gl_lib.add_source(files_db, "src/freeglut_geometry.cxx");
  590. fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_mono_roman.cxx");
  591. fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_roman.cxx");
  592. fltk_gl_lib.add_source(files_db, "src/freeglut_teapot.cxx");
  593. fltk_gl_lib.add_source(files_db, "src/gl_draw.cxx");
  594. fltk_gl_lib.add_source(files_db, "src/glut_compatability.cxx");
  595. fltk_gl_lib.add_source(files_db, "src/glut_font.cxx");
  596. fltk_gl_lib.add_header(files_db, "FL/Fl_Gl_Window.H");
  597. fltk_gl_lib.add_header(files_db, "FL/gl.h");
  598. fltk_gl_lib.add_header(files_db, "FL/gl2opengl.h");
  599. fltk_gl_lib.add_header(files_db, "FL/gl_draw.H");
  600. fltk_gl_lib.add_header(files_db, "FL/glu.h");
  601. fltk_gl_lib.add_header(files_db, "FL/glut.H");
  602. xcode_only(fltk_gl_lib.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  603. xcode_only(fltk_gl_lib.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  604. fltk_gl_lib.add_lib(fltk_lib);
  605. }
  606. Fl_Target_Prefs fltk_images_lib(libs_db.add_with_key("name", "fltk_images")); {
  607. fltk_images_lib.add_source(files_db, "src/Fl_BMP_Image.cxx");
  608. fltk_images_lib.add_source(files_db, "src/Fl_File_Icon2.cxx");
  609. fltk_images_lib.add_source(files_db, "src/Fl_GIF_Image.cxx");
  610. fltk_images_lib.add_source(files_db, "src/Fl_Help_Dialog.cxx");
  611. fltk_images_lib.add_source(files_db, "src/Fl_JPEG_Image.cxx");
  612. fltk_images_lib.add_source(files_db, "src/Fl_PNG_Image.cxx");
  613. fltk_images_lib.add_source(files_db, "src/Fl_PNM_Image.cxx");
  614. fltk_images_lib.add_source(files_db, "src/fl_images_core.cxx");
  615. fltk_images_lib.add_header(files_db, "FL/Fl_BMP_Image.H");
  616. fltk_images_lib.add_header(files_db, "FL/Fl_GIF_Image.H");
  617. fltk_images_lib.add_header(files_db, "FL/Fl_Help_Dialog.H");
  618. fltk_images_lib.add_header(files_db, "FL/Fl_Help_View.H");
  619. fltk_images_lib.add_header(files_db, "FL/Fl_JPEG_Image.H");
  620. fltk_images_lib.add_header(files_db, "FL/Fl_PNG_Image.H");
  621. fltk_images_lib.add_header(files_db, "FL/Fl_PNM_Image.H");
  622. fltk_images_lib.add_lib(fltk_lib);
  623. }
  624. Fl_Target_Prefs fltk_png_lib(libs_db.add_with_key("name", "fltk_png")); {
  625. fltk_png_lib.add_source(files_db, "png/png.c");
  626. fltk_png_lib.add_source(files_db, "png/pngerror.c");
  627. fltk_png_lib.add_source(files_db, "png/pngget.c");
  628. fltk_png_lib.add_source(files_db, "png/pngmem.c");
  629. fltk_png_lib.add_source(files_db, "png/pngpread.c");
  630. fltk_png_lib.add_source(files_db, "png/pngread.c");
  631. fltk_png_lib.add_source(files_db, "png/pngrio.c");
  632. fltk_png_lib.add_source(files_db, "png/pngrtran.c");
  633. fltk_png_lib.add_source(files_db, "png/pngrutil.c");
  634. fltk_png_lib.add_source(files_db, "png/pngset.c");
  635. fltk_png_lib.add_source(files_db, "png/pngtrans.c");
  636. fltk_png_lib.add_source(files_db, "png/pngwio.c");
  637. fltk_png_lib.add_source(files_db, "png/pngwrite.c");
  638. fltk_png_lib.add_source(files_db, "png/pngwtran.c");
  639. fltk_png_lib.add_source(files_db, "png/pngwutil.c");
  640. xcode_only(fltk_png_lib.add_external_lib(files_db, "/usr/lib/libz.dylib"));
  641. fltk_images_lib.add_lib(fltk_png_lib);
  642. }
  643. Fl_Target_Prefs fltk_jpeg_lib(libs_db.add_with_key("name", "fltk_jpeg")); {
  644. fltk_jpeg_lib.add_source(files_db, "jpeg/jcapimin.c");
  645. fltk_jpeg_lib.add_source(files_db, "jpeg/jcapistd.c");
  646. fltk_jpeg_lib.add_source(files_db, "jpeg/jccoefct.c");
  647. fltk_jpeg_lib.add_source(files_db, "jpeg/jccolor.c");
  648. fltk_jpeg_lib.add_source(files_db, "jpeg/jcdctmgr.c");
  649. fltk_jpeg_lib.add_source(files_db, "jpeg/jchuff.c");
  650. fltk_jpeg_lib.add_source(files_db, "jpeg/jcinit.c");
  651. fltk_jpeg_lib.add_source(files_db, "jpeg/jcmainct.c");
  652. fltk_jpeg_lib.add_source(files_db, "jpeg/jcmarker.c");
  653. fltk_jpeg_lib.add_source(files_db, "jpeg/jcmaster.c");
  654. fltk_jpeg_lib.add_source(files_db, "jpeg/jcomapi.c");
  655. fltk_jpeg_lib.add_source(files_db, "jpeg/jcparam.c");
  656. fltk_jpeg_lib.add_source(files_db, "jpeg/jcphuff.c");
  657. fltk_jpeg_lib.add_source(files_db, "jpeg/jcprepct.c");
  658. fltk_jpeg_lib.add_source(files_db, "jpeg/jcsample.c");
  659. fltk_jpeg_lib.add_source(files_db, "jpeg/jctrans.c");
  660. fltk_jpeg_lib.add_source(files_db, "jpeg/jdapimin.c");
  661. fltk_jpeg_lib.add_source(files_db, "jpeg/jdapistd.c");
  662. fltk_jpeg_lib.add_source(files_db, "jpeg/jdatadst.c");
  663. fltk_jpeg_lib.add_source(files_db, "jpeg/jdatasrc.c");
  664. fltk_jpeg_lib.add_source(files_db, "jpeg/jdcoefct.c");
  665. fltk_jpeg_lib.add_source(files_db, "jpeg/jdcolor.c");
  666. fltk_jpeg_lib.add_source(files_db, "jpeg/jddctmgr.c");
  667. fltk_jpeg_lib.add_source(files_db, "jpeg/jdhuff.c");
  668. fltk_jpeg_lib.add_source(files_db, "jpeg/jdinput.c");
  669. fltk_jpeg_lib.add_source(files_db, "jpeg/jdmainct.c");
  670. fltk_jpeg_lib.add_source(files_db, "jpeg/jdmarker.c");
  671. fltk_jpeg_lib.add_source(files_db, "jpeg/jdmaster.c");
  672. fltk_jpeg_lib.add_source(files_db, "jpeg/jdmerge.c");
  673. fltk_jpeg_lib.add_source(files_db, "jpeg/jdphuff.c");
  674. fltk_jpeg_lib.add_source(files_db, "jpeg/jdpostct.c");
  675. fltk_jpeg_lib.add_source(files_db, "jpeg/jdsample.c");
  676. fltk_jpeg_lib.add_source(files_db, "jpeg/jdtrans.c");
  677. fltk_jpeg_lib.add_source(files_db, "jpeg/jerror.c");
  678. fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctflt.c");
  679. fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctfst.c");
  680. fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctint.c");
  681. fltk_jpeg_lib.add_source(files_db, "jpeg/jidctflt.c");
  682. fltk_jpeg_lib.add_source(files_db, "jpeg/jidctfst.c");
  683. fltk_jpeg_lib.add_source(files_db, "jpeg/jidctint.c");
  684. fltk_jpeg_lib.add_source(files_db, "jpeg/jidctred.c");
  685. fltk_jpeg_lib.add_source(files_db, "jpeg/jmemmgr.c");
  686. fltk_jpeg_lib.add_source(files_db, "jpeg/jmemnobs.c");
  687. fltk_jpeg_lib.add_source(files_db, "jpeg/jquant1.c");
  688. fltk_jpeg_lib.add_source(files_db, "jpeg/jquant2.c");
  689. fltk_jpeg_lib.add_source(files_db, "jpeg/jutils.c");
  690. fltk_jpeg_lib.add_lib(fltk_lib);
  691. fltk_images_lib.add_lib(fltk_jpeg_lib);
  692. }
  693. Fl_Target_Prefs fltk_forms_lib(libs_db.add_with_key("name", "fltk_forms")); {
  694. fltk_forms_lib.add_source(files_db, "src/forms_bitmap.cxx");
  695. fltk_forms_lib.add_source(files_db, "src/forms_compatability.cxx");
  696. fltk_forms_lib.add_source(files_db, "src/forms_free.cxx");
  697. fltk_forms_lib.add_source(files_db, "src/forms_fselect.cxx");
  698. fltk_forms_lib.add_source(files_db, "src/forms_pixmap.cxx");
  699. fltk_forms_lib.add_source(files_db, "src/forms_timer.cxx");
  700. fltk_forms_lib.add_header(files_db, "FL/forms.H");
  701. fltk_forms_lib.add_lib(fltk_lib);
  702. }
  703. Fl_Target_Prefs fltk_z_lib(libs_db.add_with_key("name", "fltk_zlib")); {
  704. fltk_z_lib.add_source(files_db, "zlib/adler32.c");
  705. fltk_z_lib.add_source(files_db, "zlib/compress.c");
  706. fltk_z_lib.add_source(files_db, "zlib/crc32.c");
  707. fltk_z_lib.add_source(files_db, "zlib/deflate.c");
  708. fltk_z_lib.add_source(files_db, "zlib/gzio.c");
  709. fltk_z_lib.add_source(files_db, "zlib/inffast.c");
  710. fltk_z_lib.add_source(files_db, "zlib/inflate.c");
  711. fltk_z_lib.add_source(files_db, "zlib/inftrees.c");
  712. fltk_z_lib.add_source(files_db, "zlib/trees.c");
  713. fltk_z_lib.add_source(files_db, "zlib/uncompr.c");
  714. fltk_z_lib.add_source(files_db, "zlib/zutil.c");
  715. fltk_png_lib.add_lib(fltk_z_lib);
  716. }
  717. // --- create applications
  718. Fl_IDE_Prefs apps_db(targets_db, "apps");
  719. Fl_Target_Prefs fluid_app(apps_db.add_with_key("name", "Fluid")); {
  720. fluid_app.add_source(files_db, "fluid/CodeEditor.cxx");
  721. fluid_app.add_source(files_db, "fluid/Fl_Function_Type.cxx");
  722. fluid_app.add_source(files_db, "fluid/Fl_Group_Type.cxx");
  723. fluid_app.add_source(files_db, "fluid/Fl_Menu_Type.cxx");
  724. fluid_app.add_source(files_db, "fluid/Fl_Type.cxx");
  725. fluid_app.add_source(files_db, "fluid/Fl_Widget_Type.cxx");
  726. fluid_app.add_source(files_db, "fluid/Fl_Window_Type.cxx");
  727. fluid_app.add_source(files_db, "fluid/Fluid_Image.cxx");
  728. fluid_app.add_source(files_db, "fluid/about_panel.cxx");
  729. fluid_app.add_source(files_db, "fluid/align_widget.cxx");
  730. fluid_app.add_source(files_db, "fluid/alignment_panel.cxx");
  731. fluid_app.add_source(files_db, "fluid/code.cxx");
  732. fluid_app.add_source(files_db, "fluid/factory.cxx");
  733. fluid_app.add_source(files_db, "fluid/file.cxx");
  734. fluid_app.add_source(files_db, "fluid/fluid.cxx");
  735. fluid_app.add_source(files_db, "fluid/function_panel.cxx");
  736. fluid_app.add_source(files_db, "fluid/ide_maketools.cxx");
  737. fluid_app.add_source(files_db, "fluid/ide_support.cxx");
  738. fluid_app.add_source(files_db, "fluid/ide_visualc.cxx");
  739. fluid_app.add_source(files_db, "fluid/ide_xcode.cxx");
  740. fluid_app.add_source(files_db, "fluid/template_panel.cxx");
  741. fluid_app.add_source(files_db, "fluid/undo.cxx");
  742. fluid_app.add_source(files_db, "fluid/widget_panel.cxx");
  743. fluid_app.add_header(files_db, "fluid/CodeEditor.h");
  744. fluid_app.add_header(files_db, "fluid/Fl_Type.h");
  745. fluid_app.add_header(files_db, "fluid/Fl_Widget_Type.h");
  746. fluid_app.add_header(files_db, "fluid/Fluid_Image.h");
  747. fluid_app.add_header(files_db, "fluid/Shortcut_Button.h");
  748. fluid_app.add_header(files_db, "fluid/about_panel.h");
  749. fluid_app.add_header(files_db, "fluid/alignment_panel.h");
  750. fluid_app.add_header(files_db, "fluid/comments.h");
  751. fluid_app.add_header(files_db, "fluid/function_panel.h");
  752. fluid_app.add_header(files_db, "fluid/ide_support.h");
  753. fluid_app.add_header(files_db, "fluid/print_panel.h");
  754. fluid_app.add_header(files_db, "fluid/template_panel.h");
  755. fluid_app.add_header(files_db, "fluid/undo.h");
  756. fluid_app.add_header(files_db, "fluid/widget_panel.h");
  757. fluid_app.add_lib(fltk_lib);
  758. fluid_app.add_lib(fltk_forms_lib);
  759. fluid_app.add_lib(fltk_images_lib);
  760. fluid_app.add_lib(fltk_jpeg_lib);
  761. fluid_app.add_lib(fltk_png_lib);
  762. fluid_app.add_lib(fltk_z_lib);
  763. visualc_only(fluid_app.add_lib(fltk_z_lib));
  764. xcode_only(fluid_app.add_external_lib(files_db, "icons/fluid.icns"));
  765. }
  766. // --- create test applications
  767. Fl_IDE_Prefs tests_db(targets_db, "tests");
  768. Fl_Target_Prefs demo_db(tests_db.add_with_key("name", "Demo")); {
  769. demo_db.add_source(files_db, "test/demo.cxx");
  770. demo_db.add_lib(fltk_lib);
  771. demo_db.depends_on(fluid_app);
  772. }
  773. { Fl_Target_Prefs db(tests_db.add_with_key("name", "adjuster"));
  774. db.add_source(files_db, "test/adjuster.cxx");
  775. db.add_lib(fltk_lib);
  776. demo_db.depends_on(db);
  777. }
  778. { Fl_Target_Prefs db(tests_db.add_with_key("name", "arc"));
  779. db.add_source(files_db, "test/arc.cxx");
  780. db.add_lib(fltk_lib);
  781. demo_db.depends_on(db);
  782. }
  783. { Fl_Target_Prefs db(tests_db.add_with_key("name", "ask"));
  784. db.add_source(files_db, "test/ask.cxx");
  785. db.add_lib(fltk_lib);
  786. demo_db.depends_on(db);
  787. }
  788. { Fl_Target_Prefs db(tests_db.add_with_key("name", "bitmap"));
  789. db.add_source(files_db, "test/bitmap.cxx");
  790. db.add_lib(fltk_lib);
  791. demo_db.depends_on(db);
  792. }
  793. { Fl_Target_Prefs db(tests_db.add_with_key("name", "blocks"));
  794. db.add_source(files_db, "test/blocks.cxx");
  795. db.add_lib(fltk_lib);
  796. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework"));
  797. visualc_only(db.add_external_lib(files_db, "winmm.lib"));
  798. demo_db.depends_on(db);
  799. }
  800. { Fl_Target_Prefs db(tests_db.add_with_key("name", "boxtype"));
  801. db.add_source(files_db, "test/boxtype.cxx");
  802. db.add_lib(fltk_lib);
  803. demo_db.depends_on(db);
  804. }
  805. { Fl_Target_Prefs db(tests_db.add_with_key("name", "browser"));
  806. db.add_source(files_db, "test/browser.cxx");
  807. db.add_lib(fltk_lib);
  808. demo_db.depends_on(db);
  809. }
  810. { Fl_Target_Prefs db(tests_db.add_with_key("name", "button"));
  811. db.add_source(files_db, "test/button.cxx");
  812. db.add_lib(fltk_lib);
  813. demo_db.depends_on(db);
  814. }
  815. { Fl_Target_Prefs db(tests_db.add_with_key("name", "buttons"));
  816. db.add_source(files_db, "test/buttons.cxx");
  817. db.add_lib(fltk_lib);
  818. demo_db.depends_on(db);
  819. }
  820. { Fl_Target_Prefs db(tests_db.add_with_key("name", "checkers"));
  821. db.add_source(files_db, "test/checkers.cxx");
  822. db.add_lib(fltk_lib);
  823. demo_db.depends_on(db);
  824. }
  825. { Fl_Target_Prefs db(tests_db.add_with_key("name", "clock"));
  826. db.add_source(files_db, "test/clock.cxx");
  827. db.add_lib(fltk_lib);
  828. demo_db.depends_on(db);
  829. }
  830. { Fl_Target_Prefs db(tests_db.add_with_key("name", "colbrowser"));
  831. db.add_source(files_db, "test/colbrowser.cxx");
  832. db.add_lib(fltk_lib);
  833. db.add_lib(fltk_forms_lib);
  834. demo_db.depends_on(db);
  835. }
  836. { Fl_Target_Prefs db(tests_db.add_with_key("name", "color_chooser"));
  837. db.add_source(files_db, "test/color_chooser.cxx");
  838. db.add_lib(fltk_lib);
  839. demo_db.depends_on(db);
  840. }
  841. { Fl_Target_Prefs db(tests_db.add_with_key("name", "cube"));
  842. db.add_source(files_db, "test/cube.cxx");
  843. db.add_lib(fltk_lib);
  844. db.add_lib(fltk_gl_lib);
  845. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  846. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  847. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  848. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  849. demo_db.depends_on(db);
  850. }
  851. { Fl_Target_Prefs db(tests_db.add_with_key("name", "CubeView"));
  852. db.add_source(files_db, "test/CubeView.cxx");
  853. db.add_source(files_db, "test/CubeMain.cxx");
  854. db.add_fl(files_db, "test/CubeViewUI.fl");
  855. db.add_lib(fltk_lib);
  856. db.add_lib(fltk_gl_lib);
  857. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  858. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  859. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  860. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  861. db.depends_on(fluid_app);
  862. demo_db.depends_on(db);
  863. }
  864. { Fl_Target_Prefs db(tests_db.add_with_key("name", "cursor"));
  865. db.add_source(files_db, "test/cursor.cxx");
  866. db.add_lib(fltk_lib);
  867. demo_db.depends_on(db);
  868. }
  869. { Fl_Target_Prefs db(tests_db.add_with_key("name", "curve"));
  870. db.add_source(files_db, "test/curve.cxx");
  871. db.add_lib(fltk_lib);
  872. demo_db.depends_on(db);
  873. }
  874. { Fl_Target_Prefs db(tests_db.add_with_key("name", "device"));
  875. db.add_source(files_db, "test/device.cxx");
  876. db.add_lib(fltk_lib);
  877. db.add_lib(fltk_images_lib);
  878. db.add_lib(fltk_jpeg_lib);
  879. db.add_lib(fltk_png_lib);
  880. db.add_lib(fltk_z_lib);
  881. demo_db.depends_on(db);
  882. }
  883. { Fl_Target_Prefs db(tests_db.add_with_key("name", "doublebuffer"));
  884. db.add_source(files_db, "test/doublebuffer.cxx");
  885. db.add_lib(fltk_lib);
  886. demo_db.depends_on(db);
  887. }
  888. { Fl_Target_Prefs db(tests_db.add_with_key("name", "editor"));
  889. db.add_source(files_db, "test/editor.cxx");
  890. db.add_lib(fltk_lib);
  891. demo_db.depends_on(db);
  892. }
  893. { Fl_Target_Prefs db(tests_db.add_with_key("name", "fast_slow"));
  894. db.add_fl(files_db, "test/fast_slow.fl");
  895. db.add_lib(fltk_lib);
  896. db.depends_on(fluid_app);
  897. demo_db.depends_on(db);
  898. }
  899. { Fl_Target_Prefs db(tests_db.add_with_key("name", "file_chooser"));
  900. db.add_source(files_db, "test/file_chooser.cxx");
  901. db.add_lib(fltk_lib);
  902. db.add_lib(fltk_images_lib);
  903. db.add_lib(fltk_jpeg_lib);
  904. db.add_lib(fltk_png_lib);
  905. db.add_lib(fltk_z_lib);
  906. demo_db.depends_on(db);
  907. }
  908. { Fl_Target_Prefs db(tests_db.add_with_key("name", "fonts"));
  909. db.add_source(files_db, "test/fonts.cxx");
  910. db.add_lib(fltk_lib);
  911. demo_db.depends_on(db);
  912. }
  913. { Fl_Target_Prefs db(tests_db.add_with_key("name", "forms"));
  914. db.add_source(files_db, "test/forms.cxx");
  915. db.add_lib(fltk_lib);
  916. db.add_lib(fltk_forms_lib);
  917. demo_db.depends_on(db);
  918. }
  919. { Fl_Target_Prefs db(tests_db.add_with_key("name", "fractals"));
  920. db.add_source(files_db, "test/fractals.cxx");
  921. db.add_source(files_db, "test/fracviewer.cxx");
  922. db.add_lib(fltk_lib);
  923. db.add_lib(fltk_gl_lib);
  924. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  925. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  926. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  927. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  928. db.add_lib(fltk_forms_lib);
  929. demo_db.depends_on(db);
  930. }
  931. { Fl_Target_Prefs db(tests_db.add_with_key("name", "fullscreen"));
  932. db.add_source(files_db, "test/fullscreen.cxx");
  933. db.add_lib(fltk_lib);
  934. db.add_lib(fltk_gl_lib);
  935. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  936. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  937. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  938. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  939. demo_db.depends_on(db);
  940. }
  941. { Fl_Target_Prefs db(tests_db.add_with_key("name", "gl_overlay"));
  942. db.add_source(files_db, "test/gl_overlay.cxx");
  943. db.add_lib(fltk_lib);
  944. db.add_lib(fltk_gl_lib);
  945. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  946. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  947. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  948. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  949. demo_db.depends_on(db);
  950. }
  951. { Fl_Target_Prefs db(tests_db.add_with_key("name", "glpuzzle"));
  952. db.add_source(files_db, "test/glpuzzle.cxx");
  953. db.add_lib(fltk_lib);
  954. db.add_lib(fltk_gl_lib);
  955. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  956. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  957. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  958. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  959. demo_db.depends_on(db);
  960. }
  961. { Fl_Target_Prefs db(tests_db.add_with_key("name", "hello"));
  962. db.add_source(files_db, "test/hello.cxx");
  963. db.add_lib(fltk_lib);
  964. demo_db.depends_on(db);
  965. }
  966. { Fl_Target_Prefs db(tests_db.add_with_key("name", "help"));
  967. db.add_source(files_db, "test/help.cxx");
  968. db.add_lib(fltk_lib);
  969. db.add_lib(fltk_images_lib);
  970. db.add_lib(fltk_jpeg_lib);
  971. db.add_lib(fltk_png_lib);
  972. db.add_lib(fltk_z_lib);
  973. demo_db.depends_on(db);
  974. }
  975. { Fl_Target_Prefs db(tests_db.add_with_key("name", "iconize"));
  976. db.add_source(files_db, "test/iconize.cxx");
  977. db.add_lib(fltk_lib);
  978. demo_db.depends_on(db);
  979. }
  980. { Fl_Target_Prefs db(tests_db.add_with_key("name", "image"));
  981. db.add_source(files_db, "test/image.cxx");
  982. db.add_lib(fltk_lib);
  983. demo_db.depends_on(db);
  984. }
  985. { Fl_Target_Prefs db(tests_db.add_with_key("name", "inactive"));
  986. db.add_fl(files_db, "test/inactive.fl");
  987. db.add_lib(fltk_lib);
  988. db.depends_on(fluid_app);
  989. demo_db.depends_on(db);
  990. }
  991. { Fl_Target_Prefs db(tests_db.add_with_key("name", "input"));
  992. db.add_source(files_db, "test/input.cxx");
  993. db.add_lib(fltk_lib);
  994. demo_db.depends_on(db);
  995. }
  996. { Fl_Target_Prefs db(tests_db.add_with_key("name", "input_choice"));
  997. db.add_source(files_db, "test/input_choice.cxx");
  998. db.add_lib(fltk_lib);
  999. demo_db.depends_on(db);
  1000. }
  1001. { Fl_Target_Prefs db(tests_db.add_with_key("name", "keyboard"));
  1002. db.add_source(files_db, "test/keyboard.cxx");
  1003. db.add_fl(files_db, "test/keyboard_ui.fl");
  1004. db.add_lib(fltk_lib);
  1005. db.depends_on(fluid_app);
  1006. demo_db.depends_on(db);
  1007. }
  1008. { Fl_Target_Prefs db(tests_db.add_with_key("name", "label"));
  1009. db.add_source(files_db, "test/label.cxx");
  1010. db.add_lib(fltk_lib);
  1011. db.add_lib(fltk_forms_lib);
  1012. demo_db.depends_on(db);
  1013. }
  1014. { Fl_Target_Prefs db(tests_db.add_with_key("name", "line_style"));
  1015. db.add_source(files_db, "test/line_style.cxx");
  1016. db.add_lib(fltk_lib);
  1017. demo_db.depends_on(db);
  1018. }
  1019. { Fl_Target_Prefs db(tests_db.add_with_key("name", "list_visuals"));
  1020. db.add_source(files_db, "test/list_visuals.cxx");
  1021. db.add_lib(fltk_lib);
  1022. demo_db.depends_on(db);
  1023. }
  1024. { Fl_Target_Prefs db(tests_db.add_with_key("name", "mandelbrot"));
  1025. db.add_source(files_db, "test/mandelbrot.cxx");
  1026. db.add_fl(files_db, "test/mandelbrot_ui.fl");
  1027. db.add_lib(fltk_lib);
  1028. db.depends_on(fluid_app);
  1029. demo_db.depends_on(db);
  1030. }
  1031. { Fl_Target_Prefs db(tests_db.add_with_key("name", "menubar"));
  1032. db.add_source(files_db, "test/menubar.cxx");
  1033. db.add_lib(fltk_lib);
  1034. demo_db.depends_on(db);
  1035. }
  1036. { Fl_Target_Prefs db(tests_db.add_with_key("name", "message"));
  1037. db.add_source(files_db, "test/message.cxx");
  1038. db.add_lib(fltk_lib);
  1039. demo_db.depends_on(db);
  1040. }
  1041. { Fl_Target_Prefs db(tests_db.add_with_key("name", "minimum"));
  1042. db.add_source(files_db, "test/minimum.cxx");
  1043. db.add_lib(fltk_lib);
  1044. demo_db.depends_on(db);
  1045. }
  1046. { Fl_Target_Prefs db(tests_db.add_with_key("name", "navigation"));
  1047. db.add_source(files_db, "test/navigation.cxx");
  1048. db.add_lib(fltk_lib);
  1049. demo_db.depends_on(db);
  1050. }
  1051. { Fl_Target_Prefs db(tests_db.add_with_key("name", "native-filechooser"));
  1052. db.add_source(files_db, "test/native-filechooser.cxx");
  1053. db.add_lib(fltk_lib);
  1054. demo_db.depends_on(db);
  1055. }
  1056. { Fl_Target_Prefs db(tests_db.add_with_key("name", "output"));
  1057. db.add_source(files_db, "test/output.cxx");
  1058. db.add_lib(fltk_lib);
  1059. db.add_lib(fltk_forms_lib);
  1060. demo_db.depends_on(db);
  1061. }
  1062. { Fl_Target_Prefs db(tests_db.add_with_key("name", "overlay"));
  1063. db.add_source(files_db, "test/overlay.cxx");
  1064. db.add_lib(fltk_lib);
  1065. demo_db.depends_on(db);
  1066. }
  1067. { Fl_Target_Prefs db(tests_db.add_with_key("name", "pack"));
  1068. db.add_source(files_db, "test/pack.cxx");
  1069. db.add_lib(fltk_lib);
  1070. demo_db.depends_on(db);
  1071. }
  1072. { Fl_Target_Prefs db(tests_db.add_with_key("name", "pixmap_browser"));
  1073. db.add_source(files_db, "test/pixmap_browser.cxx");
  1074. db.add_lib(fltk_lib);
  1075. db.add_lib(fltk_images_lib);
  1076. db.add_lib(fltk_jpeg_lib);
  1077. db.add_lib(fltk_png_lib);
  1078. db.add_lib(fltk_z_lib);
  1079. demo_db.depends_on(db);
  1080. }
  1081. { Fl_Target_Prefs db(tests_db.add_with_key("name", "pixmap"));
  1082. db.add_source(files_db, "test/pixmap.cxx");
  1083. db.add_lib(fltk_lib);
  1084. demo_db.depends_on(db);
  1085. }
  1086. { Fl_Target_Prefs db(tests_db.add_with_key("name", "preferences"));
  1087. db.add_fl(files_db, "test/preferences.fl");
  1088. db.add_lib(fltk_lib);
  1089. db.depends_on(fluid_app);
  1090. demo_db.depends_on(db);
  1091. }
  1092. { Fl_Target_Prefs db(tests_db.add_with_key("name", "radio"));
  1093. db.add_fl(files_db, "test/radio.fl");
  1094. db.add_lib(fltk_lib);
  1095. db.depends_on(fluid_app);
  1096. demo_db.depends_on(db);
  1097. }
  1098. { Fl_Target_Prefs db(tests_db.add_with_key("name", "resizebox"));
  1099. db.add_source(files_db, "test/resizebox.cxx");
  1100. db.add_lib(fltk_lib);
  1101. demo_db.depends_on(db);
  1102. }
  1103. { Fl_Target_Prefs db(tests_db.add_with_key("name", "resize"));
  1104. db.add_fl(files_db, "test/resize.fl");
  1105. db.add_lib(fltk_lib);
  1106. db.depends_on(fluid_app);
  1107. demo_db.depends_on(db);
  1108. }
  1109. { Fl_Target_Prefs db(tests_db.add_with_key("name", "rotated_text"));
  1110. db.add_source(files_db, "test/rotated_text.cxx");
  1111. db.add_lib(fltk_lib);
  1112. demo_db.depends_on(db);
  1113. }
  1114. { Fl_Target_Prefs db(tests_db.add_with_key("name", "scroll"));
  1115. db.add_source(files_db, "test/scroll.cxx");
  1116. db.add_lib(fltk_lib);
  1117. demo_db.depends_on(db);
  1118. }
  1119. { Fl_Target_Prefs db(tests_db.add_with_key("name", "shape"));
  1120. db.add_source(files_db, "test/shape.cxx");
  1121. db.add_lib(fltk_lib);
  1122. db.add_lib(fltk_gl_lib);
  1123. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
  1124. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
  1125. visualc_only(db.add_external_lib(files_db, "glu32.lib"));
  1126. visualc_only(db.add_external_lib(files_db, "opengl32.lib"));
  1127. demo_db.depends_on(db);
  1128. }
  1129. { Fl_Target_Prefs db(tests_db.add_with_key("name", "subwindow"));
  1130. db.add_source(files_db, "test/subwindow.cxx");
  1131. db.add_lib(fltk_lib);
  1132. demo_db.depends_on(db);
  1133. }
  1134. { Fl_Target_Prefs db(tests_db.add_with_key("name", "sudoku"));
  1135. db.add_source(files_db, "test/sudoku.cxx");
  1136. db.add_lib(fltk_lib);
  1137. db.add_lib(fltk_images_lib);
  1138. db.add_lib(fltk_jpeg_lib);
  1139. db.add_lib(fltk_png_lib);
  1140. db.add_lib(fltk_z_lib);
  1141. xcode_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework"));
  1142. visualc_only(db.add_external_lib(files_db, "winmm.lib"));
  1143. demo_db.depends_on(db);
  1144. }
  1145. { Fl_Target_Prefs db(tests_db.add_with_key("name", "symbols"));
  1146. db.add_source(files_db, "test/symbols.cxx");
  1147. db.add_lib(fltk_lib);
  1148. demo_db.depends_on(db);
  1149. }
  1150. { Fl_Target_Prefs db(tests_db.add_with_key("name", "table"));
  1151. db.add_source(files_db, "test/table.cxx");
  1152. db.add_lib(fltk_lib);
  1153. demo_db.depends_on(db);
  1154. }
  1155. { Fl_Target_Prefs db(tests_db.add_with_key("name", "tabs"));
  1156. db.add_fl(files_db, "test/tabs.fl");
  1157. db.add_lib(fltk_lib);
  1158. db.depends_on(fluid_app);
  1159. demo_db.depends_on(db);
  1160. }
  1161. { Fl_Target_Prefs db(tests_db.add_with_key("name", "threads"));
  1162. db.add_source(files_db, "test/threads.cxx");
  1163. db.add_lib(fltk_lib);
  1164. demo_db.depends_on(db);
  1165. }
  1166. { Fl_Target_Prefs db(tests_db.add_with_key("name", "tile"));
  1167. db.add_source(files_db, "test/tile.cxx");
  1168. db.add_lib(fltk_lib);
  1169. demo_db.depends_on(db);
  1170. }
  1171. { Fl_Target_Prefs db(tests_db.add_with_key("name", "tiled_image"));
  1172. db.add_source(files_db, "test/tiled_image.cxx");
  1173. db.add_lib(fltk_lib);
  1174. db.add_lib(fltk_images_lib);
  1175. db.add_lib(fltk_jpeg_lib);
  1176. db.add_lib(fltk_png_lib);
  1177. db.add_lib(fltk_z_lib);
  1178. demo_db.depends_on(db);
  1179. }
  1180. { Fl_Target_Prefs db(tests_db.add_with_key("name", "tree"));
  1181. db.add_fl(files_db, "test/tree.fl");
  1182. db.add_lib(fltk_lib);
  1183. db.depends_on(fluid_app);
  1184. demo_db.depends_on(db);
  1185. }
  1186. { Fl_Target_Prefs db(tests_db.add_with_key("name", "utf8"));
  1187. db.add_source(files_db, "test/utf8.cxx");
  1188. db.add_lib(fltk_lib);
  1189. demo_db.depends_on(db);
  1190. }
  1191. { Fl_Target_Prefs db(tests_db.add_with_key("name", "valuators"));
  1192. db.add_fl(files_db, "test/valuators.fl");
  1193. db.add_lib(fltk_lib);
  1194. db.depends_on(fluid_app);
  1195. demo_db.depends_on(db);
  1196. }
  1197. db->flush();
  1198. delete db;
  1199. return 0;
  1200. }
  1201. // Make this module into a plugin
  1202. extern int exit_early;
  1203. class Fl_FltkDB_Plugin : public Fl_Commandline_Plugin
  1204. {
  1205. public:
  1206. Fl_FltkDB_Plugin() : Fl_Commandline_Plugin(name()) { }
  1207. const char *name() { return "FltkDB.fluid.fltk.org"; }
  1208. const char *help() { return
  1209. " --fltkdb <filename> : create a database describing all FLTK project rules"; }
  1210. int arg(int argc, char **argv, int &i) {
  1211. if (argc>=i+1 && strcmp(argv[i], "--fltkdb")==0) {
  1212. if (argc>=i+2 && argv[i+1][0]!='-') {
  1213. fprintf(stderr, "Creating Database %s\n", argv[i+1]);
  1214. exit_early = 1;
  1215. create_new_database(argv[i+1]);
  1216. i = i+2;
  1217. return 2;
  1218. } else {
  1219. fprintf(stderr, "Missing argument: --fltkdb <filename>\n");
  1220. return 1;
  1221. }
  1222. }
  1223. return 0;
  1224. }
  1225. int test(const char *a1, const char *a2, const char *a3) {
  1226. create_new_database(a1);
  1227. return 0;
  1228. }
  1229. void show_panel() {
  1230. }
  1231. };
  1232. Fl_FltkDB_Plugin FltkDB_Plugin;
  1233. //
  1234. // End of "$Id: ide_support.cxx 8049 2010-12-17 10:43:41Z manolo $".
  1235. //