jdk/make/tools/freetypecheck/Makefile
changeset 3640 fd536f8d24a6
parent 715 f16baef3a20e
child 5506 202f599c92aa
equal deleted inserted replaced
3639:fbc385f763cd 3640:fd536f8d24a6
    26 
    26 
    27 BUILDDIR = ../..
    27 BUILDDIR = ../..
    28 include $(BUILDDIR)/common/Defs.gmk
    28 include $(BUILDDIR)/common/Defs.gmk
    29 
    29 
    30 # Default name
    30 # Default name
    31 FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX)
    31 PROGRAM = freetype_versioncheck
       
    32 FT_OBJ = $(BUILDTOOLBINDIR)/$(PROGRAM).$(OBJECT_SUFFIX)
       
    33 FT_TEST = $(BUILDTOOLBINDIR)/$(PROGRAM)$(EXE_SUFFIX)
    32 
    34 
    33 # Used on openjdk only
    35 # Used on openjdk only
    34 ifeq ($(OPENJDK),true)
    36 ifeq ($(OPENJDK),true)
    35 
    37 
    36 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
    38 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
    37 ifeq ($(PLATFORM), windows)
    39 ifeq ($(PLATFORM), windows)
    38   FT_OPTIONS  = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR)
    40   FT_OPTIONS  = /nologo /c
    39   FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
    41   FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
    40   FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
    42   FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
       
    43 ifdef MT
       
    44   FT_LD_OPTIONS += /manifest
       
    45 endif
    41 else
    46 else
    42   FT_OPTIONS  = $(CFLAGS)
    47   FT_OPTIONS  = $(CFLAGS)
    43   FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
    48   FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
    44   # Add runtime lib search path to ensure test will be runnable
    49   # Add runtime lib search path to ensure test will be runnable
    45   ifeq ($(PLATFORM), solaris)
    50   ifeq ($(PLATFORM), solaris)
    53 FT_OPTIONS += -DREQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
    58 FT_OPTIONS += -DREQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
    54 FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
    59 FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
    55 
    60 
    56 # Create test program
    61 # Create test program
    57 all: $(FT_TEST)
    62 all: $(FT_TEST)
    58 	@$(FT_TEST)
    63 	$(FT_TEST)
    59 
    64 
    60 # On windows we need to copy dll to test dir to ensure it will be found
    65 # On windows we need to copy dll to test dir to ensure it will be found
    61 #   at runtime
    66 #   at runtime
    62 $(FT_TEST): freetypecheck.c
    67 $(FT_TEST): freetypecheck.c
    63 	@$(prep-target)
    68 	$(prep-target)
       
    69 ifeq ($(PLATFORM), windows)
       
    70 	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
       
    71 	$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
       
    72 	$(CP) $(FREETYPE_DLL) $(@D)/
       
    73 ifdef MT
       
    74 	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
       
    75 	$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
       
    76 endif
       
    77 else
    64 	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
    78 	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
    65 ifeq ($(PLATFORM), windows)
       
    66 	@$(CP) $(FREETYPE_DLL) `dirname $@`
       
    67 endif
    79 endif
    68 
    80 
    69 else
    81 else
    70 
    82 
    71 # Inform user this is openjdk only
    83 # Inform user this is openjdk only