Create flag to compile in freestanding mode

This commit is contained in:
Joseph Kogut 2017-02-12 11:36:35 -08:00
parent ca87b3c5e9
commit d054ae9467

View file

@ -4,6 +4,7 @@ CFLAGS = -Wall -pipe -Iinclude/ -std=gnu11
OFLAGS =
LFLAGS = $(CFLAGS) -Llib/
PEDANTIC_FLAGS = -Werror -pedantic -pedantic-errors
FREESTANDING_FLAGS = -nostdlib
LIBTVM_SOURCES = $(wildcard libtvm/*.c)
LIBTVM_OBJECTS = $(LIBTVM_SOURCES:.c=.o)
@ -21,6 +22,8 @@ DEBUG = no
PEDANTIC = yes
OPTIMIZATION = -O3
FREESTANDING = no
PROFILER = operf
PROF_ARGS = "programs/tinyvm/euler/euler7.vm"
@ -32,6 +35,10 @@ ifeq ($(PEDANTIC), yes)
CFLAGS += $(PEDANTIC_FLAGS)
endif
ifeq ($(FREESTANDING), yes)
CFLAGS += $(FREESTANDING_FLAGS)
endif
CFLAGS += $(OPTIMIZATION)
all: libtvm tvmi tdb