diff options
| author | Manolo Gouy <Manolo> | 2016-08-12 16:59:06 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-08-12 16:59:06 +0000 |
| commit | 3932b1af7c8c36b7b69242e9904c2f54ae4ed0cd (patch) | |
| tree | 717d120c4a08339259286698abc3893c50f22a85 | |
| parent | 765919244741b7e768986e46eaed1119fae3af17 (diff) | |
Remove uses of the '$(shell if test ...' syntax from Makefile that is not cross-platform
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11872 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | configure.in | 22 | ||||
| -rw-r--r-- | makeinclude.in | 5 | ||||
| -rw-r--r-- | src/Makefile | 37 |
3 files changed, 39 insertions, 25 deletions
diff --git a/configure.in b/configure.in index 2e7340c98..1c7e1deff 100644 --- a/configure.in +++ b/configure.in @@ -68,10 +68,7 @@ AC_SUBST(ARCHFLAGS) AC_SUBST(OPTIM) dnl FLTK build options to be used in Makefiles (defined in makeinclude) -BUILD_GDI="No" -BUILD_X11="No" -BUILD_XFT="No" -USEMMFILES="No" +BUILD="" dnl OS-specific pre-tests... dnl host_os_gui equals $host_os unless we target Cygwin or Darwin in combination with X11. @@ -847,7 +844,8 @@ case $host_os_gui in LDFLAGS="-mwindows $LDFLAGS" DSOFLAGS="-mwindows $DSOFLAGS" LIBS="$LIBS -lole32 -luuid -lcomctl32" - BUILD_GDI="Yes" + #BUILD_GDI="Yes" + BUILD="WIN" if test "x$with_optim" = x; then dnl Avoid -Os optimization on Cygwin/MinGW with_optim="-O3" @@ -884,7 +882,8 @@ case $host_os_gui in darwin*) AC_DEFINE(__APPLE_QUARTZ__) - USEMMFILES="Yes" + #USEMMFILES="Yes" + BUILD="OSX" # MacOS X uses Cocoa for graphics. LIBS="$LIBS -framework Cocoa" @@ -943,7 +942,8 @@ case $host_os_gui in LDFLAGS="$X_LIBS $LDFLAGS" DSOFLAGS="$X_LIBS $DSOFLAGS" AC_DEFINE(USE_X11) - BUILD_X11="Yes" + #BUILD_X11="Yes" + BUILD="X11" if test "x$x_includes" != x; then ac_cpp="$ac_cpp -I$x_includes" fi @@ -1008,7 +1008,8 @@ case $host_os_gui in AC_CHECK_HEADER(X11/Xft/Xft.h, AC_CHECK_LIB(Xft, XftDrawCreate, AC_DEFINE(USE_XFT) - BUILD_XFT="Yes" + #BUILD_XFT="Yes" + BUILD="XFT" LIBS="-lXft $LIBS")) fi fi @@ -1104,10 +1105,7 @@ AC_SUBST(THREADS) AC_SUBST(INSTALL_DESKTOP) AC_SUBST(UNINSTALL_DESKTOP) -AC_SUBST(BUILD_GDI) -AC_SUBST(BUILD_X11) -AC_SUBST(BUILD_XFT) -AC_SUBST(USEMMFILES) +AC_SUBST(BUILD) dnl Figure out the appropriate formatted man page extension... case "$host_os" in diff --git a/makeinclude.in b/makeinclude.in index 0dfdb28ef..07a85d9b7 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -28,10 +28,7 @@ FL_VERSION = @FL_VERSION@ # FLTK configuration options -BUILD_GDI = @BUILD_GDI@ -BUILD_X11 = @BUILD_X11@ -BUILD_XFT = @BUILD_XFT@ -USEMMFILES = @USEMMFILES@ +BUILD = @BUILD@ # Standard configure variables diff --git a/src/Makefile b/src/Makefile index 5684a85aa..271ce867d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -309,20 +309,39 @@ PSCPPFILES = \ FLTKFLAGS = -DFL_LIBRARY include ../makeinclude -MMFILES = $(shell if test $(USEMMFILES) = Yes; then echo $(OBJCPPFILES); fi) +# makeinclude has set this variable: +# BUILD = {WIN|X11|XFT|OSX} + +#MMFILES = $(shell if test $(USEMMFILES) = Yes; then echo $(OBJCPPFILES); fi) +MMFILES_OSX = $(OBJCPPFILES) +MMFILES = $(MMFILES_$(BUILD)) + CPPFILES += $(PSCPPFILES) -CPPFILES += $(shell if test $(USEMMFILES) = Yes; then echo $(QUARTZCPPFILES); fi) +#CPPFILES += $(shell if test $(USEMMFILES) = Yes; then echo $(QUARTZCPPFILES); fi) +CPPFILES_OSX = $(QUARTZCPPFILES) + +#CPPFILES += $(shell if test $(BUILD_X11) = Yes; then echo $(XLIBCPPFILES); fi) +#CPPFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) = Yes; then echo $(XLIBXFTFILES); fi) +CPPFILES_XFT = $(XLIBCPPFILES) $(XLIBXFTFILES) +#CPPFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) != Yes; then echo $(XLIBFONTFILES); fi) +CPPFILES_X11 = $(XLIBCPPFILES) $(XLIBFONTFILES) + +#CPPFILES += $(shell if test $(BUILD_GDI) = Yes; then echo $(GDICPPFILES); fi) +CPPFILES_WIN = $(GDICPPFILES) + +CPPFILES += $(CPPFILES_$(BUILD)) + -CPPFILES += $(shell if test $(BUILD_X11) = Yes; then echo $(XLIBCPPFILES); fi) -CPPFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) = Yes; then echo $(XLIBXFTFILES); fi) -CPPFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) != Yes; then echo $(XLIBFONTFILES); fi) +#CFILES += $(shell if test $(BUILD_X11) = Yes; then echo $(XLIBCFILES); fi) +#CFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) != Yes; then echo $(XLIBXCFILES); fi) +CFILES_X11 = $(XLIBCFILES) $(XLIBXCFILES) +CFILES_XFT = $(XLIBCFILES) -CPPFILES += $(shell if test $(BUILD_GDI) = Yes; then echo $(GDICPPFILES); fi) +#CFILES += $(shell if test $(BUILD_GDI) = Yes; then echo $(GDICFILES); fi) +CFILES_WIN = $(GDICFILES) -CFILES += $(shell if test $(BUILD_X11) = Yes; then echo $(XLIBCFILES); fi) -CFILES += $(shell if test $(BUILD_X11) = Yes -a $(BUILD_XFT) != Yes; then echo $(XLIBXCFILES); fi) +CFILES += $(CFILES_$(BUILD)) -CFILES += $(shell if test $(BUILD_GDI) = Yes; then echo $(GDICFILES); fi) OBJECTS = $(MMFILES:.mm=.o) $(CPPFILES:.cxx=.o) $(CFILES:.c=.o) $(UTF8CFILES:.c=.o) GLOBJECTS = $(GLCPPFILES:.cxx=.o) |
