123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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
- 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
- ifeq ($(PROFILING),1)
- CFLAGS += -DPROFILING=1
- endif
- MAKEFILE_CONFIGS_INCLUDED = y
- include $(MAKEFILE_CONFIGS_DIR)/Makefile.Host
|