source: rtems-graphics-toolkit/fltk-1.3.0/test/Makefile @ 855379e

Last change on this file since 855379e was 855379e, checked in by Alexandru-Sever Horin <alex.sever.h@…>, on 08/01/12 at 20:52:27

Added rtems_main.h include to ease migration to RTEMS

  • Property mode set to 100644
File size: 13.6 KB
Line 
1#
2# "$Id: Makefile 8389 2011-02-06 14:08:08Z manolo $"
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
28include ../makeinclude
29
30include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
31include $(RTEMS_CUSTOM)
32include $(PROJECT_ROOT)/make/leaf.cfg
33
34LDLIBS+= ../../microwin/src/obj/rtems_init.o ../../microwin/src/obj/FilesystemImage.o
35
36CPPFILES =\
37        unittests.cxx \
38        adjuster.cxx \
39        arc.cxx \
40        ask.cxx \
41        bitmap.cxx \
42        blocks.cxx \
43        boxtype.cxx \
44        browser.cxx \
45        button.cxx \
46        buttons.cxx \
47        cairo_test.cxx \
48        checkers.cxx \
49        clock.cxx \
50        colbrowser.cxx \
51        color_chooser.cxx \
52        cube.cxx \
53        CubeMain.cxx \
54        CubeView.cxx \
55        cursor.cxx \
56        curve.cxx \
57        demo.cxx \
58        device.cxx \
59        doublebuffer.cxx \
60        editor.cxx \
61        fast_slow.cxx \
62        file_chooser.cxx \
63        fonts.cxx \
64        forms.cxx \
65        fractals.cxx \
66        fullscreen.cxx \
67        gl_overlay.cxx \
68        glpuzzle.cxx \
69        hello.cxx \
70        help.cxx \
71        iconize.cxx \
72        image.cxx \
73        inactive.cxx \
74        input.cxx \
75        input_choice.cxx \
76        keyboard.cxx \
77        label.cxx \
78        line_style.cxx \
79        list_visuals.cxx \
80        mandelbrot.cxx \
81        menubar.cxx \
82        message.cxx \
83        minimum.cxx \
84        native-filechooser.cxx \
85        navigation.cxx \
86        output.cxx \
87        overlay.cxx \
88        pack.cxx \
89        pixmap_browser.cxx \
90        pixmap.cxx \
91        preferences.cxx \
92        device.cxx \
93        radio.cxx \
94        resizebox.cxx \
95        resize.cxx \
96        rotated_text.cxx \
97        scroll.cxx \
98        shape.cxx \
99        subwindow.cxx \
100        sudoku.cxx \
101        symbols.cxx \
102        table.cxx \
103        tabs.cxx \
104        threads.cxx \
105        tile.cxx \
106        tiled_image.cxx \
107        tree.cxx \
108        valuators.cxx \
109        utf8.cxx
110
111ALL =   \
112        unittests$(EXEEXT) \
113        adjuster$(EXEEXT) \
114        arc$(EXEEXT) \
115        ask$(EXEEXT) \
116        bitmap$(EXEEXT) \
117        blocks$(EXEEXT) \
118        boxtype$(EXEEXT) \
119        browser$(EXEEXT) \
120        button$(EXEEXT) \
121        buttons$(EXEEXT) \
122        cairo_test$(EXEEXT) \
123        checkers$(EXEEXT) \
124        clock$(EXEEXT) \
125        colbrowser$(EXEEXT) \
126        color_chooser$(EXEEXT) \
127        cursor$(EXEEXT) \
128        curve$(EXEEXT) \
129        demo$(EXEEXT) \
130        device$(EXEEXT) \
131        doublebuffer$(EXEEXT) \
132        editor$(EXEEXT) \
133        fast_slow$(EXEEXT) \
134        file_chooser$(EXEEXT) \
135        fonts$(EXEEXT) \
136        forms$(EXEEXT) \
137        hello$(EXEEXT) \
138        help$(EXEEXT) \
139        iconize$(EXEEXT) \
140        image$(EXEEXT) \
141        inactive$(EXEEXT) \
142        input$(EXEEXT) \
143        input_choice$(EXEEXT) \
144        keyboard$(EXEEXT) \
145        label$(EXEEXT) \
146        line_style$(EXEEXT) \
147        list_visuals$(EXEEXT) \
148        mandelbrot$(EXEEXT) \
149        menubar$(EXEEXT) \
150        message$(EXEEXT) \
151        minimum$(EXEEXT) \
152        native-filechooser$(EXEEXT) \
153        navigation$(EXEEXT) \
154        output$(EXEEXT) \
155        overlay$(EXEEXT) \
156        pack$(EXEEXT) \
157        pixmap$(EXEEXT) \
158        pixmap_browser$(EXEEXT) \
159        preferences$(EXEEXT) \
160        device$(EXEEXT) \
161        radio$(EXEEXT) \
162        resize$(EXEEXT) \
163        resizebox$(EXEEXT) \
164        rotated_text$(EXEEXT) \
165        scroll$(EXEEXT) \
166        subwindow$(EXEEXT) \
167        sudoku$(EXEEXT) \
168        symbols$(EXEEXT) \
169        table$(EXEEXT) \
170        tabs$(EXEEXT) \
171        $(THREADS) \
172        tile$(EXEEXT) \
173        tiled_image$(EXEEXT) \
174        tree$(EXEEXT) \
175        valuators$(EXEEXT) \
176        cairotest$(EXEEXT) \
177        utf8$(EXEEXT)
178
179
180GLALL = \
181        cube$(EXEEXT) \
182        CubeView$(EXEEXT) \
183        fractals$(EXEEXT) \
184        fullscreen$(EXEEXT) \
185        gl_overlay$(EXEEXT) \
186        glpuzzle$(EXEEXT) \
187        shape$(EXEEXT)
188
189all:    $(ALL) $(GLDEMOS)
190        $(make-cxx-exe)
191
192gldemos:        $(GLALL)
193
194depend: $(CPPFILES)
195        makedepend -Y -I.. -f makedepend $(CPPFILES)
196
197# Automatically generated dependencies...
198include makedepend
199
200clean:
201        $(RM) $(ALL) $(GLALL) core
202        $(RM) *.o core.* *~ *.bck *.bak
203        $(RM) CubeViewUI.cxx CubeViewUI.h
204        $(RM) fast_slow.cxx fast_slow.h
205        $(RM) inactive.cxx inactive.h
206        $(RM) keyboard_ui.cxx keyboard_ui.h
207        $(RM) mandelbrot_ui.cxx mandelbrot_ui.h
208        $(RM) preferences.cxx preferences.h
209        $(RM) radio.cxx radio.h
210        $(RM) resize.cxx resize.h
211        $(RM) tabs.cxx tabs.h
212        $(RM) tree.cxx tree.h
213        $(RM) valuators.cxx valuators.h
214        $(OSX_ONLY) $(RM) blocks.app/Contents/MacOS/blocks$(EXEEXT)
215        $(OSX_ONLY) $(RM) checkers.app/Contents/MacOS/checkers$(EXEEXT)
216        $(OSX_ONLY) $(RM) sudoku.app/Contents/MacOS/sudoku$(EXEEXT)
217
218install:        all
219        echo "Installing example programs to $(DESTDIR)$(docdir)/examples..."
220        -$(INSTALL_DIR) $(DESTDIR)$(docdir)/examples
221        for file in *.h *.cxx *.fl demo.menu; do \
222                $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/examples; \
223        done
224        -$(INSTALL_DIR) $(DESTDIR)$(docdir)/examples/pixmaps
225        for file in pixmaps/*.xbm pixmaps/*.xpm; do \
226                $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/examples/pixmaps; \
227        done
228
229install-linux:
230        echo Installing games to $(DESTDIR)$(bindir)...
231        -$(INSTALL_DIR) $(DESTDIR)$(bindir)
232        -$(INSTALL_DIR) $(DESTDIR)/usr/share/applications
233        -$(INSTALL_DIR) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps
234        -$(INSTALL_DIR) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps
235        for game in blocks checkers sudoku; do \
236                $(INSTALL_BIN) $$game $(DESTDIR)$(bindir); \
237                $(INSTALL_DATA) desktop/$$game.desktop  $(DESTDIR)/usr/share/applications; \
238                $(INSTALL_DATA) desktop/$$game-32.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
239                $(INSTALL_DATA) desktop/$$game-128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
240        done
241
242install-osx:
243        echo Installing games in $(DESTDIR)/Applications...
244        for game in blocks checkers sudoku; do \
245                if test ! -d $(DESTDIR)/Applications/$$game.app; then \
246                        $(INSTALL_DIR) $(DESTDIR)/Applications/$$game.app; \
247                        $(INSTALL_DIR) $(DESTDIR)/Applications/$$game.app/Contents; \
248                        $(INSTALL_DIR) $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
249                        $(INSTALL_DIR) $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
250                fi; \
251                $(INSTALL_DATA) $$game.app/Contents/Info.plist $(DESTDIR)/Applications/$$game.app/Contents; \
252                $(INSTALL_DATA) $$game.app/Contents/PkgInfo $(DESTDIR)/Applications/$$game.app/Contents; \
253                $(INSTALL_BIN) $$game.app/Contents/MacOS/$$game $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
254                $(INSTALL_DATA) $$game.app/Contents/Resources/$$game.icns $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
255        done
256
257uninstall:
258        echo "Removing examples programs from $(DESTDIR)$(docdir)/examples..."
259        -$(RMDIR) $(DESTDIR)$(docdir)/examples
260
261uninstall-linux:
262        echo Removing games from $(DESTDIR)$(bindir)...
263        for game in blocks checkers sudoku; do \
264                $(RM) $(DESTDIR)$(bindir)/$$game; \
265                $(RM) $(DESTDIR)/usr/share/applications/$$game.desktop; \
266                $(RM) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
267                $(RM) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
268        done
269
270uninstall-osx:
271        echo Removing games from $(DESTDIR)/Applications...
272        $(RMDIR) $(DESTDIR)/Applications/blocks.app
273        $(RMDIR) $(DESTDIR)/Applications/checkers.app
274        $(RMDIR) $(DESTDIR)/Applications/sudoku.app
275
276# FLUID file rules
277.fl.cxx .fl.h:  ../fluid/fluid$(EXEEXT)
278        echo Generating $@ and header from $<...
279        ../fluid/fluid$(EXEEXT) -c $<
280
281# All demos depend on the FLTK library...
282$(ALL): $(LIBNAME)
283
284
285
286# General demos...
287unittests$(EXEEXT): unittests.o
288
289unittests.cxx: unittest_about.cxx unittest_points.cxx unittest_lines.cxx unittest_circles.cxx \
290        unittest_rects.cxx unittest_text.cxx unittest_viewport.cxx unittest_images.cxx
291
292adjuster$(EXEEXT): adjuster.o
293
294arc$(EXEEXT): arc.o
295
296ask$(EXEEXT): ask.o
297
298bitmap$(EXEEXT): bitmap.o
299
300boxtype$(EXEEXT): boxtype.o
301
302browser$(EXEEXT): browser.o
303        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ browser.o $(LINKFLTKFORMS) $(LDLIBS)
304
305
306button$(EXEEXT): button.o
307
308buttons$(EXEEXT): buttons.o
309
310blocks$(EXEEXT): blocks.o
311        echo Linking $@...
312        $(CXX) $(ARCHFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
313        $(OSX_ONLY) $(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
314
315checkers$(EXEEXT): checkers.o
316        echo Linking $@...
317        $(CXX) $(ARCHFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
318        $(OSX_ONLY) $(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
319
320clock$(EXEEXT): clock.o
321
322colbrowser$(EXEEXT): colbrowser.o
323        echo Linking $@...
324        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINKFLTKFORMS) $(LDLIBS)
325
326color_chooser$(EXEEXT): color_chooser.o
327
328cursor$(EXEEXT): cursor.o
329
330curve$(EXEEXT): curve.o
331
332demo$(EXEEXT): demo.o
333        echo Linking $@...
334        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS)
335
336device$(EXEEXT): device.o $(IMGLIBNAME)
337        echo Linking $@...
338        $(CXX) $(ARCHFLAGS) $(LDFLAGS) device.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
339
340doublebuffer$(EXEEXT): doublebuffer.o
341
342editor$(EXEEXT): editor.o
343        echo Linking $@...
344        $(CXX) $(ARCHFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
345
346fast_slow$(EXEEXT): fast_slow.o
347fast_slow.cxx:  fast_slow.fl ../fluid/fluid$(EXEEXT)
348
349file_chooser$(EXEEXT): file_chooser.o $(IMGLIBNAME)
350        echo Linking $@...
351        $(CXX) $(ARCHFLAGS) $(LDFLAGS) file_chooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
352
353fonts$(EXEEXT): fonts.o
354
355forms$(EXEEXT): forms.o
356        echo Linking $@...
357        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ forms.o $(LINKFLTKFORMS) $(LDLIBS)
358
359hello$(EXEEXT): hello.o
360        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINKFLTKFORMS) $(LDLIBS)
361
362help$(EXEEXT): help.o $(IMGLIBNAME)
363        echo Linking $@...
364        $(CXX) $(ARCHFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
365
366iconize$(EXEEXT): iconize.o
367
368image$(EXEEXT): image.o
369
370inactive$(EXEEXT): inactive.o
371inactive.cxx:   inactive.fl ../fluid/fluid$(EXEEXT)
372
373input$(EXEEXT): input.o
374
375input_choice$(EXEEXT): input_choice.o
376
377keyboard$(EXEEXT): keyboard_ui.o keyboard.o
378        echo Linking $@...
379        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ keyboard.o keyboard_ui.o $(LINKFLTK) $(LDLIBS)
380keyboard_ui.o:  keyboard_ui.h
381keyboard_ui.cxx:        keyboard_ui.fl ../fluid/fluid$(EXEEXT)
382
383label$(EXEEXT): label.o
384        echo Linking $@...
385        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ label.o $(LINKFLTKFORMS) $(LDLIBS)
386
387line_style$(EXEEXT): line_style.o
388
389list_visuals$(EXEEXT): list_visuals.o
390
391mandelbrot$(EXEEXT): mandelbrot_ui.o mandelbrot.o
392        echo Linking $@...
393        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ mandelbrot.o mandelbrot_ui.o $(LINKFLTK) $(LDLIBS)
394mandelbrot_ui.o:        mandelbrot_ui.h
395mandelbrot_ui.cxx:      mandelbrot_ui.fl ../fluid/fluid$(EXEEXT)
396
397menubar$(EXEEXT): menubar.o
398
399message$(EXEEXT): message.o
400
401minimum$(EXEEXT): minimum.o
402
403native-filechooser$(EXEEXT): native-filechooser.o $(IMGLIBNAME)
404        echo Linking $@...
405        $(CXX) $(ARCHFLAGS) $(LDFLAGS) native-filechooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
406
407navigation$(EXEEXT): navigation.o
408
409output$(EXEEXT): output.o $(FLLIBNAME)
410        echo Linking $@...
411        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ output.o $(LINKFLTKFORMS) $(LDLIBS)
412
413overlay$(EXEEXT): overlay.o
414
415pack$(EXEEXT): pack.o
416
417pixmap$(EXEEXT): pixmap.o
418
419pixmap_browser$(EXEEXT): pixmap_browser.o $(IMGLIBNAME)
420        echo Linking $@...
421        $(CXX) $(ARCHFLAGS) $(LDFLAGS) pixmap_browser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
422
423preferences$(EXEEXT):   preferences.o
424preferences.cxx:        preferences.fl ../fluid/fluid$(EXEEXT)
425
426device$(EXEEXT): device.o
427
428radio$(EXEEXT): radio.o
429radio.cxx:      radio.fl ../fluid/fluid$(EXEEXT)
430
431resize$(EXEEXT): resize.o
432resize.cxx:     resize.fl ../fluid/fluid$(EXEEXT)
433
434resizebox$(EXEEXT): resizebox.o
435
436rotated_text$(EXEEXT): rotated_text.o
437
438scroll$(EXEEXT): scroll.o
439
440subwindow$(EXEEXT): subwindow.o
441
442sudoku: sudoku.o
443        echo Linking $@...
444        $(CXX) $(ARCHFLAGS) $(LDFLAGS) sudoku.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
445        $(OSX_ONLY) $(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
446
447sudoku.exe: sudoku.o sudoku.rc
448        echo Linking $@...
449        $(RC) sudoku.rc sudokures.o
450        $(CXX) $(ARCHFLAGS) $(LDFLAGS) sudoku.o sudokures.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
451
452symbols$(EXEEXT): symbols.o
453
454table$(EXEEXT): table.o
455
456tabs$(EXEEXT): tabs.o
457tabs.cxx:       tabs.fl ../fluid/fluid$(EXEEXT)
458
459threads$(EXEEXT): threads.o
460# This ensures that we have this dependency even if threads are not
461# enabled in the current tree...
462threads.o:      threads.h
463
464tile$(EXEEXT): tile.o
465
466tiled_image$(EXEEXT): tiled_image.o
467
468tree$(EXEEXT): tree.o
469tree.cxx:       tree.fl ../fluid/fluid$(EXEEXT)
470
471valuators$(EXEEXT): valuators.o
472valuators.cxx:  valuators.fl ../fluid/fluid$(EXEEXT)
473
474# All OpenGL demos depend on the FLTK and FLTK_GL libraries...
475$(GLALL): $(LIBNAME) $(GLLIBNAME)
476
477# OpenGL demos...
478CubeView$(EXEEXT): CubeMain.o CubeView.o CubeViewUI.o
479        echo Linking $@...
480        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ \
481                CubeMain.o CubeView.o CubeViewUI.o \
482                $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
483CubeMain.o: CubeViewUI.h CubeView.h CubeViewUI.cxx
484CubeView.o: CubeView.h
485CubeViewUI.o:   CubeViewUI.cxx CubeViewUI.h
486CubeViewUI.cxx: CubeViewUI.fl ../fluid/fluid$(EXEEXT)
487
488cube$(EXEEXT): cube.o
489        echo Linking $@...
490        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cube.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
491
492fractals$(EXEEXT): fractals.o fracviewer.o
493        echo Linking $@...
494        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fractals.o fracviewer.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
495
496fullscreen$(EXEEXT): fullscreen.o
497        echo Linking $@...
498        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fullscreen.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
499
500glpuzzle$(EXEEXT): glpuzzle.o
501        echo Linking $@...
502        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ glpuzzle.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
503
504gl_overlay$(EXEEXT): gl_overlay.o
505        echo Linking $@...
506        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
507
508shape$(EXEEXT): shape.o
509        echo Linking $@...
510        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ shape.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
511
512cairo_test$(EXEEXT): cairo_test.o
513        echo Linking $@...
514        $(CXX) $(ARCHFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(LINKFLTKCAIRO) $(GLDLIBS)
515
516#
517# End of "$Id: Makefile 8389 2011-02-06 14:08:08Z manolo $".
518#
Note: See TracBrowser for help on using the repository browser.