X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=Makefile;h=6b2ef6c6486ed1828487206f91e54e769ae4dcc5;hb=7b74a2bb944db4fff64b4d71290e65a98769587c;hp=75d4921ea0c2067ed9260b06d50ff7de7c69c417;hpb=178dcb13aa9a20a07466c9c041360b48089ebcbd;p=xonotic%2Fgmqcc.git diff --git a/Makefile b/Makefile index 75d4921..6b2ef6c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ CC ?= clang -CFLAGS += -Wall -I. -pedantic-errors -std=c90 - +CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector -fno-common #turn on tons of warnings if clang is present ifeq ($(CC), clang) CFLAGS += \ @@ -16,19 +15,18 @@ ifeq ($(CC), clang) -Wno-format-nonliteral endif -OBJ = lex.o \ - error.o \ - parse.o \ - typedef.o \ +ifeq ($(track), no) + CFLAGS += -DNOTRACK +endif + +OBJ = \ util.o \ code.o \ - asm.o \ ast.o \ - ir.o -OBJ_A = test/ast-test.o -OBJ_I = test/ir-test.o -OBJ_C = main.o -OBJ_X = exec-standalone.o util.o + ir.o \ + con.o +OBJ_C = main.o lexer.o parser.o +OBJ_X = exec-standalone.o util.o con.o #default is compiler only default: gmqcc @@ -38,25 +36,16 @@ default: gmqcc exec-standalone.o: exec.c $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1 -# test targets -test_ast: $(OBJ_A) $(OBJ) - $(CC) -o $@ $^ $(CFLAGS) -test_ir: $(OBJ_I) $(OBJ) - $(CC) -o $@ $^ $(CFLAGS) qcvm: $(OBJ_X) - $(CC) -o $@ $^ $(CFLAGS) -exec.o: execloop.h -exec-standalone.o: execloop.h -test: test_ast test_ir + $(CC) -o $@ $^ $(CFLAGS) -lm # compiler target gmqcc: $(OBJ_C) $(OBJ) $(CC) -o $@ $^ $(CFLAGS) -#all target is test and all -all: test gmqcc +all: gmqcc qcvm clean: - rm -f *.o gmqcc qcvm test_ast test_ir test/*.o + rm -f *.o gmqcc qcvm