Files
graphene/Scripts/Makefile.configs
Stefan Berger f7f89c2ed2 [Makefiles] Make Graphene compileable and testable on Fedora
Adapt Scripts/Makefile.configs so that we can build and test on
Fedora. Most of the tests in Examples are now also runable on
Fedora. Also add a dependency installation target for Fedora to
TensorFlow example.
2020-05-01 20:54:04 +00:00

62 lines
1.0 KiB
Makefile

MAKEFILE_CONFIGS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
ifeq ($(origin CC),default)
CC = gcc
endif
ifeq ($(origin AS),default)
AS = gcc
endif
ifeq ($(origin AR),default)
AR = ar
endif
ifeq ($(origin ARFLAGS),default)
ARFLAGS = rcs
endif
ifeq ($(origin LD),default)
LD = ld
endif
ifeq ($(origin CXX),default)
CXX = g++
endif
OBJCOPY ?= objcopy
SYS ?= $(shell $(CC) -dumpmachine)
export SYS
ARCH := $(word 1,$(subst -, -, $(SYS)))
# where libraries are found, e.g., /lib/x86_64-linux-gnu
ARCH_LIBDIR := /lib/$(SYS)
ifeq ($(wildcard $(ARCH_LIBDIR)/*),)
ARCH_LIBDIR := /lib64
endif
# part of filenames and dirs like /usr/lib/gcc/$(ARCH_LONG)
ARCH_LONG := $(SYS)
DEBUG ?=
export DEBUG
CFLAGS += -Wall -std=c11
CXXFLAGS += -Wall -std=c++14
ifeq ($(DEBUG),1)
CFLAGS += -gdwarf-2 -g3
CXXFLAGS += -gdwarf-2 -g3
CFLAGS += -DDEBUG
ASFLAGS += -DDEBUG
endif
ifeq ($(DEBUG),)
CFLAGS += -O2
CXXFLAGS += -O2
endif
ifeq ($(WERROR),1)
CFLAGS += -Werror
CXXFLAGS += -Werror
endif
MAKEFILE_CONFIGS_INCLUDED = y
include $(MAKEFILE_CONFIGS_DIR)/Makefile.Host