2 CFLAGS += -Wall -I. -pedantic-errors -std=c90
4 #turn on tons of warnings if clang is present
8 -Wno-missing-prototypes \
9 -Wno-unused-parameter \
11 -Wno-implicit-fallthrough \
12 -Wno-sign-conversion \
14 -Wno-disabled-macro-expansion \
16 -Wno-format-nonliteral
25 OBJ_A = test/ast-test.o
26 OBJ_I = test/ir-test.o
29 #default is compiler only
32 $(CC) -c $< -o $@ $(CFLAGS)
35 test_ast: $(OBJ_A) $(OBJ)
36 $(CC) -o $@ $^ $(CFLAGS)
37 test_ir: $(OBJ_I) $(OBJ)
38 $(CC) -o $@ $^ $(CFLAGS)
39 test: test_ast test_ir
42 gmqcc: $(OBJ_C) $(OBJ)
43 $(CC) -o $@ $^ $(CFLAGS)
45 #all target is test and all
49 rm -f *.o gmqcc test_ast test_ir test/*.o