CC ?= clang
-CFLAGS += -Wall -I. -pedantic-errors
-
+CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector -fno-common
#turn on tons of warnings if clang is present
ifeq ($(CC), clang)
CFLAGS += \
code.o \
ast.o \
ir.o \
- error.o
+ con.o
OBJ_A = test/ast-test.o
OBJ_I = test/ir-test.o
OBJ_C = main.o lexer.o parser.o
-OBJ_X = exec-standalone.o util.o
+OBJ_X = exec-standalone.o util.o con.o
#default is compiler only
default: gmqcc
$(CC) -o $@ $^ $(CFLAGS)
qcvm: $(OBJ_X)
$(CC) -o $@ $^ $(CFLAGS) -lm
-exec.o: execloop.h
-exec-standalone.o: execloop.h
test: test_ast test_ir
# compiler target
gmqcc: $(OBJ_C) $(OBJ)
- $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+ $(CC) -o $@ $^ $(CFLAGS)
#all target is test and all
all: test gmqcc