"Fossies" - the Fresh Open Source Software Archive

Member "Hoard-3.13/src/GNUmakefile" (2 Jan 2019, 11958 Bytes) of package /linux/misc/Hoard-3.13.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "GNUmakefile": 3.12_vs_3.13.

    1 # Commands to compile Hoard for various targets.
    2 # Run make (with no arguments) to see the complete target list.
    3 
    4 CPPFLAGS = -std=c++14 -O3 -DNDEBUG -ffast-math -fno-builtin-malloc -Wall -Wextra -Wshadow -Wconversion -Wuninitialized
    5 #CPPFLAGS = -std=c++14 -g -O0 -ffast-math -fno-builtin-malloc -Wall -Wextra -Wshadow -Wconversion -Wuninitialized
    6 CXX = clang++
    7 
    8 # Prefix for installations (Unix / Mac)
    9 
   10 PREFIX ?= /usr/lib
   11 
   12 # Compute platform (OS and architecture) and build accordingly.
   13 
   14 ifeq ($(OS),Windows_NT)
   15 all: Heap-Layers windows
   16 else
   17     UNAME_S := $(shell uname -s)
   18     UNAME_P := $(shell uname -p)
   19     ifeq ($(UNAME_S),SunOS)
   20       all: Heap-Layers $(UNAME_S)-sunw-$(UNAME_P)
   21       install: $(UNAME_S)-sunw-$(UNAME_P)-install
   22     else
   23       all: Heap-Layers $(UNAME_S)-gcc-$(UNAME_P)
   24       install: $(UNAME_S)-gcc-$(UNAME_P)-install
   25     endif
   26 endif
   27 
   28 help:
   29 	@echo To build Hoard, specify the desired build target:
   30 	@echo -------------------------------------------------
   31 	@echo debian
   32 	@echo freebsd
   33 	@echo Linux-gcc-arm
   34 	@echo Linux-gcc-aarch64
   35 	@echo Linux-gcc-x86
   36 	@echo Linux-gcc-x86_64
   37 	@echo Darwin-gcc-i386
   38 	@echo SunOS-sunw-sparc
   39 	@echo SunOS-sunw-i386
   40 	@echo SunOS-gcc-sparc
   41 	@echo SunOS-gcc-i386
   42 	@echo FreeBSD-gcc-amd64
   43 	@echo generic-gcc
   44 	@echo windows
   45 
   46 .PHONY: Darwin-gcc-i386 debian freebsd Linux-gcc-x86 Linux-gcc-x86-debug SunOS-sunw-sparc SunOS-sunw-i386 SunOS-gcc-sparc generic-gcc Linux-gcc-arm Linux-gcc-aarch64 Linux-gcc-x86_64 Linux-gcc-unknown windows windows-debug clean test release
   47 
   48 #
   49 # Source files
   50 #
   51 
   52 MAIN_SRC  = source/libhoard.cpp
   53 UNIX_SRC  = $(MAIN_SRC) source/unixtls.cpp
   54 SUNW_SRC  = $(UNIX_SRC) Heap-Layers/wrappers/wrapper.cpp
   55 GNU_SRC   = $(UNIX_SRC) Heap-Layers/wrappers/gnuwrapper.cpp
   56 MACOS_SRC = $(MAIN_SRC) Heap-Layers/wrappers/macwrapper.cpp source/mactls.cpp
   57 
   58 #
   59 # All dependencies.
   60 #
   61 
   62 DEPS = Heap-Layers $(MACOS_SRC) $(UNIX_SRC) source/libhoard.cpp
   63 
   64 Heap-Layers:
   65 	git clone https://github.com/emeryberger/Heap-Layers
   66 
   67 release: Heap-Layers
   68 	pushd ../.. ; tar -cf hoard-release.tar Hoard ;	gzip -f hoard-release.tar ; popd
   69 	pushd ../.. ; zip -r hoard-release.zip Hoard ; popd
   70 
   71 #
   72 # Include directories
   73 #
   74 
   75 INCLUDES = -I. -Iinclude -Iinclude/util -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers
   76 
   77 WIN_INCLUDES = /I. /Iinclude /Iinclude/util /Iinclude/hoard /Iinclude/superblocks /IHeap-Layers
   78 
   79 #
   80 # Compile commands for individual targets.
   81 #
   82 
   83 FREEBSD_COMPILE = $(CXX) -g $(CPPFLAGS) -DNDEBUG -fPIC $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -Bsymbolic -o libhoard.so -lpthread
   84 
   85 DEBIAN_COMPILE = $(CXX) -g -O3 -fPIC -DNDEBUG -I. -Iinclude -Iinclude/util -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers -D_REENTRANT=1 -shared source/libhoard.cpp source/unixtls.cpp Heap-Layers/wrappers/wrapper.cpp -Bsymbolic -o libhoard.so -lpthread -lstdc++ -ldl
   86 
   87 MACOS_COMPILE = $(CXX) -ftemplate-depth=1024 -arch x86_64 -pipe -g $(CPPFLAGS) $(INCLUDES) -D_REENTRANT=1 -compatibility_version 1 -current_version 1 -D'CUSTOM_PREFIX(x)=xx\#\#x' $(MACOS_SRC) -dynamiclib -o libhoard.dylib -ldl -lpthread 
   88 
   89 MACOS_COMPILE_DEBUG = $(CXX) -std=c++14 -D_FORTIFY_SOURCE=2 -fstack-protector -ftrapv -fno-builtin-malloc -ftemplate-depth=1024 -arch x86_64 -pipe -g -O0 -Wall $(INCLUDES) -D_REENTRANT=1 -compatibility_version 1 -current_version 1 -D'CUSTOM_PREFIX(x)=xx\#\#x' $(MACOS_SRC) -dynamiclib -o libhoard.dylib -ldl -lpthread 
   90 
   91 LINUX_GCC_ARM_COMPILE = arm-Linux-gnueabihf-g++ $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -fno-builtin-malloc -pipe -fPIC -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared   $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
   92 
   93 LINUX_GCC_AARCH64_COMPILE = aarch64-linux-gnu-g++ $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -fno-builtin-malloc -pipe -fPIC -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared   $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
   94 
   95 LINUX_GCC_x86_COMPILE = $(CXX) -m32 $(CPPFLAGS) -I/usr/include/nptl -ffast-math -g -fno-builtin-malloc -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared  $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
   96 
   97 LINUX_GCC_x86_64_COMPILE = $(CXX) $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -fno-builtin-malloc -pipe -fPIC -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared   $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
   98 
   99 LINUX_GCC_UNKNOWN_COMPILE = $(CXX) $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -fno-builtin-malloc -pipe -fPIC -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared   $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
  100 
  101 LINUX_GCC_x86_64_COMPILE_DEBUG = g++ $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -fno-builtin-malloc -pipe -fPIC $(INCLUDES) -D_REENTRANT=1 -shared $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
  102 
  103 LINUX_GCC_x86_COMPILE_STATIC = g++ $(CPPFLAGS) -g -I/usr/include/nptl -static -pipe -fno-builtin-malloc -DNDEBUG  $(INCLUDES) -D_REENTRANT=1  -c $(GNU_SRC) ; ar cr libhoard.a libhoard.o
  104 
  105 LINUX_GCC_x86_64_COMPILE_STATIC = g++ $(CPPFLAGS) -g -W -Wconversion -Wall -I/usr/include/nptl -static -pipe -fPIC -fno-builtin-malloc -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared -c $(GNU_SRC) -Bsymbolic ; ar cr libhoard.a libhoard.o
  106 
  107 LINUX_GCC_x86_COMPILE_DEBUG = g++ -m32 $(CPPFLAGS) -fPIC -fno-inline -I/usr/include/nptl -fno-builtin-malloc -g -pipe $(INCLUDES) -D_REENTRANT=1  -shared $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
  108 
  109 FREEBSD_GCC_AMD64_COMPILE = g++ -std=c++14 -g -O3 -fPIC -DNDEBUG -I. -Iinclude -Iinclude/util -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers -D_REENTRANT=1 -shared source/libhoard.cpp source/unixtls.cpp Heap-Layers/wrappers/wrapper.cpp -Bsymbolic -o libhoard.so -lpthread -lstdc++
  110 
  111 SUNOS_SUNW_SPARC_COMPILE_32_DEBUG = CC -dalign -xbuiltin=%all -fast -mt -g -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp -DNDEBUG $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/sparc-interchange.il -o libhoard_32.so -lthread -ldl -lCrun
  112 
  113 SUNOS_SUNW_SPARC_COMPILE_32 = CC -dalign -xbuiltin=%all -fast -xO5 -DNDEBUG -mt -g -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/sparc-interchange.il -o libhoard_32.so -lthread -ldl -lCrun 
  114 
  115 SUNOS_SUNW_SPARC_COMPILE_64 = CC -g -xcode=pic13 -m64 -mt -fast -dalign -xbuiltin=%all -xO5 -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp -DNDEBUG $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/sparc-interchange.il -o libhoard_64.so -lthread -ldl -lCrun
  116 
  117 SUNOS_SUNW_x86_COMPILE_32 = CC -g -fns -fsimple=2 -ftrap=%none -xbuiltin=%all -mt -xO5 -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp -DNDEBUG $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/x86-interchange.il -o libhoard_32.so -lthread -ldl -lCrun
  118 
  119 SUNOS_SUNW_x86_COMPILE_32_DEBUG = CC -mt -g -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/x86-interchange.il -o libhoard_32.so -lthread -ldl -lCrun
  120 
  121 SUNOS_SUNW_x86_COMPILE_64 = CC -g -m64 -fns -fsimple=2 -ftrap=%none -xbuiltin=%all -xO5 -xildoff -xthreadvar=dynamic -L/usr/lib/lwp -R/usr/lib/lwp -DNDEBUG $(INCLUDES) -D_REENTRANT=1 -G -PIC $(SUNW_SRC) Heap-Layers/wrappers/arch-specific/x86_64-interchange.il -o libhoard_64.so -lthread -ldl -lCrun
  122 
  123 SUNOS_GCC_SPARC_COMPILE_32 = g++ -g -fno-builtin-malloc -nostartfiles -pipe -DNDEBUG -mcpu=ultrasparc -m32 $(CPPFLAGS) -fPIC -ffast-math $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -lthread -lpthread -ldl -o libhoard_32.so
  124 
  125 SUNOS_GCC_SPARC_COMPILE_64 = g++ -g -fno-builtin-malloc -nostartfiles -pipe -DNDEBUG -mcpu=ultrasparc -m64 $(CPPFLAGS) -fPIC -fkeep-inline-functions -finline-functions -ffast-math $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -lthread -lpthread -ldl -o libhoard_64.so
  126 
  127 SUNOS_GCC_I386_COMPILE_32 = g++ -g -fno-builtin-malloc -nostartfiles -pipe -DNDEBUG -m32 $(CPPFLAGS) -finline-limit=20000 -fPIC -fkeep-inline-functions -finline-functions -ffast-math $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -lthread -ldl -o libhoard_32.so
  128 
  129 SUNOS_GCC_I386_COMPILE_64 = g++ -g -fno-builtin-malloc -nostartfiles -pipe -DNDEBUG -m64 $(CPPFLAGS) -finline-limit=20000 -fPIC -fkeep-inline-functions -finline-functions -ffast-math $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -lthread -ldl -o libhoard_64.so
  130 
  131 SUNOS_GCC_SPARC_COMPILE_DEBUG = g++ -g -fno-builtin-malloc -nostartfiles -pipe -mcpu=ultrasparc -g -fPIC $(INCLUDES) -D_REENTRANT=1 -shared $(SUNW_SRC) -lthread -lpthread -ldl -o libhoard.so
  132 
  133 GENERIC_GCC_COMPILE = g++ -I/usr/include/nptl -fno-builtin-malloc -pipe -g $(CPPFLAGS) -finline-limit=20000 -finline-functions  -DNDEBUG  $(INCLUDES) -D_REENTRANT=1 -shared $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread
  134 
  135 WIN_DEFINES = /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_WINRT_DLL" /D "_UNICODE" /D "UNICODE"
  136 WIN_DEBUG_DEFINES = /D "_WINDOWS" /D "_WINDLL" /D "_WINRT_DLL" /D "_UNICODE" /D "UNICODE"
  137 
  138 WIN_FLAGS         = /Zi /Ox /MD /nologo /W1 /WX- /Ox /Oi /Oy- /Gm- /EHsc /MD /GS /Gy /Zc:wchar_t /Zc:forScope /Gd /errorReport:queue
  139 WIN_DEBUG_FLAGS   = /Zi /MD /nologo /W1 /WX- /Gm- /EHsc /MD /GS /Gy /Zc:wchar_t /Zc:forScope /Gd /errorReport:queue
  140 
  141 windows: $(DEPS)
  142 	cl $(WIN_INCLUDES) $(WIN_DEFINES) $(WIN_FLAGS) "source\libhoard.cpp" "Heap-Layers\wrappers\winwrapper.cpp" "source\wintls.cpp" /GL /link /DLL /subsystem:console /OUT:libhoard.dll
  143 	cl $(WIN_INCLUDES) $(WIN_DEFINES) $(WIN_FLAGS) /c "source\uselibhoard.cpp"
  144 
  145 windows-debug: $(DEPS)
  146 	cl /analyze /analyze:stacksize131072 $(WIN_INCLUDES) $(WIN_DEBUG_DEFINES) $(WIN_DEBUG_FLAGS) "source\libhoard.cpp" "Heap-Layers\wrappers\winwrapper.cpp" "source\wintls.cpp" /GL /link /DLL /subsystem:console /OUT:libhoard.dll
  147 	cl $(WIN_INCLUDES) $(WIN_DEBUG_DEFINES) $(WIN_DEBUG_FLAGS) /c "source\uselibhoard.cpp"
  148 
  149 Darwin-gcc-i386:
  150 	$(MACOS_COMPILE)
  151 	@echo "To use Hoard, execute this command: export DYLD_INSERT_LIBRARIES=$$PWD/libhoard.dylib"
  152 
  153 Darwin-gcc-i386-install: Darwin-gcc-i386
  154 	cp libhoard.dylib $(PREFIX)
  155 
  156 generic-gcc:
  157 	$(GENERIC_GCC_COMPILE)
  158 
  159 generic-gcc-install: generic-gcc
  160 	cp libhoard.so $(PREFIX)
  161 
  162 Linux-gcc-arm:
  163 	$(LINUX_GCC_ARM_COMPILE)
  164 
  165 Linux-gcc-arm-install: Linux-gcc-arm
  166 	cp libhoard.so $(PREFIX)
  167 
  168 Linux-gcc-aarch64:
  169 	$(LINUX_GCC_AARCH64_COMPILE)
  170 
  171 Linux-gcc-aarch64-install: Linux-gcc-aarch64
  172 	cp libhoard.so $(PREFIX)
  173 
  174 Linux-gcc-x86:
  175 	$(LINUX_GCC_x86_COMPILE)
  176 
  177 Linux-gcc-x86-install: Linux-gcc-x86
  178 	cp libhoard.so $(PREFIX)
  179 
  180 FreeBSD-gcc-amd64:
  181 	$(FREEBSD_GCC_AMD64_COMPILE)
  182 
  183 Linux-gcc-x86_64:
  184 	$(LINUX_GCC_x86_64_COMPILE)
  185 
  186 Linux-gcc-x86_64-install: Linux-gcc-x86_64
  187 	cp libhoard.so $(PREFIX)
  188 
  189 Linux-gcc-unknown:
  190 	$(LINUX_GCC_UNKNOWN_COMPILE)
  191 
  192 Linux-gcc-unknown-install: Linux-gcc-unknown
  193 	cp libhoard.so $(PREFIX)
  194 
  195 SunOS-sunw-sparc:
  196 	$(SUNOS_SUNW_SPARC_COMPILE_32)
  197 	$(SUNOS_SUNW_SPARC_COMPILE_64)
  198 
  199 SunOS-sunw-sparc-install: SunOS-sunw-sparc
  200 	cp libhoard_32.so $(PREFIX)
  201 	cp libhoard_64.so $(PREFIX)
  202 
  203 SunOS-gcc-sparc:
  204 	$(SUNOS_GCC_SPARC_COMPILE_32)
  205 	$(SUNOS_GCC_SPARC_COMPILE_64)
  206 
  207 SunOS-gcc-sparc-install: SunOS-gcc-sparc
  208 	cp libhoard_32.so $(PREFIX)
  209 	cp libhoard_64.so $(PREFIX)
  210 
  211 SunOS-gcc-i386:
  212 	$(SUNOS_GCC_I386_COMPILE_32)
  213 	$(SUNOS_GCC_I386_COMPILE_64)
  214 
  215 SunOS-gcc-i386-install: SunOS-gcc-sparc
  216 	cp libhoard_32.so $(PREFIX)
  217 	cp libhoard_64.so $(PREFIX)
  218 
  219 SunOS-sunw-i386:
  220 	$(SUNOS_SUNW_x86_COMPILE_32)
  221 	$(SUNOS_SUNW_x86_COMPILE_64)
  222 
  223 SunOS-sunw-i386-install: SunOS-sunw-i386
  224 	cp libhoard_32.so $(PREFIX)
  225 	cp libhoard_64.so $(PREFIX)
  226 
  227 #
  228 #
  229 #
  230 
  231 Linux-gcc-x86-static:
  232 	$(LINUX_GCC_x86_COMPILE_STATIC)
  233 
  234 Linux-gcc-x86-debug:
  235 	$(LINUX_GCC_x86_COMPILE_DEBUG)
  236 
  237 SunOS-gcc-sparc-debug:
  238 	$(SUNOS_GCC_SPARC_COMPILE_DEBUG)
  239 
  240 Darwin-gcc-i386-debug:
  241 	$(MACOS_COMPILE_DEBUG)
  242 
  243 Linux-gcc-x86_64-static:
  244 	$(LINUX_GCC_x86_64_COMPILE_STATIC)
  245 
  246 Linux-gcc-x86_64-debug:
  247 	$(LINUX_GCC_x86_64_COMPILE_DEBUG)
  248 
  249 SunOS-sunw-sparc-debug:
  250 	$(SUNOS_SUNW_SPARC_COMPILE_32_DEBUG)
  251 
  252 freebsd:
  253 	$(FREEBSD_COMPILE)
  254 
  255 debian:
  256 	$(DEBIAN_COMPILE)
  257 
  258 clean:
  259 	rm -rf libhoard.*
  260 
  261