Debian Codegraph @

fluid/Makefile

raw ◀ ▶
1 Debian patch touch this file
1 #
2 # FLUID Makefile for the Fast Light Tool Kit (FLTK).
3 #
4 # Copyright 1998-2024 by Bill Spitzak and others.
5 #
6 # This library is free software. Distribution and use rights are outlined in
7 # the file "COPYING" which should have been included with this file. If this
8 # file is missing or damaged, see the license at:
9 #
10 # https://www.fltk.org/COPYING.php
11 #
12 # Please see the following page on how to report bugs and issues:
13 #
14 # https://www.fltk.org/bugs.php
15 #
16
17 include ../makeinclude
18
19 CPPFILES = \
20 CodeEditor.cxx \
21 StyleParse.cxx \
22 Fd_Snap_Action.cxx \
23 Fl_Button_Type.cxx \
24 Fl_Function_Type.cxx \
25 Fl_Grid_Type.cxx \
26 Fl_Group_Type.cxx \
27 Fl_Menu_Type.cxx \
28 Fl_Type.cxx \
29 Fl_Widget_Type.cxx \
30 Fl_Window_Type.cxx \
31 Fluid_Image.cxx \
32 about_panel.cxx \
33 align_widget.cxx \
34 settings_panel.cxx \
35 autodoc.cxx \
36 code.cxx \
37 custom_widgets.cxx \
38 factory.cxx \
39 file.cxx \
40 fluid.cxx \
41 fluid_filename.cxx \
42 function_panel.cxx \
43 mergeback.cxx \
44 pixmaps.cxx \
45 shell_command.cxx \
46 codeview_panel.cxx \
47 template_panel.cxx \
48 undo.cxx \
49 widget_browser.cxx \
50 widget_panel.cxx
51
52 # ExternalCodeEditor: platform specific files
53
54 CPPFILES_WIN = ExternalCodeEditor_WIN32.cxx
55 CPPFILES_OSX = ExternalCodeEditor_UNIX.cxx
56 CPPFILES_X11 = ExternalCodeEditor_UNIX.cxx
57 CPPFILES_XFT = ExternalCodeEditor_UNIX.cxx
58 CPPFILES_CAIRO = ExternalCodeEditor_UNIX.cxx
59 CPPFILES_WAYLAND = ExternalCodeEditor_UNIX.cxx
60 CPPFILES_WAYLANDX11 = ExternalCodeEditor_UNIX.cxx
61
62 CPPFILES += $(CPPFILES_$(BUILD))
63
64 ################################################################
65
66 OBJECTS = $(CPPFILES:.cxx=.o)
67
68 all: $(FLUID) fluid$(EXEEXT)
69
70 fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(IMGLIBNAME)
71 echo Linking $@...
72 $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS)
73 $(OSX_ONLY) $(RM) -r -f fluid.app
74 $(OSX_ONLY) mkdir -p fluid.app/Contents/MacOS fluid.app/Contents/Resources
75 $(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
76 $(OSX_ONLY) $(INSTALL) icons/fluid.icns fluid.app/Contents/Resources
77 $(OSX_ONLY) $(INSTALL) fluid.plist fluid.app/Contents/Info.plist
78
79 fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(IMGDSONAME)
80 echo Linking $@...
81 $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDFLAGS) $(LDLIBS)
82
83 clean:
84 -$(RM) *.o core.* *~ *.bck *.bak
85 -$(RM) core fluid$(EXEEXT) fluid-shared$(EXEEXT)
86 $(OSX_ONLY) -$(RMDIR) fluid.app
87
88 depend: $(CPPFILES)
89 makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
90 echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
91 echo "" >> makedepend.tmp
92 grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; )
93 mv makedepend.tmp makedepend
94
95 # Automatically generated dependencies...
96 include makedepend
97
98 install: all
99 echo "Installing FLUID in $(DESTDIR)$(bindir)..."
100 -$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
101 $(INSTALL_BIN) $(FLUID) "$(DESTDIR)$(bindir)/fluid$(EXEEXT)"
102
103 install-linux:
104 -$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
105 $(INSTALL_DATA) fluid.desktop "$(DESTDIR)$(datadir)/applications"
106 for size in 16 32 48 64 128; do \
107 if test ! -d "$(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps"; then \
108 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps"; \
109 fi; \
110 $(INSTALL_DATA) icons/fluid-$$size.png "$(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/fluid.png"; \
111 done
•112 -$(INSTALL_DIR) "$(DESTDIR)/usr/share/mime/packages"
113 $(INSTALL_DATA) fluid.xml "$(DESTDIR)/usr/share/mime/packages"
114
115 install-osx:
116 echo Installing Fluid in $(DESTDIR)/Applications...
117 -$(INSTALL_DIR) "$(DESTDIR)/Applications/fluid.app"
118 -$(INSTALL_DIR) "$(DESTDIR)/Applications/fluid.app/Contents"
119 $(INSTALL_DATA) fluid.app/Contents/Info.plist "$(DESTDIR)/Applications/fluid.app/Contents/Info.plist"
120 -$(INSTALL_DIR) "$(DESTDIR)/Applications/fluid.app/Contents/MacOS"
121 $(RM) "$(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid"
122 $(LN) "$(bindir)/fluid" "$(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid"
123 -$(INSTALL_DIR) "$(DESTDIR)/Applications/fluid.app/Contents/Resources"
124 $(INSTALL_DATA) fluid.app/Contents/Resources/fluid.icns "$(DESTDIR)/Applications/fluid.app/Contents/Resources"
125
126 uninstall:
127 $(RM) "$(DESTDIR)$(bindir)/fluid$(EXEEXT)"
128
129 uninstall-linux:
130 $(RM) "$(DESTDIR)$(datadir)/applications/fluid.desktop"
131 $(RM) "$(DESTDIR)$(datadir)/icons/hicolor"/*/fluid.png
132 $(RM) "$(DESTDIR)$(datadir)/mimelnk/application/x-fluid.desktop"
133
134 uninstall-osx:
135 $(RM) -r "$(DESTDIR)/Applications/fluid.app"
136
137 # Note: The rebuild target can only be used if you have the original .fl
138 # files. This is normally only used by FLTK maintainers...
139 # It *must* be executed *after* fluid has been built and
140 # fluid must be rebuilt if any {.fl|.cxx|.h} files were changed.
141
142 rebuild: fluid$(EXEEXT)
143 echo 'Rebuilding fluid (.fl) and .cxx/.h files from .fl files ...'
144 ./fluid$(EXEEXT) -u -c about_panel.fl
145 ./fluid$(EXEEXT) -u -c settings_panel.fl
146 ./fluid$(EXEEXT) -u -c function_panel.fl
147 ./fluid$(EXEEXT) -u -c print_panel.fl
148 ./fluid$(EXEEXT) -u -c codeview_panel.fl
149 ./fluid$(EXEEXT) -u -c template_panel.fl
150 ./fluid$(EXEEXT) -u -c widget_panel.fl