1 | # |
---|
2 | # "$Id: Makefile 8427 2011-02-15 15:29:03Z mike $" |
---|
3 | # |
---|
4 | # Top-level 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 | |
---|
28 | include makeinclude |
---|
29 | |
---|
30 | DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation |
---|
31 | |
---|
32 | all: makeinclude fltk-config |
---|
33 | for dir in $(DIRS); do\ |
---|
34 | echo "=== making $$dir ===";\ |
---|
35 | (cd $$dir; $(MAKE) $(MFLAGS)) || exit 1;\ |
---|
36 | done |
---|
37 | |
---|
38 | install: makeinclude |
---|
39 | -mkdir -p $(DESTDIR)$(bindir) |
---|
40 | $(RM) $(DESTDIR)$(bindir)/fltk-config |
---|
41 | $(INSTALL_SCRIPT) fltk-config $(DESTDIR)$(bindir) |
---|
42 | for dir in FL $(DIRS); do\ |
---|
43 | echo "=== installing $$dir ===";\ |
---|
44 | (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\ |
---|
45 | done |
---|
46 | |
---|
47 | install-desktop: makeinclude |
---|
48 | cd documentation; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) |
---|
49 | cd fluid; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) |
---|
50 | cd test; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) |
---|
51 | |
---|
52 | uninstall: makeinclude |
---|
53 | $(RM) $(DESTDIR)$(bindir)/fltk-config |
---|
54 | for dir in FL $(DIRS); do\ |
---|
55 | echo "=== uninstalling $$dir ===";\ |
---|
56 | (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\ |
---|
57 | done |
---|
58 | |
---|
59 | uninstall-desktop: makeinclude |
---|
60 | cd documentation; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) |
---|
61 | cd fluid; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) |
---|
62 | cd test; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) |
---|
63 | |
---|
64 | depend: makeinclude |
---|
65 | for dir in $(DIRS); do\ |
---|
66 | echo "=== making dependencies in $$dir ===";\ |
---|
67 | (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\ |
---|
68 | done |
---|
69 | |
---|
70 | clean: |
---|
71 | -$(RM) core *.o |
---|
72 | for dir in $(DIRS); do\ |
---|
73 | echo "=== cleaning $$dir ===";\ |
---|
74 | (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\ |
---|
75 | done |
---|
76 | |
---|
77 | distclean: clean |
---|
78 | $(RM) config.* |
---|
79 | $(RM) fltk-config fltk.list makeinclude |
---|
80 | $(RM) fltk.spec |
---|
81 | $(RM) FL/Makefile |
---|
82 | $(RM) documentation/*.$(CAT1EXT) |
---|
83 | $(RM) documentation/*.$(CAT3EXT) |
---|
84 | $(RM) documentation/*.$(CAT6EXT) |
---|
85 | $(RM) documentation/fltk.ps |
---|
86 | $(RM) -r documentation/fltk.d |
---|
87 | for file in test/*.fl; do\ |
---|
88 | $(RM) test/`basename $$file .fl`.cxx; \ |
---|
89 | $(RM) test/`basename $$file .fl`.h; \ |
---|
90 | done |
---|
91 | |
---|
92 | fltk-config: configure configh.in fltk-config.in |
---|
93 | if test -f config.status; then \ |
---|
94 | ./config.status --recheck; \ |
---|
95 | ./config.status; \ |
---|
96 | else \ |
---|
97 | ./configure; \ |
---|
98 | fi |
---|
99 | touch config.h |
---|
100 | chmod +x fltk-config |
---|
101 | |
---|
102 | makeinclude: configure configh.in makeinclude.in |
---|
103 | if test -f config.status; then \ |
---|
104 | ./config.status --recheck; \ |
---|
105 | ./config.status; \ |
---|
106 | else \ |
---|
107 | ./configure; \ |
---|
108 | fi |
---|
109 | touch config.h |
---|
110 | chmod +x fltk-config |
---|
111 | |
---|
112 | configure: configure.in |
---|
113 | autoconf |
---|
114 | |
---|
115 | portable-dist: |
---|
116 | epm -v -s fltk.xpm fltk |
---|
117 | |
---|
118 | native-dist: |
---|
119 | epm -v -f native fltk |
---|
120 | |
---|
121 | etags: |
---|
122 | etags FL/*.H FL/*.h src/*.cxx src/*.c src/*.h src/xutf8/*.h src/xutf8/*.c cairo/*.cxx fluid/*.h fluid/*.cxx test/*.h test/*.cxx |
---|
123 | |
---|
124 | # |
---|
125 | # Run the clang.llvm.org static code analysis tool on the C sources. |
---|
126 | # (at least checker-231 is required for scan-build to work this way) |
---|
127 | # |
---|
128 | |
---|
129 | .PHONY: clang clang-changes |
---|
130 | clang: |
---|
131 | $(RM) -r clang |
---|
132 | scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) clean all |
---|
133 | clang-changes: |
---|
134 | scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all |
---|
135 | |
---|
136 | |
---|
137 | # |
---|
138 | # End of "$Id: Makefile 8427 2011-02-15 15:29:03Z mike $". |
---|
139 | # |
---|