7 COMMOBJ
= main.o util.o parse.o abi.o cfg.o mem.o ssa.o alias.o load.o \
8 copy.o fold.o simpl.o live.o spill.o rega.o emit.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
)
17 CFLAGS
= -std
=c99
-g
-Wall
-Wextra
-Wpedantic
20 $(CC
) $(LDFLAGS
) $(OBJ
) -o
$@
23 $(CC
) $(CFLAGS
) -c
$< -o
$@
26 $(AMD64OBJ
): amd64
/all.h
27 $(ARM64OBJ
): arm64
/all.h
28 $(RV64OBJ
): rv64
/all.h
36 echo
"#define Deftgt T_arm64_apple";\
39 echo
"#define Deftgt T_amd64_apple";\
46 echo
"#define Deftgt T_arm64"; \
49 echo
"#define Deftgt T_rv64"; \
52 echo
"#define Deftgt T_amd64_sysv";\
59 mkdir
-p
"$(DESTDIR)$(BINDIR)"
60 install -m755 qbe
"$(DESTDIR)$(BINDIR)/qbe"
63 rm -f
"$(DESTDIR)$(BINDIR)/qbe"
75 TARGET
=arm64 tools
/test.sh
all
78 TARGET
=rv64 tools
/test.sh
all
84 @for F in
$(SRCALL
); \
88 if (length(\$$0) > $@) \
89 printf(\"$$F:%d: %s\\n\", NR, \$$0); \
96 .PHONY
: clean clean-gen
check check-arm64 check-rv64 src
80 wc
install uninstall