diff --git a/ChangeLog b/ChangeLog index 16ef09e4f..8db754d17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-12-17 Werner Lemberg + + * *.mk: Added lots of `.PHONY' targets. + +2000-12-17 Karsten Fleischer + + * *.mk: Implemented `platform' target to disable auto-detection. + 2000-12-14 Werner Lemberg * docs/design/modules.html: Removed. Covered by design-*.html. @@ -6,15 +14,23 @@ 2000-12-14 David Turner - * include/freetype/ftimage.h, include/freetype/fttypes.h, - src/smooth/ftgrays.c: Added support for clipped direct rendering in - the smooth renderer. This should not break binary compatibility of - existing applications. + Added support for clipped direct rendering in the smooth renderer. + This should not break binary compatibility of existing applications. + + * include/freetype/fttypes.h, include/freetype/ftimage.h: Move + definition of the FT_BBox structure from the former to the latter. + * include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to + FT_Raster_Flag enumeration. + Add `clip_box' element to FT_Raster_Params structure. + * src/smooth/ftgrays.c (grays_convert_glyph): Implement it. * INSTALL: Updated installation instructions on Win32, listing the new "make setup list" target used to list supported compilers/targets. + * src/raster/ftraster.c (ft_black_render): Test for unsupported + direct rendering before testing arguments. + 2000-12-13 David Turner * include/freetype/config/ft2build.h, diff --git a/builds/ansi/ansi-def.mk b/builds/ansi/ansi-def.mk index 9533a2842..df98d1055 100644 --- a/builds/ansi/ansi-def.mk +++ b/builds/ansi/ansi-def.mk @@ -93,6 +93,8 @@ ANSIFLAGS := ifdef BUILD_PROJECT + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/detect.mk b/builds/detect.mk index 83a222001..eaf1ddec5 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -70,17 +70,39 @@ CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE) # BACKSLASH := $(strip \ ) -# Now, include all detection rule files found in the `builds/' -# directories. Note that the calling order of the various `detect.mk' files -# isn't predictable. +# Find all auto-detectable platforms. # -include $(wildcard $(BUILD_CONFIG_)*/detect.mk) +PLATFORMS_ := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG_)*/detect.mk))) +.PHONY: $(PLATFORMS_) ansi + +# Filter out platform specified as setup target. +# +PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS_))) + +# If no setup target platform was specified, enable auto-detection/ +# default platform. +# +ifeq ($(PLATFORM),) + PLATFORM := ansi +endif + +# If the user has explicitly asked for `ansi' on the command line, +# disable auto-detection. +# +ifeq ($(findstring ansi,$(MAKECMDGOALS)),) + # Now, include all detection rule files found in the `builds/' + # directories. Note that the calling order of the various `detect.mk' + # files isn't predictable. + # + include $(wildcard $(BUILD_CONFIG_)*/detect.mk) +endif # In case no detection rule file was successful, use the default. # ifndef CONFIG_FILE CONFIG_FILE := ansi.mk setup: std_setup + .PHONY: setup endif # The following targets are equivalent, with the exception that they use diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk index 450c7e0c6..65eb42d36 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -13,43 +13,24 @@ # fully. -# Test for DJGPP by checking the DJGPP environment variable, which must be -# set in order to use the system (ie. it will always be present when the -# `make' utility is run). -# +.PHONY: setup + + ifeq ($(PLATFORM),ansi) + # Test for DJGPP by checking the DJGPP environment variable, which must be + # set in order to use the system (ie. it will always be present when the + # `make' utility is run). + # + # We test for the COMSPEC environment variable, then run the `ver' + # command-line program to see if its output contains the word `Dos'. + # + # If this is true, we are running a Dos-ish platform (or an emulation). + # ifdef DJGPP - # We are definitely using DJGPP - PLATFORM := dos - DELETE := del - COPY := copy - CONFIG_FILE := dos-gcc.mk - SEP := / - ifndef CC - CC := gcc - endif # test CC - - setup : dos_setup - - endif # test DJGPP -endif # test PLATFORM - - - -# We test for the COMSPEC environment variable, then run the `ver' -# command-line program to see if its output contains the word `Dos'. -# -# If this is true, we are running a Dos-ish platform (or an emulation). -# -ifeq ($(PLATFORM),ansi) - - ifdef COMSPEC - # - # We try to recognize a Cygwin session, in which case we're - # certainly not running on DOS! - # - ifneq ($(OSTYPE),cygwin) + PLATFORM := dos + else + ifdef COMSPEC is_dos := $(findstring Dos,$(shell ver)) # We try to recognize a Dos session under OS/2. The `ver' command @@ -59,58 +40,66 @@ ifeq ($(PLATFORM),ansi) # substring `MDOS\COMMAND' # ifeq ($(is_dos),) - is_dos := $(findstring MDOS\COMMAND,$(COMSPEC)) + is_dos := $(findstring MDOS\COMMAND,$(COMSPEC)) endif - endif # test Cygwin - endif # test COMSPEC + endif # test COMSPEC - ifneq ($(is_dos),) + ifneq ($(is_dos),) - PLATFORM := dos - DELETE := del - COPY := copy + PLATFORM := dos - # Use DJGPP (i.e. gcc) by default. - # - CONFIG_FILE := dos-gcc.mk - SEP := / - ifndef CC - CC := gcc - endif + endif # test Dos + endif # test DJGPP +endif # test PLATFORM ansi - # additionally, we provide hooks for various other compilers - # - ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C - CONFIG_FILE := dos-tcc.mk - SEP := $(BACKSLASH) - CC := tcc - .PHONY: turboc - endif +ifeq ($(PLATFORM),dos) + DELETE := del + COPY := copy - ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ - CONFIG_FILE := dos-wat.mk - SEP := $(BACKSLASH) - CC := wcc386 - .PHONY: watcom - endif + # Use DJGPP (i.e. gcc) by default. + # + CONFIG_FILE := dos-gcc.mk + SEP := / + ifndef CC + CC := gcc + endif - ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit - CONFIG_FILE := dos-bcc.mk - SEP := $(BACKSLASH) - CC := bcc - .PHONY: borlandc16 - endif + # additionally, we provide hooks for various other compilers + # + ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C + CONFIG_FILE := dos-tcc.mk + SEP := $(BACKSLASH) + CC := tcc + turboc: setup + .PHONY: turboc + endif - ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit - CONFIG_FILE := dos-bcc.mk - SEP := $(BACKSLASH) - CC := bcc32 - .PHONY: borlandc - endif + ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ + CONFIG_FILE := dos-wat.mk + SEP := $(BACKSLASH) + CC := wcc386 + watcom: setup + .PHONY: watcom + endif - setup: dos_setup + ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit + CONFIG_FILE := dos-bcc.mk + SEP := $(BACKSLASH) + CC := bcc + borlandc16: setup + .PHONY: borlandc16 + endif - endif # test Dos -endif # test PLATFORM + ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit + CONFIG_FILE := dos-bcc.mk + SEP := $(BACKSLASH) + CC := bcc32 + borlandc: setup + .PHONY: borlandc + endif + + setup: dos_setup + +endif # test PLATFORM dos # EOF diff --git a/builds/dos/dos-def.mk b/builds/dos/dos-def.mk index 16f4e0dea..ec7f766b9 100644 --- a/builds/dos/dos-def.mk +++ b/builds/dos/dos-def.mk @@ -58,6 +58,8 @@ NO_OUTPUT = &> nul ifdef BUILD_PROJECT + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/freetype.mk b/builds/freetype.mk index a1419cde7..15861ff21 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -70,7 +70,7 @@ # The targets `objects' and `library' are defined at the end of this # Makefile after all other rules have been included. # -.PHONY: single objects library +.PHONY: single multi objects library # default target -- build single objects and library # @@ -255,6 +255,8 @@ library: $(PROJECT_LIBRARY) $(FT_COMPILE) $T$@ $< +.PHONY: clean_project_std distclean_project_std + # Standard cleaning and distclean rules. These are not accepted # on all systems though. # @@ -265,6 +267,9 @@ distclean_project_std: clean_project_std -$(DELETE) $(PROJECT_LIBRARY) -$(DELETE) *.orig *~ core *.core $(DISTCLEAN) + +.PHONY: clean_project_dos distclean_project_dos + # The Dos command shell does not support very long list of arguments, so # we are stuck with wildcards. # @@ -276,12 +281,17 @@ distclean_project_dos: clean_project_dos -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY)) \ $(DISTCLEAN) $(NO_OUTPUT) + +.PHONY: remove_config_mk + # Remove configuration file (used for distclean). # remove_config_mk: -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) $(NO_OUTPUT) +.PHONY: clean distclean + # The `config.mk' file must define `clean_freetype' and # `distclean_freetype'. Implementations may use to relay these to either # the `std' or `dos' versions from above, or simply provide their own diff --git a/builds/link_dos.mk b/builds/link_dos.mk index 5b1d497e7..b35115b59 100644 --- a/builds/link_dos.mk +++ b/builds/link_dos.mk @@ -15,6 +15,8 @@ ifdef BUILD_PROJECT + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/link_std.mk b/builds/link_std.mk index ecba73b8e..2a7b26df7 100644 --- a/builds/link_std.mk +++ b/builds/link_std.mk @@ -15,6 +15,8 @@ ifdef BUILD_PROJECT + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/modules.mk b/builds/modules.mk index 2ff0e5013..59f1223c1 100644 --- a/builds/modules.mk +++ b/builds/modules.mk @@ -20,7 +20,7 @@ # This file is in charge of handling the generation of the modules list # file. -.PHONY: make_module_list clean_module_list remake_module_list +.PHONY: make_module_list clean_module_list # MODULE_LIST, as its name suggests, indicates where the modules list # resides. For now, it is in `include/freetype/config/ftmodule.h'. diff --git a/builds/os2/detect.mk b/builds/os2/detect.mk index ac457ae8f..d332be7f4 100644 --- a/builds/os2/detect.mk +++ b/builds/os2/detect.mk @@ -13,51 +13,63 @@ # fully. +.PHONY: setup + + ifeq ($(PLATFORM),ansi) ifdef OS2_SHELL PLATFORM := os2 - COPY := copy - DELETE := del - - # gcc-emx by default - CONFIG_FILE := os2-gcc.mk - SEP := / - - # additionally, we provide hooks for various other compilers - # - ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ - CONFIG_FILE := os2-icc.mk - SEP := $(BACKSLASH) - CC := icc - .PHONY: visualage - endif - - ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ - CONFIG_FILE := os2-wat.mk - SEP := $(BACKSLASH) - CC := wcc386 - .PHONY: watcom - endif - - ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit - CONFIG_FILE := os2-bcc.mk - SEP := $(BACKSLASH) - CC := bcc32 - .PHONY: borlandc - endif - - ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target - CONFIG_FILE := os2-dev.mk - CC := gcc - SEP := / - devel: setup - endif - - setup: dos_setup endif # test OS2_SHELL -endif # test PLATFORM +endif + +ifeq ($(PLATFORM),os2) + + COPY := copy + DELETE := del + + # gcc-emx by default + CONFIG_FILE := os2-gcc.mk + SEP := / + + # additionally, we provide hooks for various other compilers + # + ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ + CONFIG_FILE := os2-icc.mk + SEP := $(BACKSLASH) + CC := icc + visualage: setup + .PHONY: visualage + endif + + ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ + CONFIG_FILE := os2-wat.mk + SEP := $(BACKSLASH) + CC := wcc386 + watcom: setup + .PHONY: watcom + endif + + ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit + CONFIG_FILE := os2-bcc.mk + SEP := $(BACKSLASH) + CC := bcc32 + borlandc: setup + .PHONY: borlandc + endif + + ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target + CONFIG_FILE := os2-dev.mk + CC := gcc + SEP := / + devel: setup + .PHONY: devel + endif + + setup: dos_setup + +endif # test PLATFORM os2 # EOF diff --git a/builds/os2/os2-def.mk b/builds/os2/os2-def.mk index 42f505dbd..b65b591a6 100644 --- a/builds/os2/os2-def.mk +++ b/builds/os2/os2-def.mk @@ -58,6 +58,8 @@ NO_OUTPUT = 2> nul ifdef BUILD_LIBRARY + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk index 0df4bbc0c..db7f3d5cb 100644 --- a/builds/os2/os2-dev.mk +++ b/builds/os2/os2-dev.mk @@ -109,6 +109,8 @@ ANSIFLAGS := -ansi -pedantic ifdef BUILD_FREETYPE + .PHONY: clean_freetype distclean_freetype + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk index 2bed13304..6470c7275 100644 --- a/builds/os2/os2-gcc.mk +++ b/builds/os2/os2-gcc.mk @@ -108,6 +108,8 @@ ANSIFLAGS := -ansi -pedantic ifdef BUILD_FREETYPE + .PHONY: clean_freetype distclean_freetype + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/toplevel.mk b/builds/toplevel.mk index fe1af48f1..f05ca0dad 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -34,7 +34,7 @@ # details on host platform detection and library builds. -.PHONY: setup distclean +.PHONY: all setup distclean modules # The `space' variable is used to avoid trailing spaces in defining the # `T' variable later. @@ -71,6 +71,8 @@ endif # ifdef check_platform + # This is the first rule `make' sees. + # all: setup ifdef USE_MODULES @@ -92,7 +94,8 @@ ifdef check_platform # This rule makes sense for Unix only to remove files created by a run # of the configure script which hasn't been successful (so that no # `config.mk' has been created). It uses the built-in $(RM) command of - # GNU make. + # GNU make. Similarly, `nul' is created if e.g. `make setup win32' has + # been erroneously used. # distclean: $(RM) builds/unix/config.cache @@ -100,6 +103,7 @@ ifdef check_platform $(RM) builds/unix/config.status $(RM) builds/unix/unix-def.mk $(RM) builds/unix/unix-cc.mk + $(RM) nul # IMPORTANT: # diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk index 5c85bb4b2..903a5746a 100644 --- a/builds/unix/detect.mk +++ b/builds/unix/detect.mk @@ -12,7 +12,7 @@ # indicate that you have read the license and understand and accept it # fully. -.PHONY: devel lcc setup unix +.PHONY: setup ifeq ($(PLATFORM),ansi) @@ -20,52 +20,59 @@ ifeq ($(PLATFORM),ansi) ifneq ($(has_init),) PLATFORM := unix - COPY := cp - DELETE := rm -f + endif # test has_init +endif # test PLATFORM ansi - # If `devel' is the requested target, we use a special configuration - # file named `unix-dev.mk'. It disables optimization and libtool. +ifeq ($(PLATFORM),unix) + COPY := cp + DELETE := rm -f + + # If `devel' is the requested target, we use a special configuration + # file named `unix-dev.mk'. It disables optimization and libtool. + # + ifneq ($(findstring devel,$(MAKECMDGOALS)),) + CONFIG_FILE := unix-dev.mk + CC := gcc + devel: setup + .PHONY: devel + else + + # If `lcc' is the requested target, we use a special configuration + # file named `unix-lcc.mk'. It disables libtool for LCC. # - ifneq ($(findstring devel,$(MAKECMDGOALS)),) - CONFIG_FILE := unix-dev.mk - CC := gcc - devel: setup + ifneq ($(findstring lcc,$(MAKECMDGOALS)),) + CONFIG_FILE := unix-lcc.mk + CC := lcc + lcc: setup + .PHONY: lcc else - # If `lccl' is the requested target, we use a special configuration - # file named `unix-lcc.mk'. It disables libtool for LCC + # If a Unix platform is detected, the configure script is called and + # `unix-def.mk' together with `unix-cc.mk' is created. # - ifneq ($(findstring lcc,$(MAKECMDGOALS)),) - CONFIG_FILE := unix-lcc.mk - CC := lcc - lcc: setup - else - # If a Unix platform is detected, the configure script is called and - # `unix-def.mk' together with `unix-cc.mk' is created. - # - # Arguments to `configure' should be in the CFG variable. Example: - # - # make CFG="--prefix=/usr --disable-static" - # - # If you need to set CFLAGS or LDFLAGS, do it here also. - # - # Feel free to add support for other platform specific compilers in - # this directory (e.g. solaris.mk + changes here to detect the - # platform). - # - CONFIG_FILE := unix.mk - setup: unix-def.mk - unix: setup - endif + # Arguments to `configure' should be in the CFG variable. Example: + # + # make CFG="--prefix=/usr --disable-static" + # + # If you need to set CFLAGS or LDFLAGS, do it here also. + # + # Feel free to add support for other platform specific compilers in + # this directory (e.g. solaris.mk + changes here to detect the + # platform). + # + CONFIG_FILE := unix.mk + setup: unix-def.mk + unix: setup + .PHONY: unix endif + endif - setup: std_setup + setup: std_setup - unix-def.mk: $(TOP)/builds/unix/unix-def.in - cd builds/unix; ./configure $(CFG) + unix-def.mk: $(TOP)/builds/unix/unix-def.in + cd builds/unix; ./configure $(CFG) - endif # test Unix -endif # test PLATFORM +endif # test PLATFORM unix # EOF diff --git a/builds/unix/install.mk b/builds/unix/install.mk index 16403f643..840f39ce6 100644 --- a/builds/unix/install.mk +++ b/builds/unix/install.mk @@ -13,6 +13,8 @@ # fully. +.PHONY: install uninstall + # Unix installation and deinstallation targets. install: $(PROJECT_LIBRARY) $(MKINSTALLDIRS) $(libdir) \ @@ -52,6 +54,8 @@ uninstall: -$(DELETE) $(bindir)/freetype-config +.PHONY: clean_project_unix distclean_project_unix + # Unix cleaning and distclean rules. # clean_project_unix: diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk index 027f3c96b..5488d7baa 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -18,6 +18,8 @@ include $(TOP)/builds/unix/unix-cc.mk ifdef BUILD_PROJECT + .PHONY: clean_project distclean_project + # Now include the main sub-makefile. It contains all the rules used to # build the library with the previous variables defined. # diff --git a/builds/win32/detect.mk b/builds/win32/detect.mk index 055de0243..5604cec66 100644 --- a/builds/win32/detect.mk +++ b/builds/win32/detect.mk @@ -13,6 +13,9 @@ # fully. +.PHONY: setup + + ifeq ($(PLATFORM),ansi) # Detecting Windows NT is easy, as the OS variable must be defined and @@ -21,134 +24,124 @@ ifeq ($(PLATFORM),ansi) # ifeq ($(OS),Windows_NT) - # Check if we are running on a CygWin system by checking the OSTYPE - # variable. - ifneq ($(OSTYPE),cygwin) - is_windows := 1 - endif + is_windows := 1 - # We test for the COMSPEC environment variable, then run the `ver' - # command-line program to see if its output contains the word `Windows'. - # - # If this is true, we are running a win32 platform (or an emulation). - # + # We test for the COMSPEC environment variable, then run the `ver' + # command-line program to see if its output contains the word `Windows'. + # + # If this is true, we are running a win32 platform (or an emulation). + # else - ifneq ($(OSTYPE),cygwin) - ifdef COMSPEC - is_windows := $(findstring Windows,$(strip $(shell ver))) - endif - endif # test CygWin + ifdef COMSPEC + is_windows := $(findstring Windows,$(strip $(shell ver))) + endif endif # test NT ifdef is_windows - PLATFORM := win32 - DELETE := del - COPY := copy - CONFIG_FILE := none + PLATFORM := win32 - ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target + endif +endif # test PLATFORM ansi - .PHONY: dump_target_list setup list - - dump_target_list: - @echo ˙ - @echo $(PROJECT_TITLE) build system -- supported compilers - @echo ˙ - @echo Several command-line compilers are supported on Win32: - @echo ˙ - @echo ˙˙make setup˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙gcc (with Mingw) - @echo ˙˙make setup visualc˙˙˙˙˙˙˙˙˙˙˙˙˙Microsoft Visual C++ - @echo ˙˙make setup bcc32˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Borland C/C++ - @echo ˙˙make setup lcc˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Win32-LCC - @echo ˙˙make setup intelc˙˙˙˙˙˙˙˙˙˙˙˙˙˙Intel C/C++ - @echo ˙ +ifeq ($(PLATFORM),win32) - setup: dump_target_list - - else # test "list" + DELETE := del + COPY := copy - # gcc Makefile by default - CONFIG_FILE := w32-gcc.mk - SEP := / - ifeq ($(firstword $(CC)),cc) - CC := gcc - endif - - # additionally, we provide hooks for various other compilers - # - ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++ - CONFIG_FILE := w32-vcc.mk - SEP := $(BACKSLASH) - CC := cl - visualc: setup - endif - - ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++ - CONFIG_FILE := w32-bcc.mk - SEP := $(BACKSLASH) - CC := bcc32 - bcc32: setup - endif - - ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32 - CONFIG_FILE := w32-lcc.mk - SEP := $(BACKSLASH) - CC := lcc - lcc: setup - endif - - ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++ - CONFIG_FILE := w32-intl.mk - SEP := $(BACKSLASH) - CC := icl - intelc: setup - endif + # gcc Makefile by default + CONFIG_FILE := w32-gcc.mk + SEP := / + ifeq ($(firstword $(CC)),cc) + CC := gcc + endif - # - # The following build targets are not officially supported for now - # + ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target + dump_target_list: + @echo ˙ + @echo $(PROJECT_TITLE) build system -- supported compilers + @echo ˙ + @echo Several command-line compilers are supported on Win32: + @echo ˙ + @echo ˙˙make setup˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙gcc (with Mingw) + @echo ˙˙make setup visualc˙˙˙˙˙˙˙˙˙˙˙˙˙Microsoft Visual C++ + @echo ˙˙make setup bcc32˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Borland C/C++ + @echo ˙˙make setup lcc˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Win32-LCC + @echo ˙˙make setup intelc˙˙˙˙˙˙˙˙˙˙˙˙˙˙Intel C/C++ + @echo ˙ - ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ - CONFIG_FILE := w32-icc.mk - SEP := $(BACKSLASH) - CC := icc - visualage: setup - endif - - ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ - CONFIG_FILE := w32-wat.mk - SEP := $(BACKSLASH) - CC := wcc386 - watcom: setup - endif - - ifneq ($(findstring cygwin,$(MAKECMDGOALS)),) # Cygwin - CONFIG_FILE := w32-cygw.mk - SEP := $(BACKSLASH) - CC := gcc - cygwin: setup - endif - - ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target - CONFIG_FILE := w32-bccd.mk - CC := bcc32 - SEP := / - devel: setup - endif - - ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target - CONFIG_FILE := w32-dev.mk - CC := gcc - SEP := / - devel: setup - endif + setup: dump_target_list + .PHONY: dump_target_list list + else + setup: dos_setup + endif - setup: dos_setup + # additionally, we provide hooks for various other compilers + # + ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++ + CONFIG_FILE := w32-vcc.mk + SEP := $(BACKSLASH) + CC := cl + visualc: setup + .PHONY: visualc + endif - endif # test "list" + ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ + CONFIG_FILE := w32-wat.mk + SEP := $(BACKSLASH) + CC := wcc386 + watcom: setup + .PHONY: watcom + endif - endif # test is_windows -endif # test PLATFORM + ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ + CONFIG_FILE := w32-icc.mk + SEP := $(BACKSLASH) + CC := icc + visualage: setup + .PHONY: visualage + endif + + ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32 + CONFIG_FILE := w32-lcc.mk + SEP := $(BACKSLASH) + CC := lcc + lcc: setup + .PHONY: lcc + endif + + ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32 + CONFIG_FILE := w32-mingw32.mk + SEP := $(BACKSLASH) + CC := gcc + mingw32: setup + .PHONY: mingw32 + endif + + ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++ + CONFIG_FILE := w32-bcc.mk + SEP := $(BACKSLASH) + CC := bcc32 + bcc32: setup + .PHONY: bcc32 + endif + + ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target + CONFIG_FILE := w32-bccd.mk + CC := bcc32 + SEP := / + devel-bcc: setup + .PHONY: devel-bcc + endif + + ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target + CONFIG_FILE := w32-dev.mk + CC := gcc + SEP := / + devel-gcc: setup + .PHONY: devel-gcc + endif + +endif # test PLATFORM win32 # EOF diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index f90a698f1..d06bb28ea 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1700,10 +1700,10 @@ 0 }; - TBand bands[40], *band; - int n, num_bands; - TPos min, max, max_y; - FT_BBox* clip; + TBand bands[40], *band; + int n, num_bands; + TPos min, max, max_y; + FT_BBox* clip; /* Set up state in the raster object */ @@ -1857,7 +1857,7 @@ return ErrRaster_Invalid_Mode; /* compute clipping box */ - if ( (params->flags & ft_raster_flag_direct) == 0 ) + if ( ( params->flags & ft_raster_flag_direct ) == 0 ) { /* compute clip box from target pixmap */ ras.clip_box.xMin = 0;