-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.conf
27 lines (20 loc) · 964 Bytes
/
Makefile.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Start with a healthy dose of warnings and use the recent version of the C standard
CFLAGS=-Wall -Wextra -Werror -m64 -std=c11
## Add debugging flags
## http://mail-index.netbsd.org/port-sparc64/2014/06/15/msg002197.html
## gcc sometimes loses debug stack info, apparently
CFLAGS+=-ggdb -fvar-tracking -fvar-tracking-assignments $(DEBUGFLAGS)
#CFLAGS+=-Os -flto
## Disable all the crap we usually include from system libraries.
## Also, tell GCC (again?) that no standard library is availible, not even
## for things like memcpy.
CFLAGS+=-nostdlib -nostdinc -nostartfiles -nodefaultlibs -ffreestanding
## Add our include directory
CFLAGS+=-I$(ROOT)/include
CCFLAGS=$(CFLAGS) -include stddef.h
# FIXME: the whole CFLAGS two-dimensional extension space is ugly
# https://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc/i386-and-x86_002d64-Options.html
# TODO: look at mcmodel again
KCFLAGS=$(CFLAGS) -mcmodel=large
KCCFLAGS=$(CCFLAGS) -mcmodel=large
CC=x86_64-elf-gcc