7 COMMOBJ
= main.o util.o parse.o cfg.o mem.o ssa.o alias.o load.o copy.o \
8 fold.o live.o spill.o rega.o gas.o
9 AMD64OBJ
= amd64
/targ.o amd64
/sysv.o amd64
/isel.o amd64
/emit.o
10 ARM64OBJ
= arm64
/targ.o arm64
/abi.o arm64
/isel.o arm64
/emit.o
11 RV64OBJ
= rv64
/targ.o rv64
/abi.o rv64
/isel.o rv64
/emit.o
12 OBJ
= $(COMMOBJ
) $(AMD64OBJ
) $(ARM64OBJ
) $(RV64OBJ
)
16 CFLAGS
= $(CPPFLAGS
) -Wall
-Wextra
-std
=c99
-g
-Wpedantic
19 $(CC
) $(LDFLAGS
) $(OBJ
) -o
$@
22 $(CC
) $(CFLAGS
) -c
$< -o
$@
25 $(AMD64OBJ
): amd64
/all.h
26 $(ARM64OBJ
): arm64
/all.h
27 $(RV64OBJ
): rv64
/all.h
33 echo
"#define Defasm Gasmacho"; \
34 echo
"#define Deftgt T_amd64_sysv"; \
37 echo
"#define Defasm Gaself"; \
40 echo
"#define Deftgt T_arm64"; \
43 echo
"#define Deftgt T_rv64"; \
46 echo
"#define Deftgt T_amd64_sysv";\
53 mkdir
-p
"$(DESTDIR)$(BINDIR)"
54 install -m755 qbe
"$(DESTDIR)$(BINDIR)/qbe"
57 rm -f
"$(DESTDIR)$(BINDIR)/qbe"
69 TARGET
=arm64 tools
/test.sh
all
72 TARGET
=rv64 tools
/test.sh
all
78 @for F in
$(SRCALL
); \
82 if (length(\$$0) > $@) \
83 printf(\"$$F:%d: %s\\n\", NR, \$$0); \
87 .PHONY
: clean clean-gen
check check-arm64 src
80 install uninstall