view buildsys/nmake/prolog.nmake @ 663:127b569978cc default tip

- another tweak handling clang trying to be too smart (see last commit)
author Tassilo Philipp
date Sun, 24 Mar 2024 13:52:44 +0100
parents ed19b429a152
children
line wrap: on
line source

#//////////////////////////////////////////////////////////////////////////////
#
# Copyright (c) 2007,2009      Daniel Adler <dadler@uni-goettingen.de>, 
#               2007,2009,2022 Tassilo Philipp <tphilipp@potion-studios.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#//////////////////////////////////////////////////////////////////////////////

#///////////////////////////////////////////////////
#
#	nmake rules
#	prolog.nmake
#
#///////////////////////////////////////////////////


.SILENT:

# Default "build all" target.
all: configure build


# Check if library has been 'configured' properly. If not, tell the user and abort.
!IF !DEFINED(CONFIG_OS) || !DEFINED(CONFIG_ARCH)
configure: $(TOP)\Makefile.config
$(TOP)\Makefile.config:
	echo "Library not configured properly! Run configure.bat from the library's root directory first!"
!ELSE
configure:
!ENDIF


# Include config rules.
!IF EXISTS($(TOP)\Makefile.config)
!  INCLUDE $(TOP)\Makefile.config
!ENDIF


# set BUILD_* from CONFIG_* variables
!IF !DEFINED(BUILD_HOST)
BUILD_HOST = $(CONFIG_HOST)
!ENDIF
!IF !DEFINED(BUILD_OS)
BUILD_OS = $(CONFIG_OS)
!ENDIF
!IF !DEFINED(BUILD_ARCH)
BUILD_ARCH = $(CONFIG_ARCH)
!ENDIF
!IF !DEFINED(BUILD_TOOL)
BUILD_TOOL = $(CONFIG_TOOL)
!ENDIF
!IF !DEFINED(BUILD_ASM)
BUILD_ASM = $(CONFIG_ASM)
!ENDIF

!IF "$(BUILD_TOOL)" != ""
!  INCLUDE tool_$(BUILD_TOOL).nmake
!ENDIF