Commit 3120244c authored by nagayama15's avatar nagayama15

透かしのテストを追加

parent 43b1abf5
......@@ -15,13 +15,16 @@ LDFLAGS := \
$(shell llvm-config-6.0 --ldflags) \
$(shell llvm-config-6.0 --libs)
.PHONY: all test clean
.PHONY: all test example clean
all: nykk.so
all: nykk.so example
test:
${MAKE} -C test run
example: nykk.so
${MAKE} -C example
nykk.so: \
src/nykk/pass/TestPass.o \
src/nykk/pass/BlockCounterPass.o \
......@@ -36,4 +39,5 @@ src/nykk/pass/BlockWatermarkPass.o: \
clean:
${MAKE} -C test clean
${MAKE} -C example clean
${RM} *.so src/*/*.o src/*/*/*.o
SRCS := \
fizzbuzz.c
LLS := ${SRCS:.c=.ll}
LLS_0 := ${SRCS:%.c=%-0.ll}
LLS_1 := ${SRCS:%.c=%-1.ll}
LLS_2 := ${SRCS:%.c=%-2.ll}
.PHONY: all clean
all: ${LLS} ${LLS_0} ${LLS_1} ${LLS_2}
%.ll: %.c
clang -emit-llvm -S -O2 -o $@ $<
%-0.ll: %.ll
opt-6.0 -load ../nykk.so -block-wm -watermark=0 -S -o $@ $<
%-1.ll: %.ll
opt-6.0 -load ../nykk.so -block-wm -watermark=1 -S -o $@ $<
%-2.ll: %.ll
opt-6.0 -load ../nykk.so -block-wm -watermark=2 -S -o $@ $<
clean:
${RM} *.ll
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