summaryrefslogtreecommitdiff
path: root/defaults.mk
blob: 16193f2a842a559c33f0ddefd5463aeb46deaa4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# vim: set ft=make:ts=4:sw=4:nowrap

ARCH := x86_64
ABI := elf
TARGET := $(ARCH)-$(ABI)
CC := $(TARGET)-gcc
CXX := $(TARGET)-g++
AS := $(TARGET)-as
LD := $(TARGET)-ld
OBJCOPY := objcopy

CFLAGS += -ffreestanding -mno-red-zone -ggdb -std=c2x \
          -Wall -Wextra -Werror -fno-stack-protector \
	  -Wpedantic

CXXFLAGS += -ffreestanding -mno-red-zone -ggdb \
	    -Wall -Wextra -Werror -fno-stack-protector

LDFLAGS += -nostdlib
LIBDIRS += -L$(dir $(shell $(CC) -print-libgcc-file-name))
LOADLIBES += -lgcc