:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / subsys / win32k / freetype / builds / dos / detect.mk
1 #
2 # FreeType 2 configuration file to detect a DOS host platform.
3 #
4
5
6 # Copyright 1996-2000 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
16 # We test for the COMSPEC environment variable, then run the `ver'
17 # command-line program to see if its output contains the word `Dos'.
18 #
19 # If this is true, we are running a Dos-ish platform (or an emulation).
20 #
21 ifeq ($(PLATFORM),ansi)
22
23   ifdef COMSPEC
24
25     is_dos := $(findstring Dos,$(shell ver))
26
27     # We try to recognize a Dos session under OS/2.  The `ver' command
28     # returns `Operating System/2 ...' there, so `is_dos' should be empty.
29     #
30     # To recognize a Dos session under OS/2, we check COMSPEC for the
31     # substring `MDOS\COMMAND'
32     #
33     ifeq ($(is_dos),)
34       is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
35     endif
36
37     ifneq ($(is_dos),)
38
39       PLATFORM := dos
40       DELETE   := del
41       COPY     := copy
42
43       # Use DJGPP (i.e. gcc) by default.
44       #
45       CONFIG_FILE := dos-gcc.mk
46       SEP         := /
47       ifndef CC
48         CC        := gcc
49       endif
50
51       # additionally, we provide hooks for various other compilers
52       #
53       ifneq ($(findstring turboc,$(MAKECMDGOALS)),)     # Turbo C
54         CONFIG_FILE := dos-tcc.mk
55         SEP         := $(BACKSLASH)
56         CC          := tcc
57         .PHONY: turboc
58       endif
59
60       ifneq ($(findstring watcom,$(MAKECMDGOALS)),)     # Watcom C/C++
61         CONFIG_FILE := dos-wat.mk
62         SEP         := $(BACKSLASH)
63         CC          := wcc386
64         .PHONY: watcom
65       endif
66
67       ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
68         CONFIG_FILE := dos-bcc.mk
69         SEP         := $(BACKSLASH)
70         CC          := bcc
71         .PHONY: borlandc16
72       endif
73
74       ifneq ($(findstring borlandc,$(MAKECMDGOALS)),)   # Borland C/C++ 32-bit
75         CONFIG_FILE := dos-bcc.mk
76         SEP         := $(BACKSLASH)
77         CC          := bcc32
78         .PHONY: borlandc
79       endif
80
81       setup: dos_setup
82
83     endif # test Dos
84   endif   # test COMSPEC
85 endif     # test PLATFORM
86
87 # EOF