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 \
17 -Wno-conditional-uninitialized \
18 -Wno-missing-noreturn \
19 -Wno-ignored-qualifiers \
20 -Wno-format-nonliteral
32 OBJ_A = test/ast-test.o
33 OBJ_I = test/ir-test.o
36 #default is compiler only
39 $(CC) -c $< -o $@ $(CFLAGS)
42 test_ast: $(OBJ_A) $(OBJ)
43 $(CC) -o $@ $^ $(CFLAGS)
44 test_ir: $(OBJ_I) $(OBJ)
45 $(CC) -o $@ $^ $(CFLAGS)
46 test: test_ast test_ir
49 gmqcc: $(OBJ_C) $(OBJ)
50 $(CC) -o $@ $^ $(CFLAGS)
52 #all target is test and all
56 rm -f *.o gmqcc test_ast test_ir test/*.o