Initial commit
This commit is contained in:
22
BuildConfig/Darwin-Libs.rules
Normal file
22
BuildConfig/Darwin-Libs.rules
Normal file
@@ -0,0 +1,22 @@
|
||||
# BuildConfig/POSIX-Libs.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 3/19/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Defines common libraries required for linking on POSIX platforms
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# Base libraries (console)
|
||||
export ZENGINE_BASE_LIBS = -lpthread -lm
|
||||
|
||||
# GUI libraries (X Windows)
|
||||
export ZENGINE_GUI_LIBS = -lGL -lX11
|
||||
|
||||
48
BuildConfig/DetectCompiler.rules
Normal file
48
BuildConfig/DetectCompiler.rules
Normal file
@@ -0,0 +1,48 @@
|
||||
# BuildConfig/DetectCompiler.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/3/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Check for common compilers and sets flags for them
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# =================
|
||||
# Detect "gcc"
|
||||
# =================
|
||||
CC := $(shell which $(CC))
|
||||
|
||||
#Check if $CC filename has "gcc" in it, but don't be fooled if path has "gcc"
|
||||
ifeq ($(findstring gcc,$(notdir $(realpath $(CC)))),gcc)
|
||||
IS_GCC := 1
|
||||
else
|
||||
IS_GCC := 0
|
||||
endif
|
||||
|
||||
# =================
|
||||
# Detect "icc"
|
||||
# =================
|
||||
#Check if $CC filename has "icc" in it, but don't be fooled if path has "icc"
|
||||
ifeq ($(findstring icc,$(notdir $(realpath $(CC)))),icc)
|
||||
IS_ICC := 1
|
||||
else
|
||||
IS_ICC := 0
|
||||
endif
|
||||
|
||||
# =================
|
||||
# Detect plain "cc"
|
||||
# =================
|
||||
#Check if $CC filename /is/ "cc", but don't be fooled if path has "cc"
|
||||
ifeq ($(notdir $(realpath $(CC))),cc)
|
||||
IS_CC := 1
|
||||
else
|
||||
IS_CC := 0
|
||||
endif
|
||||
|
||||
36
BuildConfig/DetectLibs.rules
Normal file
36
BuildConfig/DetectLibs.rules
Normal file
@@ -0,0 +1,36 @@
|
||||
# BuildConfig/DetectLibs.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/24/2014
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Detects presence of libraries
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# There is no reason for us to do this here - the reason being is that automatic detection with no alternative is simply a waste of time.
|
||||
# It's better to have individual makefiles that you include for system stacks. Compiler detection and bifurcation is really solid - the auto
|
||||
# detection is best left to full fledged build tools - since that's literally what auto-tools does.
|
||||
#
|
||||
# Use this file as as temp file
|
||||
TEMPFILE := $(shell mktemp 2>/dev/null || mktemp -t 'mytmpdir')
|
||||
|
||||
#Detect a library, called as: $(call detectLib,file.h,HAVE_FILE_H)
|
||||
detectLib = $(shell echo "\#include $(1)" > $(TEMPFILE); $(CC) -E $(TEMPFILE) >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo "-D$(2)"; else echo ""; fi)
|
||||
|
||||
DETECTED_LIBS :=
|
||||
DETECTED_LIBS += $(call detectLib,<X11/Xlib.h>,HAVE_XLIB)
|
||||
DETECTED_LIBS += $(call detectLib,<X11/extensions/XInput2.h>,HAVE_XINPUT2)
|
||||
DETECTED_LIBS += $(call detectLib,<wayland-client.h>,HAVE_WAYLAND)
|
||||
DETECTED_LIBS += $(call detectLib,<EGL/egl.h>,HAVE_EGL)
|
||||
|
||||
FORCE_REMOVE := $(shell rm $(TEMPFILE))
|
||||
|
||||
OS_CXXFLAGS += $(DETECTED_LIBS)
|
||||
OS_CFLAGS += $(DETECTED_LIBS)
|
||||
84
BuildConfig/DetectPlatform.rules
Normal file
84
BuildConfig/DetectPlatform.rules
Normal file
@@ -0,0 +1,84 @@
|
||||
# BuildConfig/DetectPlatform.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 11/15/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# OS/architecture detection rules. Requires GNU Make
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# Allow user overrides of $OS and $ARCH
|
||||
|
||||
#==============================
|
||||
# Detect operating system
|
||||
#==============================
|
||||
ifeq ($(OS),)
|
||||
OS := $(shell uname)
|
||||
ifeq ($(OS),SunOS)
|
||||
OS := Solaris
|
||||
endif
|
||||
ifeq ($(findstring Windows,$(OS)),Windows) # *Windows* -> Windows
|
||||
OS := Windows
|
||||
endif
|
||||
|
||||
ifeq ($(findstring MINGW,$(OS)),MINGW) # *MINGW* -> Windows
|
||||
OS := Windows
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect when the Win32 environment variable "Windows_NT" is set and normalize it
|
||||
ifeq ($(OS),Windows_NT)
|
||||
OS := Windows
|
||||
endif
|
||||
|
||||
#==============================
|
||||
# Detect processor arch
|
||||
# =============================
|
||||
ifeq ($(ARCH),)
|
||||
ifeq ($(OS),Solaris) #Solaris likes "-p" instead of "-m"
|
||||
ARCH := $(shell uname -p)
|
||||
else
|
||||
ARCH := $(shell uname -m)
|
||||
endif
|
||||
|
||||
#Replace "i<x>86" with "x86", where <x> can be [x, digit]
|
||||
ARCH := $(shell echo $(ARCH) | sed s/i[x0-9]86/x86/)
|
||||
|
||||
#Replace "powerpc" with "ppc"
|
||||
ARCH := $(shell echo $(ARCH) | sed s/powerpc/ppc/)
|
||||
|
||||
ifeq ($(ARCH),sparc64) #Linux on UltraSPARC gives sparc64 when running 64-bit kernel
|
||||
ARCH := sparc
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),mips64) #Linux/mips64 kernel, but probably don't want 64-bit app
|
||||
ARCH := mips
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),amd64) # "amd64" -> "x86-64"
|
||||
ARCH := x86-64
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64) # "x86_64" -> "x86-64"
|
||||
ARCH := x86-64
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),armv6l) # "armv6l" -> "arm"
|
||||
ARCH := arm
|
||||
SUBARCH := armv6
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),armv7l) # "armv7l" -> "arm
|
||||
ARCH := arm
|
||||
SUBARCH := armv7
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
44
BuildConfig/DetectWinSys.rules
Normal file
44
BuildConfig/DetectWinSys.rules
Normal file
@@ -0,0 +1,44 @@
|
||||
# BuildConfig/DetectWinSys.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 1/18/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Windowing system detection
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# This detects a default windowing system (WINSYS) based upon OS. The
|
||||
# user may override it by setting $WINSYS ahead of time, in which case
|
||||
# these rules act as a no-op
|
||||
|
||||
ifeq ($(WINSYS),)
|
||||
|
||||
#Windows uses...Win32 APIs
|
||||
ifeq ($(OS),Windows)
|
||||
WINSYS := Win32
|
||||
endif
|
||||
|
||||
#MacOS X uses...MacOS X APIs
|
||||
ifeq ($(OS),Darwin)
|
||||
WINSYS := MacOSX
|
||||
endif
|
||||
|
||||
#Android uses...Android APIs
|
||||
ifeq ($(OS),Android)
|
||||
WINSYS := Android
|
||||
endif
|
||||
|
||||
#No specific rules, so default to Xlib
|
||||
ifeq ($(WINSYS),)
|
||||
WINSYS := Xlib
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
20
BuildConfig/GCC-Flags.rules
Normal file
20
BuildConfig/GCC-Flags.rules
Normal file
@@ -0,0 +1,20 @@
|
||||
# BuildConfig/GCC-Flags.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 1/11/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Common flags for GNU "gcc" to reduce redundancy
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
GCC_COMMON := -fstrict-aliasing -Wall -Wextra
|
||||
|
||||
OS_CFLAGS += $(GCC_COMMON)
|
||||
OS_CXXFLAGS += $(GCC_COMMON)
|
||||
30
BuildConfig/Makefile.Android.arm
Normal file
30
BuildConfig/Makefile.Android.arm
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Android.arm
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 1/16/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Android running on 32-bit ARMv6+ architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# TODO: anything required here?
|
||||
OS_CXXFLAGS := -D_UNIX=1
|
||||
OS_CFLAGS := -D_UNIX=1
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM ?= as
|
||||
RANLIB ?= ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS :=
|
||||
30
BuildConfig/Makefile.Darwin.x86
Normal file
30
BuildConfig/Makefile.Darwin.x86
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Darwin.x86
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/28/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Mac OS running on 32-bit x86 architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC
|
||||
OS_CXXFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/Darwin-Libs.rules
|
||||
|
||||
ASM := yasm -f macho32 -m x86
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
30
BuildConfig/Makefile.Darwin.x86-64
Normal file
30
BuildConfig/Makefile.Darwin.x86-64
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Darwin.x86-64
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 11/15/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Mac OS running on 64-bit x86 architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC
|
||||
OS_CXXFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/Darwin-Libs.rules
|
||||
|
||||
ASM := yasm -f macho64 -m amd64
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
30
BuildConfig/Makefile.Linux.arm
Normal file
30
BuildConfig/Makefile.Linux.arm
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Linux.arm
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 6/21/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on 32-bit ARMv6+ architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC on Linux
|
||||
OS_CXXFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM ?= as
|
||||
RANLIB ?= ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
32
BuildConfig/Makefile.Linux.ia64
Normal file
32
BuildConfig/Makefile.Linux.ia64
Normal file
@@ -0,0 +1,32 @@
|
||||
# BuildConfig/Makefile.Linux.ia64
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/16/20112
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on Itanium architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC on Linux
|
||||
OS_CXXFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := as -mtune=itanium2
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
|
||||
|
||||
30
BuildConfig/Makefile.Linux.mips
Normal file
30
BuildConfig/Makefile.Linux.mips
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Linux.mips
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 6/28/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on 32-bit MIPS architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC on Linux
|
||||
OS_CXXFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM ?= as -mips32
|
||||
RANLIB ?= ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
30
BuildConfig/Makefile.Linux.mips64
Normal file
30
BuildConfig/Makefile.Linux.mips64
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Linux.mips
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 6/28/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on 64-bit MIPS architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC on Linux
|
||||
OS_CXXFLAGS := -mabi=64 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -mabi=64 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM ?= as -mips64 -mabi=64
|
||||
RANLIB ?= ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -mabi=64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
33
BuildConfig/Makefile.Linux.ppc
Normal file
33
BuildConfig/Makefile.Linux.ppc
Normal file
@@ -0,0 +1,33 @@
|
||||
# BuildConfig/Makefile.Linux.ppc
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 7/20/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on Power Arch. processors, 32-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# Assume GCC here
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
# Linux uses POSIX-like libraries
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := as -mregnames
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# Flags for linker: 32-bit binary, and use "/usr/local/lib" in the path
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
|
||||
33
BuildConfig/Makefile.Linux.sparc
Normal file
33
BuildConfig/Makefile.Linux.sparc
Normal file
@@ -0,0 +1,33 @@
|
||||
# BuildConfig/Makefile.Linux.sparc
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 11/15/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on SPARCv9 processors, 32-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# Assume GCC here
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
# Linux uses POSIX-like libraries
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := as -xarch=v8plusa
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# Flags for linker: 32-bit binary, and use "/usr/local/lib" in the path
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
|
||||
33
BuildConfig/Makefile.Linux.sparc64
Normal file
33
BuildConfig/Makefile.Linux.sparc64
Normal file
@@ -0,0 +1,33 @@
|
||||
# BuildConfig/Makefile.Linux.sparc64
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 7/9/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on SPARCv9 processors, 64-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# Assume GCC here
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
# Linux uses POSIX-like libraries
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := as -xarch=v9a
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# Flags for linker: 64-bit binary, and use "/usr/local/lib64" in the path
|
||||
OS_LDFLAGS := -m64 -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64
|
||||
|
||||
30
BuildConfig/Makefile.Linux.x86
Normal file
30
BuildConfig/Makefile.Linux.x86
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Linux.x86
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/28/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on 32-bit x86 architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
# NOTE: This pretty much assumes GCC on Linux
|
||||
OS_CXXFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := yasm -f elf32 -m x86
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
30
BuildConfig/Makefile.Linux.x86-64
Normal file
30
BuildConfig/Makefile.Linux.x86-64
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/Makefile.Linux.x86-64
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 7/25/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Linux running on 64-bit x86 architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -m64 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
include BuildConfig/POSIX-Libs.rules
|
||||
|
||||
ASM := yasm -f elf64 -m amd64
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := POSIX
|
||||
|
||||
CWD = $(shell pwd)
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m64 -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64
|
||||
56
BuildConfig/Makefile.Solaris.sparc
Normal file
56
BuildConfig/Makefile.Solaris.sparc
Normal file
@@ -0,0 +1,56 @@
|
||||
# BuildConfig/Makefile.Solaris.sparc
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/15/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Solaris 10 running on SPARCv9 processors, 32-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -D_POSIX_PTHREAD_SEMANTICS -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_POSIX_PTHREAD_SEMANTICS -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-R,/usr/local/lib
|
||||
|
||||
ASM := /usr/ccs/bin/as -xarch=v8plusa
|
||||
RANLIB := /usr/ccs/bin/ranlib
|
||||
AR := /usr/ccs/bin/ar
|
||||
SUBSYSTEM := Solaris
|
||||
|
||||
#Default $CC to Sun "cc"
|
||||
ifeq ($(origin CC),default)
|
||||
CC := cc
|
||||
endif
|
||||
|
||||
#Default $CXX to Sun "CC"
|
||||
ifeq ($(origin CXX),default)
|
||||
CXX := CC
|
||||
endif
|
||||
|
||||
include BuildConfig/DetectCompiler.rules
|
||||
include BuildConfig/Solaris-Libs.rules
|
||||
|
||||
ifeq ($(IS_GCC),1)
|
||||
CXX := g++ #Use matching GNU g++
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
#These are gcc + sparc specific
|
||||
OS_CFLAGS += -mcpu=ultrasparc -mvis -threads
|
||||
OS_CXXFLAGS += -mcpu=ultrasparc -mvis -threads
|
||||
else ifeq ($(IS_CC),1)
|
||||
CXX := CC #Use matching Sun C++
|
||||
include BuildConfig/SunPro-Flags.rules
|
||||
|
||||
#These are SunPro + sparc specific
|
||||
OS_CFLAGS += -xvis=yes -xarch=sparcvis
|
||||
OS_CXXFLAGS += -xvis=yes -xarch=sparcvis
|
||||
endif
|
||||
56
BuildConfig/Makefile.Solaris.sparc64
Normal file
56
BuildConfig/Makefile.Solaris.sparc64
Normal file
@@ -0,0 +1,56 @@
|
||||
# BuildConfig/Makefile.Solaris.sparc64
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/3/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Solaris 10 running on SPARCv9 processors, 64-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -D_POSIX_PTHREAD_SEMANTICS -m64 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_POSIX_PTHREAD_SEMANTICS -m64 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m64 -L/usr/local/lib/sparcv9 -Wl,-R,/usr/local/lib/sparcv9
|
||||
|
||||
ASM := /usr/ccs/bin/as -xarch=v9a
|
||||
RANLIB := /usr/ccs/bin/ranlib
|
||||
AR := /usr/ccs/bin/ar
|
||||
SUBSYSTEM := Solaris
|
||||
|
||||
#Default $CC to Sun "cc"
|
||||
ifeq ($(origin CC),default)
|
||||
CC := cc
|
||||
endif
|
||||
|
||||
#Default $CXX to Sun "CC"
|
||||
ifeq ($(origin CXX),default)
|
||||
CXX := CC
|
||||
endif
|
||||
|
||||
include BuildConfig/DetectCompiler.rules
|
||||
include BuildConfig/Solaris-Libs.rules
|
||||
|
||||
ifeq ($(IS_GCC),1)
|
||||
CXX := g++ #Use matching GNU g++
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
#These are gcc + sparc specific
|
||||
OS_CFLAGS += -mcpu=ultrasparc -mvis -threads
|
||||
OS_CXXFLAGS += -mcpu=ultrasparc -mvis -threads
|
||||
else ifeq ($(IS_CC),1)
|
||||
CXX := CC #Use matching Sun C++
|
||||
include BuildConfig/SunPro-Flags.rules
|
||||
|
||||
#These are SunPro + sparc64 specific
|
||||
OS_CFLAGS += -xvis=yes -xarch=sparcvis
|
||||
OS_CXXFLAGS += -xvis=yes -xarch=sparcvis
|
||||
endif
|
||||
52
BuildConfig/Makefile.Solaris.x86
Normal file
52
BuildConfig/Makefile.Solaris.x86
Normal file
@@ -0,0 +1,52 @@
|
||||
# BuildConfig/Makefile.Solaris.x86
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 12/15/2011
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Solaris 10 running on x86 processors, 32-bit binary
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -D_POSIX_PTHREAD_SEMANTICS=1 -m32 -D_UNIX=1 -I/usr/local/include
|
||||
OS_CFLAGS := -D_POSIX_PTHREAD_SEMANTICS=1 -m32 -D_UNIX=1 -I/usr/local/include
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-R,/usr/local/lib
|
||||
|
||||
ASM := yasm -f elf32
|
||||
RANLIB := /usr/ccs/bin/ranlib
|
||||
AR := /usr/ccs/bin/ar
|
||||
SUBSYSTEM := Solaris
|
||||
|
||||
#Default $CC to Sun "cc"
|
||||
ifeq ($(origin CC),default)
|
||||
CC := cc
|
||||
endif
|
||||
|
||||
#Default $CXX to Sun "CC"
|
||||
ifeq ($(origin CXX),default)
|
||||
CXX := CC
|
||||
endif
|
||||
|
||||
include BuildConfig/DetectCompiler.rules
|
||||
include BuildConfig/Solaris-Libs.rules
|
||||
|
||||
ifeq ($(IS_GCC),1)
|
||||
CXX := g++ #Use matching GNU g++
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
#These are gcc + Solaris specific
|
||||
OS_CFLAGS += -threads
|
||||
OS_CXXFLAGS += -threads
|
||||
else ifeq ($(IS_CC),1)
|
||||
CXX := CC #Use matching Sun C++
|
||||
include BuildConfig/SunPro-Flags.rules
|
||||
endif
|
||||
28
BuildConfig/Makefile.Windows.x86
Normal file
28
BuildConfig/Makefile.Windows.x86
Normal file
@@ -0,0 +1,28 @@
|
||||
# BuildConfig/Makefile.Windows.x86
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 11/09/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Makefile for Windows running on 32-bit x86 architecture processors
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# All C/C++ compiler flags required by this OS platform
|
||||
OS_CXXFLAGS := -m32 -D_WINDOWS=1
|
||||
OS_CFLAGS := -m32 -D_WINDOWS=1
|
||||
|
||||
include BuildConfig/GCC-Flags.rules
|
||||
|
||||
ASM := yasm -f win32 -m x86
|
||||
RANLIB := ranlib
|
||||
SUBSYSTEM := Win32
|
||||
|
||||
# All flags/libraries the linker will need
|
||||
OS_LDFLAGS := -m32 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
|
||||
22
BuildConfig/POSIX-Libs.rules
Normal file
22
BuildConfig/POSIX-Libs.rules
Normal file
@@ -0,0 +1,22 @@
|
||||
# BuildConfig/POSIX-Libs.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 3/19/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Defines common libraries required for linking on POSIX platforms
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# Base libraries (console)
|
||||
export ZENGINE_BASE_LIBS = -lrt -ldl -lpthread -lm
|
||||
|
||||
# GUI libraries (X Windows)
|
||||
export ZENGINE_GUI_LIBS = -lGL -lX11
|
||||
|
||||
19
BuildConfig/RaspPi-Flags.rules
Normal file
19
BuildConfig/RaspPi-Flags.rules
Normal file
@@ -0,0 +1,19 @@
|
||||
# BuildConfig/RaspPi-Flags.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 1/4/2013
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Special flags for the Raspberry Pi running on Linux
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
OS_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
|
||||
OS_LDFLAGS += -L/opt/vc/lib -lbcm_host
|
||||
|
||||
26
BuildConfig/Solaris-Libs.rules
Normal file
26
BuildConfig/Solaris-Libs.rules
Normal file
@@ -0,0 +1,26 @@
|
||||
# BuildConfig/Solaris-Libs.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/11/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Defines common libraries required for linking on Solaris 10 and later
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# The major difference between this file and POSIX-Libs.rules is that Solaris
|
||||
# uses native threads, so linking to libpthread.so just bloats the binary. Also,
|
||||
# Solaris native threads are in libc.so, so no other library is needed.
|
||||
|
||||
# Base libraries (console)
|
||||
export ZENGINE_BASE_LIBS = -lrt -lm
|
||||
|
||||
# GUI libraries (X Windows)
|
||||
export ZENGINE_GUI_LIBS = -lGL -lX11
|
||||
|
||||
30
BuildConfig/SunPro-Flags.rules
Normal file
30
BuildConfig/SunPro-Flags.rules
Normal file
@@ -0,0 +1,30 @@
|
||||
# BuildConfig/SunPro-Flags.rules
|
||||
# Author: Patrick Baggett <ptbaggett@762studios.com>
|
||||
# Created: 4/1/2012
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Common flags for Sun "cc" to reduce redundancy
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# This program is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
SUNPRO_COMMON := -mt -features=extensions
|
||||
|
||||
ifeq ($(findstring sparc,$(ARCH)),sparc)
|
||||
ISSPARC := 1
|
||||
endif
|
||||
|
||||
ifeq ($(ISSPARC),1)
|
||||
SUNPRO_COMMON += -xmemalign=8s
|
||||
endif
|
||||
|
||||
OS_CFLAGS += $(SUNPRO_COMMON) -xalias_level=std
|
||||
OS_CXXFLAGS += $(SUNPRO_COMMON) -xalias_level=simple
|
||||
OS_LDFLAGS += $(SUNPRO_COMMON)
|
||||
|
||||
Reference in New Issue
Block a user