You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

295 lines
9.2KB

  1. #
  2. # "$Id: makefile.wat 7913 2010-11-29 18:18:27Z greg.ercolano $"
  3. #
  4. # Test/example program makefile for the Fast Light Tool Kit (FLTK).
  5. #
  6. # Copyright 1998-2010 by Bill Spitzak and others.
  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. !include ../watcom.mif
  28. ALL = &
  29. $(ODIR)/unittests$(EXEEXT) &
  30. $(ODIR)/adjuster$(EXEEXT) &
  31. $(ODIR)/arc$(EXEEXT) &
  32. $(ODIR)/ask$(EXEEXT) &
  33. $(ODIR)/bitmap$(EXEEXT) &
  34. $(ODIR)/boxtype$(EXEEXT) &
  35. $(ODIR)/browser$(EXEEXT) &
  36. $(ODIR)/button$(EXEEXT) &
  37. $(ODIR)/buttons$(EXEEXT) &
  38. $(ODIR)/checkers$(EXEEXT) &
  39. $(ODIR)/clock$(EXEEXT) &
  40. $(ODIR)/colbrowser$(EXEEXT) &
  41. $(ODIR)/color_chooser$(EXEEXT) &
  42. $(ODIR)/cursor$(EXEEXT) &
  43. $(ODIR)/curve$(EXEEXT) &
  44. $(ODIR)/demo$(EXEEXT) &
  45. $(ODIR)/doublebuffer$(EXEEXT) &
  46. $(ODIR)/editor$(EXEEXT) &
  47. $(ODIR)/fast_slow$(EXEEXT) &
  48. $(ODIR)/file_chooser$(EXEEXT) &
  49. $(ODIR)/fonts$(EXEEXT) &
  50. $(ODIR)/forms$(EXEEXT) &
  51. $(ODIR)/hello$(EXEEXT) &
  52. $(ODIR)/help$(EXEEXT) &
  53. $(ODIR)/iconize$(EXEEXT) &
  54. $(ODIR)/image$(EXEEXT) &
  55. $(ODIR)/inactive$(EXEEXT) &
  56. $(ODIR)/input$(EXEEXT) &
  57. $(ODIR)/keyboard$(EXEEXT) &
  58. $(ODIR)/label$(EXEEXT) &
  59. $(ODIR)/line_style$(EXEEXT) &
  60. $(ODIR)/list_visuals$(EXEEXT) &
  61. $(ODIR)/mandelbrot$(EXEEXT) &
  62. $(ODIR)/menubar$(EXEEXT) &
  63. $(ODIR)/message$(EXEEXT) &
  64. $(ODIR)/minimum$(EXEEXT) &
  65. $(ODIR)/native-filechooser$(EXEEXT) &
  66. $(ODIR)/navigation$(EXEEXT) &
  67. $(ODIR)/output$(EXEEXT) &
  68. $(ODIR)/overlay$(EXEEXT) &
  69. $(ODIR)/pack$(EXEEXT) &
  70. $(ODIR)/pixmap$(EXEEXT) &
  71. $(ODIR)/pixmap_browser$(EXEEXT) &
  72. $(ODIR)/preferences$(EXEEXT) &
  73. $(ODIR)/radio$(EXEEXT) &
  74. $(ODIR)/resize$(EXEEXT) &
  75. $(ODIR)/resizebox$(EXEEXT) &
  76. $(ODIR)/scroll$(EXEEXT) &
  77. $(ODIR)/subwindow$(EXEEXT) &
  78. $(ODIR)/symbols$(EXEEXT) &
  79. $(ODIR)/tabs$(EXEEXT) &
  80. $(ODIR)/threads$(EXEEXT) &
  81. $(ODIR)/tile$(EXEEXT) &
  82. $(ODIR)/tiled_image$(EXEEXT) &
  83. $(ODIR)/valuators$(EXEEXT)
  84. GLALL = &
  85. $(ODIR)/cube$(EXEEXT) &
  86. $(ODIR)/CubeView$(EXEEXT) &
  87. $(ODIR)/fractals$(EXEEXT) &
  88. $(ODIR)/fullscreen$(EXEEXT) &
  89. $(ODIR)/gl_overlay$(EXEEXT) &
  90. $(ODIR)/glpuzzle$(EXEEXT) &
  91. $(ODIR)/shape$(EXEEXT)
  92. all: $(ALL) $(GLALL)
  93. gldemos: $(GLALL)
  94. # FLUID file rules. We could put them in ../watcom.mif really, but that needs testing.
  95. .fl.cxx:
  96. echo Generating $<...
  97. -..\fluid\$(ODIR)\fluid$(EXEEXT) -c $[@
  98. .fl.h:
  99. echo Generating $<...
  100. -..\fluid\$(ODIR)\fluid$(EXEEXT) -c $[@
  101. # All demos depend on the FLTK library...
  102. $(ALL): $(LIBNAME)
  103. # General demos..... Normally a executable depending on an object file of the same name
  104. # shouldn't need a target line. But if different output directories are used, changes
  105. # in sources files are not picked up, so we do need a line per target.
  106. $(ODIR)/unittests$(EXEEXT) : $(ODIR)/unittests.obj
  107. $(ODIR)/adjuster$(EXEEXT) : $(ODIR)/adjuster.obj
  108. $(ODIR)/arc$(EXEEXT) : $(ODIR)/arc.obj
  109. $(ODIR)/ask$(EXEEXT) : $(ODIR)/ask.obj
  110. $(ODIR)/bitmap$(EXEEXT) : $(ODIR)/bitmap.obj
  111. $(ODIR)/boxtype$(EXEEXT) : $(ODIR)/boxtype.obj
  112. $(ODIR)/browser$(EXEEXT) : $(ODIR)/browser.obj
  113. $(ODIR)/button$(EXEEXT) : $(ODIR)/button.obj
  114. $(ODIR)/buttons$(EXEEXT) : $(ODIR)/buttons.obj
  115. $(ODIR)/checkers$(EXEEXT) : $(ODIR)/checkers.obj
  116. $(ODIR)/clock$(EXEEXT) : $(ODIR)/clock.obj
  117. $(ODIR)/colbrowser$(EXEEXT) : $(ODIR)/colbrowser.obj
  118. $(ODIR)/color_chooser$(EXEEXT) : $(ODIR)/color_chooser.obj
  119. $(ODIR)/cursor$(EXEEXT) : $(ODIR)/cursor.obj
  120. $(ODIR)/curve$(EXEEXT) : $(ODIR)/curve.obj
  121. $(ODIR)/demo$(EXEEXT) : $(ODIR)/demo.obj
  122. $(ODIR)/doublebuffer$(EXEEXT) : $(ODIR)/doublebuffer.obj
  123. $(ODIR)/editor$(EXEEXT) : $(ODIR)/editor.obj
  124. $(ODIR)/fast_slow$(EXEEXT) : $(ODIR)/fast_slow.obj
  125. $(ODIR)/file_chooser$(EXEEXT) : $(ODIR)/file_chooser.obj
  126. $(ODIR)/fonts$(EXEEXT) : $(ODIR)/fonts.obj
  127. $(ODIR)/forms$(EXEEXT) : $(ODIR)/forms.obj
  128. $(ODIR)/hello$(EXEEXT) : $(ODIR)/hello.obj
  129. $(ODIR)/help$(EXEEXT) : $(ODIR)/help.obj
  130. $(ODIR)/iconize$(EXEEXT) : $(ODIR)/iconize.obj
  131. $(ODIR)/image$(EXEEXT) : $(ODIR)/image.obj
  132. $(ODIR)/inactive$(EXEEXT) : $(ODIR)/inactive.obj
  133. $(ODIR)/input$(EXEEXT) : $(ODIR)/input.obj
  134. $(ODIR)/label$(EXEEXT) : $(ODIR)/label.obj
  135. $(ODIR)/line_style$(EXEEXT) : $(ODIR)/line_style.obj
  136. $(ODIR)/list_visuals$(EXEEXT) : $(ODIR)/list_visuals.obj
  137. $(ODIR)/menubar$(EXEEXT) : $(ODIR)/menubar.obj
  138. $(ODIR)/message$(EXEEXT) : $(ODIR)/message.obj
  139. $(ODIR)/minimum$(EXEEXT) : $(ODIR)/minimum.obj
  140. $(ODIR)/native-filechooser$(EXEEXT) : $(ODIR)/native-filechooser.obj
  141. $(ODIR)/navigation$(EXEEXT) : $(ODIR)/navigation.obj
  142. $(ODIR)/output$(EXEEXT) : $(ODIR)/output.obj
  143. $(ODIR)/overlay$(EXEEXT) : $(ODIR)/overlay.obj
  144. $(ODIR)/pack$(EXEEXT) : $(ODIR)/pack.obj
  145. $(ODIR)/pixmap$(EXEEXT) : $(ODIR)/pixmap.obj
  146. $(ODIR)/pixmap_browser$(EXEEXT) : $(ODIR)/pixmap_browser.obj
  147. $(ODIR)/preferences$(EXEEXT) : $(ODIR)/preferences.obj
  148. $(ODIR)/radio$(EXEEXT) : $(ODIR)/radio.obj
  149. $(ODIR)/resize$(EXEEXT) : $(ODIR)/resize.obj
  150. $(ODIR)/resizebox$(EXEEXT) : $(ODIR)/resizebox.obj
  151. $(ODIR)/scroll$(EXEEXT) : $(ODIR)/scroll.obj
  152. $(ODIR)/subwindow$(EXEEXT) : $(ODIR)/subwindow.obj
  153. $(ODIR)/symbols$(EXEEXT) : $(ODIR)/symbols.obj
  154. $(ODIR)/tabs$(EXEEXT) : $(ODIR)/tabs.obj
  155. $(ODIR)/threads$(EXEEXT) : $(ODIR)/threads.obj
  156. $(ODIR)/tile$(EXEEXT) : $(ODIR)/tile.obj
  157. $(ODIR)/tiled_image$(EXEEXT) : $(ODIR)/tiled_image.obj
  158. $(ODIR)/valuators$(EXEEXT) : $(ODIR)/valuators.obj
  159. # Because keyboard_ui.obj is listed first, fluid will be used to generate the .cxx and .h file
  160. # so that when keyboard.obj is built, keyboard_ui.h is there.
  161. KBDOBJECTS=keyboard_ui.obj keyboard.obj
  162. $(ODIR)/keyboard$(EXEEXT): $(KBDOBJECTS) keyboard_ui.h
  163. @%create $^*.lk1
  164. @for %i in ($(KBDOBJECTS)) do @%append $^*.lk1 F $(ODIR)/%i
  165. @for %i in ($(LIBS)) do @%append $^*.lk1 L %i
  166. @for %i in ($(EXTRA_LIBS)) do @%append $^*.lk1 L %i
  167. @for %i in ($(SYSLIBS)) do @%append $^*.lk1 L %i
  168. $(LN) $(LNOPTS) name $^@ op map=$^* @$^*.lk1
  169. @del $^*.lk1
  170. @set KBDOBJECTS=
  171. MDLOBJECTS=mandelbrot_ui.obj mandelbrot.obj
  172. $(ODIR)/mandelbrot$(EXEEXT): $(MDLOBJECTS)
  173. @%create $^*.lk1
  174. @for %i in ($(MDLOBJECTS)) do @%append $^*.lk1 F $(ODIR)/%i
  175. @for %i in ($(LIBS)) do @%append $^*.lk1 L %i
  176. @for %i in ($(EXTRA_LIBS)) do @%append $^*.lk1 L %i
  177. @for %i in ($(SYSLIBS)) do @%append $^*.lk1 L %i
  178. $(LN) $(LNOPTS) name $^@ op map=$^* @$^*.lk1
  179. @del $^*.lk1
  180. # All OpenGL demos depend on the FLTK and FLTK_GL libraries...
  181. $(GLALL): $(LIBNAME) $(LIBNAMEGL)
  182. # OpenGL demos...
  183. $(ODIR)/cube$(EXEEXT) : $(ODIR)/cube.obj
  184. $(ODIR)/fullscreen$(EXEEXT) : $(ODIR)/fullscreen.obj
  185. $(ODIR)/gl_overlay$(EXEEXT) : $(ODIR)/gl_overlay.obj
  186. $(ODIR)/glpuzzle$(EXEEXT) : $(ODIR)/glpuzzle.obj
  187. $(ODIR)/shape$(EXEEXT) : $(ODIR)/shape.obj
  188. CBVOBJECTS = CubeView.obj CubeViewUI.obj CubeMain.obj
  189. $(ODIR)/CubeView$(EXEEXT): $(CBVOBJECTS)
  190. @%create $^*.lk1
  191. @for %i in ($(CBVOBJECTS)) do @%append $^*.lk1 F $(ODIR)/%i
  192. @for %i in ($(LIBS)) do @%append $^*.lk1 L %i
  193. @for %i in ($(EXTRA_LIBS)) do @%append $^*.lk1 L %i
  194. @for %i in ($(SYSLIBS)) do @%append $^*.lk1 L %i
  195. $(LN) $(LNOPTS) name $^@ op map=$^* @$^*.lk1
  196. @del $^*.lk1
  197. FRTOBJECTS = fractals.obj fracviewer.obj
  198. $(ODIR)/fractals$(EXEEXT): $(FRTOBJECTS)
  199. @%create $^*.lk1
  200. @for %i in ($(FRTOBJECTS)) do @%append $^*.lk1 F $(ODIR)/%i
  201. @for %i in ($(LIBS)) do @%append $^*.lk1 L %i
  202. @for %i in ($(EXTRA_LIBS)) do @%append $^*.lk1 L %i
  203. @for %i in ($(SYSLIBS)) do @%append $^*.lk1 L %i
  204. $(LN) $(LNOPTS) name $^@ op map=$^* @$^*.lk1
  205. @del $^*.lk1
  206. #
  207. # Clean all directories
  208. #
  209. clean : .SYMBOLIC
  210. @echo Cleaning up.
  211. CLEANEXTS = exe map sym obj lk1
  212. @for %a in ($(CLEANEXTS)) do -rm -f $(ODIR)\*.%a
  213. -rm -f *.err
  214. FLUIDMADE = fastslow inactive keyboard_ui preferences radio resize tabs valuators
  215. @for %a in ($(FLUIDMADE)) do -rm -f %a.cxx %a.h
  216. #
  217. # End of "$Id: makefile.wat 7913 2010-11-29 18:18:27Z greg.ercolano $".
  218. #