diff --git a/configure.in b/configure.in index 9d79a1c67..53918a8ac 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/fluid/Makefile b/fluid/Makefile index ada2f6501..a26901caf 100644 --- a/fluid/Makefile +++ b/fluid/Makefile @@ -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) diff --git a/makeinclude.in b/makeinclude.in index 5802b73f9..17a6d92c0 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -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@ diff --git a/test/Makefile b/test/Makefile index abd0a8a34..75841e024 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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