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-format-nonliteral
30 OBJ_A = test/ast-test.o
31 OBJ_I = test/ir-test.o
34 #default is compiler only
37 $(CC) -c $< -o $@ $(CFLAGS)
40 test_ast: $(OBJ_A) $(OBJ)
41 $(CC) -o $@ $^ $(CFLAGS)
42 test_ir: $(OBJ_I) $(OBJ)
43 $(CC) -o $@ $^ $(CFLAGS)
44 test: test_ast test_ir
47 gmqcc: $(OBJ_C) $(OBJ)
48 $(CC) -o $@ $^ $(CFLAGS)
50 #all target is test and all
54 rm -f *.o gmqcc test_ast test_ir test/*.o