Commit a891e6dd authored by nagayama15's avatar nagayama15

Update Makefiles.

parent d33e3455
include common.mk
.PHONY: all test clean
all:
......@@ -9,6 +11,3 @@ test:
${MAKE} -C src test
${MAKE} -C test test
${MAKE} -C example test
clean:
${RM} -r bin obj
......@@ -5,3 +5,8 @@ BIN_DIR := ${ROOT}/bin/${CD:${ROOT}/%=%}
OBJ_DIR := ${ROOT}/obj/${CD:${ROOT}/%=%}
.PHONY: all test clean
all:
clean:
${RM} -r bin obj
......@@ -32,7 +32,6 @@ SRCS := \
8cc/vector.c
.PHONY: all test clean
.PRECIOUS: ${OBJ_DIR}/stage1-wm/%-wm.ll
all: stage3 stage3-wm
......@@ -66,14 +65,11 @@ ${OBJ_DIR}/stage3/%.o: 8cc/%.c ${BIN_DIR}/stage2/8cc.out
${BIN_DIR}/stage2/8cc.out -w ${8CCFLAGS} -o $@ -c $<
# Watermarked 8cc
${OBJ_DIR}/stage1-wm/%.o: ${OBJ_DIR}/stage1-wm/%-wm.ll
${OBJ_DIR}/stage1-wm/%.o: 8cc/%.c
@mkdir -p ${@D}
clang ${CFLAGS} -o $@ -c $<
${OBJ_DIR}/stage1-wm/%-wm.ll: 8cc/%.c
@mkdir -p ${@D}
clang ${CFLAGS} -S -emit-llvm -o ${@:%-wm.ll=%.ll} $<
opt -load=${ROOT}/bin/src/nykk.so -block-wm -watermark=${WATERMARK} -S -o $@ ${@:%-wm.ll=%.ll} 2> ${@:%-wm.ll=%-log.txt}
clang ${CFLAGS} -S -emit-llvm -o ${@:%.o=%.ll} $<
opt -load=${ROOT}/bin/src/nykk.so -block-wm -watermark=${WATERMARK} -S -o ${@:%.o=%-wm.ll} ${@:%.o=%.ll} 2> ${@:%.o=%-log.txt}
clang ${CFLAGS} -o $@ -c ${@:%.o=%-wm.ll}
${OBJ_DIR}/stage2-wm/%.o: 8cc/%.c ${BIN_DIR}/stage1-wm/8cc.out
@mkdir -p ${@D}
......
include ../common.mk
.PHONY: all test clean
all:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment