~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/freetype/builds/unix/detect.mk

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# FreeType 2 configuration file to detect a UNIX host platform.
 
3
#
 
4
 
 
5
 
 
6
# Copyright 1996-2000, 2002, 2003, 2004, 2006 by
 
7
# David Turner, Robert Wilhelm, and Werner Lemberg.
 
8
#
 
9
# This file is part of the FreeType project, and may only be used, modified,
 
10
# and distributed under the terms of the FreeType project license,
 
11
# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
 
12
# indicate that you have read the license and understand and accept it
 
13
# fully.
 
14
 
 
15
.PHONY: setup
 
16
 
 
17
ifeq ($(PLATFORM),ansi)
 
18
 
 
19
  # Note: this test is duplicated in "builds/toplevel.mk".
 
20
  #
 
21
  is_unix := $(strip $(wildcard /sbin/init) \
 
22
                     $(wildcard /usr/sbin/init) \
 
23
                     $(wildcard /hurd/auth))
 
24
  ifneq ($(is_unix),)
 
25
 
 
26
    PLATFORM := unix
 
27
 
 
28
  endif # test is_unix
 
29
endif # test PLATFORM ansi
 
30
 
 
31
ifeq ($(PLATFORM),unix)
 
32
  COPY   := cp
 
33
  DELETE := rm -f
 
34
  CAT    := cat
 
35
 
 
36
  # If `devel' is the requested target, we use a special configuration
 
37
  # file named `unix-dev.mk'.  It disables optimization and libtool.
 
38
  #
 
39
  ifneq ($(findstring devel,$(MAKECMDGOALS)),)
 
40
    CONFIG_FILE := unix-dev.mk
 
41
    CC          := gcc
 
42
    devel: setup
 
43
    .PHONY: devel
 
44
  else
 
45
 
 
46
    # If `lcc' is the requested target, we use a special configuration
 
47
    # file named `unix-lcc.mk'.  It disables libtool for LCC.
 
48
    #
 
49
    ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
 
50
      CONFIG_FILE := unix-lcc.mk
 
51
      CC          := lcc
 
52
      lcc: setup
 
53
      .PHONY: lcc
 
54
    else
 
55
 
 
56
      # If a Unix platform is detected, the configure script is called and
 
57
      # `unix-def.mk' together with `unix-cc.mk' is created.
 
58
      #
 
59
      # Arguments to `configure' should be in the CFG variable.  Example:
 
60
      #
 
61
      #   make CFG="--prefix=/usr --disable-static"
 
62
      #
 
63
      # If you need to set CFLAGS or LDFLAGS, do it here also.
 
64
      #
 
65
      # Feel free to add support for other platform specific compilers in
 
66
      # this directory (e.g. solaris.mk + changes here to detect the
 
67
      # platform).
 
68
      #
 
69
      CONFIG_FILE := unix.mk
 
70
      unix: setup
 
71
      must_configure := 1
 
72
      .PHONY: unix
 
73
    endif
 
74
  endif
 
75
 
 
76
  have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
 
77
 
 
78
      setup: std_setup
 
79
  ifdef must_configure
 
80
    ifneq ($(have_Makefile),)
 
81
      # we are building FT2 not in the src tree
 
82
              $(TOP_DIR)/builds/unix/configure $(value CFG)
 
83
    else
 
84
              cd builds/unix; ./configure $(value CFG)
 
85
    endif
 
86
  endif
 
87
 
 
88
endif   # test PLATFORM unix
 
89
 
 
90
 
 
91
# EOF