2023-01-21 19:14:41 +03:00
|
|
|
#
|
|
|
|
# fltk-options Makefile for the Fast Light Tool Kit (FLTK).
|
|
|
|
#
|
2024-08-10 17:00:24 +03:00
|
|
|
# Copyright 2023-2024 by Bill Spitzak and others.
|
2023-01-21 19:14:41 +03:00
|
|
|
#
|
|
|
|
# This library is free software. Distribution and use rights are outlined in
|
|
|
|
# the file "COPYING" which should have been included with this file. If this
|
|
|
|
# file is missing or damaged, see the license at:
|
|
|
|
#
|
|
|
|
# https://www.fltk.org/COPYING.php
|
|
|
|
#
|
|
|
|
# Please see the following page on how to report bugs and issues:
|
|
|
|
#
|
|
|
|
# https://www.fltk.org/bugs.php
|
|
|
|
#
|
|
|
|
|
|
|
|
include ../makeinclude
|
|
|
|
|
|
|
|
CPPFILES = \
|
|
|
|
fltk-options.cxx
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
OBJECTS = $(CPPFILES:.cxx=.o)
|
|
|
|
|
|
|
|
all: $(FLTK_OPTIONS) fltk-options$(EXEEXT)
|
|
|
|
|
2023-12-20 18:56:29 +03:00
|
|
|
fltk-options$(EXEEXT): $(OBJECTS) $(LIBNAME)
|
2023-01-21 19:14:41 +03:00
|
|
|
echo Linking $@...
|
|
|
|
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS)
|
|
|
|
$(OSX_ONLY) $(RM) -r -f fltk-options.app
|
|
|
|
$(OSX_ONLY) mkdir -p fltk-options.app/Contents/MacOS fltk-options.app/Contents/Resources
|
|
|
|
$(OSX_ONLY) $(INSTALL_BIN) fltk-options fltk-options.app/Contents/MacOS
|
|
|
|
$(OSX_ONLY) $(INSTALL) icons/fltk-options.icns fltk-options.app/Contents/Resources
|
|
|
|
$(OSX_ONLY) $(INSTALL) fltk-options.plist fltk-options.app/Contents/Info.plist
|
|
|
|
|
2023-12-20 18:56:29 +03:00
|
|
|
fltk-options-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME)
|
2023-01-21 19:14:41 +03:00
|
|
|
echo Linking $@...
|
|
|
|
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDFLAGS) $(LDLIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-$(RM) *.o core.* *~ *.bck *.bak
|
|
|
|
-$(RM) core fltk-options$(EXEEXT) fltk-options-shared$(EXEEXT)
|
|
|
|
$(OSX_ONLY) -$(RMDIR) fltk-options.app
|
|
|
|
|
|
|
|
depend: $(CPPFILES)
|
|
|
|
makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
|
|
|
|
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
|
|
|
|
echo "" >> makedepend.tmp
|
|
|
|
grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; )
|
|
|
|
mv makedepend.tmp makedepend
|
|
|
|
|
|
|
|
# Automatically generated dependencies...
|
|
|
|
include makedepend
|
|
|
|
|
|
|
|
install: all
|
|
|
|
echo "Installing fltk-options in $(DESTDIR)$(bindir)..."
|
2024-08-10 17:00:24 +03:00
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
|
|
|
|
$(INSTALL_BIN) $(FLTK_OPTIONS) "$(DESTDIR)$(bindir)/fltk-options$(EXEEXT)"
|
2023-01-21 19:14:41 +03:00
|
|
|
|
|
|
|
install-linux:
|
2024-08-10 17:00:24 +03:00
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/usr/share/applications"
|
|
|
|
$(INSTALL_DATA) fltk-options.desktop "$(DESTDIR)/usr/share/applications"
|
2023-01-21 19:14:41 +03:00
|
|
|
for size in 16 32 48 64 128; do \
|
2024-08-10 17:00:24 +03:00
|
|
|
if test ! -d "$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps"; then \
|
|
|
|
$(INSTALL_DIR) "$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps"; \
|
2023-01-21 19:14:41 +03:00
|
|
|
fi; \
|
2024-08-10 17:00:24 +03:00
|
|
|
$(INSTALL_DATA) icons/fltk-options-$$size.png "$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fltk-options.png"; \
|
2023-01-21 19:14:41 +03:00
|
|
|
done
|
2024-08-10 17:00:24 +03:00
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/usr/share/mimelnk/application"
|
|
|
|
$(INSTALL_DATA) x-fltk-options.desktop "$(DESTDIR)/usr/share/mimelnk/application"
|
2023-01-21 19:14:41 +03:00
|
|
|
|
|
|
|
install-osx:
|
|
|
|
echo Installing fltk-options in $(DESTDIR)/Applications...
|
2024-08-10 17:00:24 +03:00
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/Applications/fltk-options.app"
|
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/Applications/fltk-options.app/Contents"
|
|
|
|
$(INSTALL_DATA) fltk-options.app/Contents/Info.plist "$(DESTDIR)/Applications/fltk-options.app/Contents/Info.plist"
|
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/Applications/fltk-options.app/Contents/MacOS"
|
|
|
|
$(RM) "$(DESTDIR)/Applications/fltk-options.app/Contents/MacOS/fltk-options"
|
|
|
|
$(LN) $(bindir)/fltk-options "$(DESTDIR)/Applications/fltk-options.app/Contents/MacOS/fltk-options"
|
|
|
|
-$(INSTALL_DIR) "$(DESTDIR)/Applications/fltk-options.app/Contents/Resources"
|
|
|
|
$(INSTALL_DATA) fltk-options.app/Contents/Resources/fltk-options.icns "$(DESTDIR)/Applications/fltk-options.app/Contents/Resources"
|
2023-01-21 19:14:41 +03:00
|
|
|
|
|
|
|
uninstall:
|
2024-08-10 17:00:24 +03:00
|
|
|
$(RM) "$(DESTDIR)$(bindir)/fltk-options$(EXEEXT)"
|
2023-01-21 19:14:41 +03:00
|
|
|
|
|
|
|
uninstall-linux:
|
2024-08-10 17:00:24 +03:00
|
|
|
$(RM) "$(DESTDIR)/usr/share/applications/fltk-options.desktop"
|
|
|
|
$(RM) "$(DESTDIR)/usr/share/icons/hicolor/*/fltk-options.png"
|
|
|
|
$(RM) "$(DESTDIR)/usr/share/mimelnk/application/x-fltk-options.desktop"
|
2023-01-21 19:14:41 +03:00
|
|
|
|
|
|
|
uninstall-osx:
|
2024-08-10 17:00:24 +03:00
|
|
|
$(RM) -r "$(DESTDIR)/Applications/fltk-options.app"
|