STR 1883: Attempt to fix installation of binaries in .app bundle on platforms other than OS X. Must be tested with Cygwin and on Linux!

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2008-02-26 15:26:08 +00:00
parent 68a20dbc32
commit 9c538a4b2e
4 changed files with 16 additions and 8 deletions

View File

@ -600,6 +600,7 @@ AC_SUBST(PTHREAD_FLAGS)
dnl Define OS-specific stuff...
HLINKS=
POSTBUILD=:
OSX_ONLY=:
THREADS=
AC_ARG_WITH(links, [ --with-links make header links for common misspellings])
@ -680,6 +681,9 @@ case $uname in
# Add a postbuild step after linking applications
POSTBUILD="/Developer/Tools/Rez -t APPL -o"
# Some steps are only done for OS X package management
OSX_ONLY=
# Install/Uninstall FLUID application
INSTALL_DESKTOP="install-osx"
UNINSTALL_DESKTOP="uninstall-osx"
@ -815,6 +819,7 @@ AC_SUBST(GLDEMOS)
AC_SUBST(GLLIB)
AC_SUBST(HLINKS)
AC_SUBST(POSTBUILD)
AC_SUBST(OSX_ONLY)
AC_SUBST(THREADS)
AC_SUBST(INSTALL_DESKTOP)

View File

@ -58,7 +58,7 @@ fluid$(EXEEXT): $(OBJECTS) ../lib/$(LIBNAME) ../lib/$(FLLIBNAME) \
../lib/$(IMGLIBNAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS)
$(INSTALL_BIN) fluid fluid.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r
fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
@ -70,7 +70,7 @@ fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
clean:
-$(RM) *.o core.* *~ *.bck *.bck
-$(RM) core fluid$(EXEEXT) fluid-shared$(EXEEXT)
-$(RM) fluid.app/Contents/MacOS/fluid
-$(RM) fluid.app/Contents/MacOS/fluid$(EXEEXT)
depend: $(CPPFILES)
makedepend -Y -I.. -f makedepend $(CPPFILES)

View File

@ -100,6 +100,9 @@ THREADS = @THREADS@
# Name of FLUID executable we install
FLUID = @FLUID@$(EXEEXT)
# Possible steps for OS X build only
OSX_ONLY = @OSX_ONLY@
# Possible steps after linking...
POSTBUILD = @POSTBUILD@

View File

@ -185,9 +185,9 @@ clean:
$(RM) resize.cxx
$(RM) tabs.cxx
$(RM) valuators.cxx
$(RM) blocks.app/Contents/MacOS/blocks
$(RM) checkers.app/Contents/MacOS/checkers
$(RM) sudoku.app/Contents/MacOS/sudoku
$(OSX_ONLY) $(RM) blocks.app/Contents/MacOS/blocks$(EXEEXT)
$(OSX_ONLY) $(RM) checkers.app/Contents/MacOS/checkers$(EXEEXT)
$(OSX_ONLY) $(RM) sudoku.app/Contents/MacOS/sudoku$(EXEEXT)
install: all
echo "Installing example programs to $(DESTDIR)$(docdir)/examples..."
@ -277,13 +277,13 @@ buttons$(EXEEXT): buttons.o
blocks$(EXEEXT): blocks.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
$(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r
checkers$(EXEEXT): checkers.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
$(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r
clock$(EXEEXT): clock.o
@ -409,7 +409,7 @@ subwindow$(EXEEXT): subwindow.o
sudoku: sudoku.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) sudoku.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
$(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r
sudoku.exe: sudoku.o sudoku.rc