summary refs log tree commit diff
path: root/src/Makefile
blob: 9b6b7a511527fe9730d5bf91e3b3dbf72bd814c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
BIN = qbe
OBJ = main.o util.o parse.o mem.o ssa.o copy.o live.o isel.o spill.o rega.o emit.o

CFLAGS += -Wall -Wextra -std=c99 -g -pedantic

$(BIN): $(OBJ)
	$(CC) $(LDFLAGS) $(OBJ) -o $@

$(OBJ): all.h config.h

config.h:
	@case `uname` in                                \
	*Darwin*) echo "#define Defaultasm Gasmacho" ;; \
	*Linux*)  echo "#define Defaultasm Gaself" ;;   \
	esac > $@


all: $(BIN)
clean:
	rm -f $(BIN) $(OBJ)
check:
	make -C .. check

.PHONY: all clean check syndoc