Merge 25584, 25588.
[reactos.git] / reactos / dll / 3rdparty / freetype / builds / unix / detect.mk
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 $(CFG)
83 else
84 cd builds/unix; ./configure $(CFG)
85 endif
86 endif
87
88 endif # test PLATFORM unix
89
90
91 # EOF