2000-07-08 02:22:20 +02:00
|
|
|
#
|
|
|
|
# FreeType 2 configuration file to detect a DOS host platform.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-01-17 20:41:43 +01:00
|
|
|
# Copyright 1996-2015 by
|
2000-07-08 02:22:20 +02:00
|
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
#
|
|
|
|
# This file is part of the FreeType project, and may only be used, modified,
|
|
|
|
# and distributed under the terms of the FreeType project license,
|
|
|
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
|
|
|
# indicate that you have read the license and understand and accept it
|
|
|
|
# fully.
|
|
|
|
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
.PHONY: setup
|
2000-11-04 02:55:49 +01:00
|
|
|
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
ifeq ($(PLATFORM),ansi)
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
# 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'
|
2003-06-13 09:38:22 +02:00
|
|
|
# command-line program to see if its output contains the word `Dos' or
|
|
|
|
# `DOS'.
|
2000-12-20 23:09:41 +01:00
|
|
|
#
|
|
|
|
# If this is true, we are running a Dos-ish platform (or an emulation).
|
|
|
|
#
|
|
|
|
ifdef DJGPP
|
|
|
|
PLATFORM := dos
|
|
|
|
else
|
|
|
|
ifdef COMSPEC
|
2003-06-13 09:38:22 +02:00
|
|
|
is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-10-03 19:51:29 +02:00
|
|
|
# We try to recognize a Dos session under OS/2. The `ver' command
|
|
|
|
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
|
|
|
|
#
|
|
|
|
# To recognize a Dos session under OS/2, we check COMSPEC for the
|
|
|
|
# substring `MDOS\COMMAND'
|
|
|
|
#
|
|
|
|
ifeq ($(is_dos),)
|
2001-04-10 15:59:58 +02:00
|
|
|
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
|
2000-10-03 19:51:29 +02:00
|
|
|
endif
|
2004-11-23 18:49:40 +01:00
|
|
|
|
|
|
|
# We also try to recognize Dos 7.x without Windows 9X launched.
|
2014-02-06 20:23:49 +01:00
|
|
|
# See builds/windows/detect.mk for explanations about the logic.
|
2004-11-23 22:38:16 +01:00
|
|
|
#
|
2004-11-23 18:49:40 +01:00
|
|
|
ifeq ($(is_dos),)
|
|
|
|
ifdef winbootdir
|
|
|
|
#ifneq ($(OS),Windows_NT)
|
2014-02-08 11:34:33 +01:00
|
|
|
# If windows is available, do not trigger this test.
|
2004-11-23 18:49:40 +01:00
|
|
|
ifndef windir
|
|
|
|
is_dos := $(findstring Windows,$(strip $(shell ver)))
|
|
|
|
endif
|
|
|
|
#endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
endif # test COMSPEC
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
ifneq ($(is_dos),)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
PLATFORM := dos
|
|
|
|
|
|
|
|
endif # test Dos
|
|
|
|
endif # test DJGPP
|
|
|
|
endif # test PLATFORM ansi
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),dos)
|
|
|
|
|
|
|
|
# Use DJGPP (i.e. gcc) by default.
|
|
|
|
#
|
|
|
|
CONFIG_FILE := dos-gcc.mk
|
2006-02-01 08:52:11 +01:00
|
|
|
CC ?= gcc
|
2000-12-20 23:09:41 +01:00
|
|
|
|
|
|
|
# additionally, we provide hooks for various other compilers
|
|
|
|
#
|
2003-06-13 09:38:22 +02:00
|
|
|
ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
|
|
|
|
CONFIG_FILE := dos-emx.mk
|
|
|
|
CC := gcc
|
|
|
|
emx: setup
|
|
|
|
.PHONY: emx
|
|
|
|
endif
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
|
|
|
|
CONFIG_FILE := dos-tcc.mk
|
|
|
|
CC := tcc
|
|
|
|
turboc: setup
|
|
|
|
.PHONY: turboc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
|
|
|
|
CONFIG_FILE := dos-wat.mk
|
|
|
|
CC := wcc386
|
|
|
|
watcom: setup
|
|
|
|
.PHONY: watcom
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
|
|
|
|
CONFIG_FILE := dos-bcc.mk
|
|
|
|
CC := bcc32
|
|
|
|
borlandc: setup
|
|
|
|
.PHONY: borlandc
|
|
|
|
endif
|
|
|
|
|
2001-12-25 21:54:33 +01:00
|
|
|
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
|
|
|
|
CONFIG_FILE := dos-bcc.mk
|
|
|
|
CC := bcc
|
|
|
|
borlandc16: setup
|
|
|
|
.PHONY: borlandc16
|
|
|
|
endif
|
|
|
|
|
2001-04-10 15:59:58 +02:00
|
|
|
ifneq ($(findstring bash,$(SHELL)),) # check for bash
|
2003-06-09 06:46:30 +02:00
|
|
|
SEP := /
|
2001-04-10 15:59:58 +02:00
|
|
|
DELETE := rm
|
|
|
|
COPY := cp
|
2006-12-09 21:01:43 +01:00
|
|
|
CAT := cat
|
2001-04-10 15:59:58 +02:00
|
|
|
setup: std_setup
|
|
|
|
else
|
2003-06-09 06:46:30 +02:00
|
|
|
SEP := $(BACKSLASH)
|
2001-04-10 15:59:58 +02:00
|
|
|
DELETE := del
|
2006-12-09 21:01:43 +01:00
|
|
|
CAT := type
|
2004-11-23 18:49:40 +01:00
|
|
|
|
2004-11-23 22:38:16 +01:00
|
|
|
# Setting COPY is a bit trickier. We can be running DJGPP on some
|
2014-02-06 20:23:49 +01:00
|
|
|
# Windows NT derivatives, like XP. See builds/windows/detect.mk for
|
2004-11-23 18:49:40 +01:00
|
|
|
# explanations why we need hacking here.
|
|
|
|
#
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
COPY := cmd.exe /c copy
|
|
|
|
else
|
|
|
|
COPY := copy
|
|
|
|
endif # test NT
|
|
|
|
|
2001-04-10 15:59:58 +02:00
|
|
|
setup: dos_setup
|
|
|
|
endif
|
2000-12-20 23:09:41 +01:00
|
|
|
|
|
|
|
endif # test PLATFORM dos
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# EOF
|